teacup 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4821b6532d8a60017501696bb0ba85647b46974b
4
- data.tar.gz: 00a8be407b48a624e3e07c735122871029228bc4
3
+ metadata.gz: 5693292f4c8715752e6a4eb2c2408a5348bf1cbe
4
+ data.tar.gz: 7dc0aa9776c2d940e51873b47172cdfb4c9e8e30
5
5
  SHA512:
6
- metadata.gz: 4ed282b7d63702e9ffc0c72a2a5ea436ca989f41111d1c5e13172376da27160216c43806884f7fe0dd49e62fa6ca528c4a1cf12431c06817da41fed2458cbb4b
7
- data.tar.gz: 7f61cfc625f369c9e53802b9aa28e3a1f016f888fc9936505942c4b093febcf02a9ea2edb120d5ec9daf92121d52c54a400326ebaead379ade403bd82b1ee125
6
+ metadata.gz: a8abe46cf16db84f3235f49410cff4c693f46c47bd6265ca9deb51f9880f2d7de15c8d8054ada54ad612e912587ae1535634345c43ba80c40a1df046b5b0ac34
7
+ data.tar.gz: 2bb2c30411f4fdcda2f8ac39354d25b77815dd08164640abb32033b6226f64380e7aebd18691d59a021951c733918037bff8ab9b5a77241b84bc09702fc4ad8e
@@ -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 = WeakRef.new(self)
153
+ view.teacup_next_responder = self
154
154
  end
155
155
 
156
156
  if block_given?
@@ -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 && @teacup_next_responder && teacup_next_responder != self
111
- retval = @teacup_next_responder.stylesheet
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
@@ -1,5 +1,5 @@
1
1
  module Teacup
2
2
 
3
- VERSION = '3.0.0'
3
+ VERSION = '3.0.1'
4
4
 
5
5
  end
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.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-07-22 00:00:00.000000000 Z
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: []