Skip to content

Commit

Permalink
using the address to findInstances (we'll see if appropriate)
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Feb 3, 2020
1 parent 4aa8322 commit ab6ec69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ObjectiveC/ObjCProxyClass.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ ObjCProxyClass >> createClassNamed: className superclass: superclassName into:
]

{ #category : #private }
ObjCProxyClass >> findInstance: addressNumber [
^ instances detect: [ :each | (each instVarNamed: 'proxy') getHandle asInteger = addressNumber ].
ObjCProxyClass >> findInstance: address [

^ instances detect: [ :each | each proxy getHandle = address ].
]

{ #category : #private }
Expand Down Expand Up @@ -273,7 +274,7 @@ ObjCProxyClass >> receiverClass [
ObjCProxyClass >> sendTo: receiver selector: aSelector withArguments: args [
| proxyReceiver |

proxyReceiver := self findInstance: receiver asInteger.
proxyReceiver := self findInstance: receiver.
^ [ proxyReceiver
perform: aSelector
withArguments: args ]
Expand Down

0 comments on commit ab6ec69

Please sign in to comment.