rm-extensions 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/motion/events.rb +7 -1
- data/lib/rm-extensions/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2973c7a90a5838620647613242b3487718d1185a
|
4
|
+
data.tar.gz: 4f5e2038035fb1c14efc4d1345867cfdb407236a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acd625c55911e5df81975983b3dfb80eda03480d765d3b41402ba810da2668bdacd36cec865bd5b94bb6b6d659f31568a7a6d10df86545b7a81d341cfa0f1390
|
7
|
+
data.tar.gz: 7fbeda940ecd46dc99fc1e6d8692b176766391c9137aa943e53b38a83938546688a2336dcef0021771bf65a9a50da8ef8a7cfca5df97abf6eb459e5f7b6228eb
|
data/lib/motion/events.rb
CHANGED
@@ -8,6 +8,10 @@ module RMExtensions
|
|
8
8
|
@rmext_events_proxy ||= EventsProxy.new(self)
|
9
9
|
end
|
10
10
|
|
11
|
+
def rmext_events_proxy?
|
12
|
+
!@rmext_events_proxy.nil?
|
13
|
+
end
|
14
|
+
|
11
15
|
# register a callback when an event is triggered on this object.
|
12
16
|
def rmext_on(object, event, &block)
|
13
17
|
object.rmext_events_proxy.on(event, limit:-1, inContext:self, withBlock:block)
|
@@ -152,7 +156,9 @@ module RMExtensions
|
|
152
156
|
p "CONTEXT:", @weak_object.rmext_object_desc, "UNLISTENING TO:", object.rmext_object_desc
|
153
157
|
end
|
154
158
|
@listenings.removeObject(object)
|
155
|
-
object.rmext_events_proxy
|
159
|
+
if object.rmext_events_proxy?
|
160
|
+
object.rmext_events_proxy.off_context(@weak_object)
|
161
|
+
end
|
156
162
|
end
|
157
163
|
end
|
158
164
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rm-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Noon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Extensions and helpers for dealing with various areas of rubymotion
|
14
14
|
email:
|