teacup 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/teacup/layout.rb +1 -1
- data/lib/teacup/teacup_view.rb +14 -3
- data/lib/teacup/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5693292f4c8715752e6a4eb2c2408a5348bf1cbe
|
|
4
|
+
data.tar.gz: 7dc0aa9776c2d940e51873b47172cdfb4c9e8e30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8abe46cf16db84f3235f49410cff4c693f46c47bd6265ca9deb51f9880f2d7de15c8d8054ada54ad612e912587ae1535634345c43ba80c40a1df046b5b0ac34
|
|
7
|
+
data.tar.gz: 2bb2c30411f4fdcda2f8ac39354d25b77815dd08164640abb32033b6226f64380e7aebd18691d59a021951c733918037bff8ab9b5a77241b84bc09702fc4ad8e
|
data/lib/teacup/layout.rb
CHANGED
|
@@ -150,7 +150,7 @@ module Teacup
|
|
|
150
150
|
# teacup_next_responder assigned, it's because another object is already
|
|
151
151
|
# responsible for managing the view's stylesheet.
|
|
152
152
|
if view.teacup_next_responder.nil? && view.is_a?(Layout)
|
|
153
|
-
view.teacup_next_responder =
|
|
153
|
+
view.teacup_next_responder = self
|
|
154
154
|
end
|
|
155
155
|
|
|
156
156
|
if block_given?
|
data/lib/teacup/teacup_view.rb
CHANGED
|
@@ -24,6 +24,17 @@ module Teacup
|
|
|
24
24
|
self.subviews || []
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
def teacup_next_responder=(layout)
|
|
28
|
+
@_has_next_responder = true
|
|
29
|
+
@teacup_next_responder = WeakRef.new(layout)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def teacup_next_responder
|
|
33
|
+
if @_has_next_responder && @teacup_next_responder.weakref_alive?
|
|
34
|
+
@teacup_next_responder
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
27
38
|
# Alter the stylename of this view.
|
|
28
39
|
#
|
|
29
40
|
# This will cause new styles to be applied from the stylesheet.
|
|
@@ -107,8 +118,8 @@ module Teacup
|
|
|
107
118
|
# any views created there to the custom class (could be a controller, could
|
|
108
119
|
# be any class that includes Teacup::Layout). That responder is checked
|
|
109
120
|
# next, but only if it wouldn't result in a circular loop.
|
|
110
|
-
if ! retval &&
|
|
111
|
-
retval =
|
|
121
|
+
if ! retval && teacup_next_responder && teacup_next_responder != self
|
|
122
|
+
retval = teacup_next_responder.stylesheet
|
|
112
123
|
end
|
|
113
124
|
|
|
114
125
|
# lastly, go up the chain; either a controller or superview
|
|
@@ -363,4 +374,4 @@ module Teacup
|
|
|
363
374
|
end
|
|
364
375
|
|
|
365
376
|
end
|
|
366
|
-
end
|
|
377
|
+
end
|
data/lib/teacup/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: teacup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- the rubymotion community
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
Teacup is a community-driven DSL for RubyMotion. It has CSS-like styling, and
|
|
@@ -16,7 +16,7 @@ description: |
|
|
|
16
16
|
|
|
17
17
|
Teacup aims at making UI develpoment in RubyMotion less tedious. It's like
|
|
18
18
|
Interface Builder for RubyMotion!
|
|
19
|
-
email:
|
|
19
|
+
email: colin@hipbyte.com
|
|
20
20
|
executables: []
|
|
21
21
|
extensions: []
|
|
22
22
|
extra_rdoc_files: []
|