IRC Logs for #io Friday, 2018-04-20

*** user24 has joined #io15:19
user24If I have A := Object Clone; A v := 42; A := Object clone; A m := method(A v)15:27
user24wait, minor modification15:27
user24If I have A := Object Clone; A v := 42; B := Object clone; B m := method(A v)15:27
user24How can object B lookup object A?15:28
*** Dracoliat has joined #io19:26
*** Dracoliat has left #io ("Closing Window")19:26
jeruser24, through the same mechanism you can look up "clone" on Object19:39
jerso inside method() you have a locals object, it's linked to the target context (the instance of the object it's being called on) which itself is linked to Object, which is linked to Lobby... Lobby can find A because A was defined in the context of the Lobby19:40
user24jer: So first, the name is looked up depth first recursively through all the protos and then the locals?19:41
jersorry was afk20:17
jeryes, so inheritence happens depth first, in a list of protos20:17
jerstarting at the locals20:17
jerlocals on method()s checks the context of the receiver next, and depth first from there20:18
user24jer: thank you!20:20
jersure no problem20:27
*** user24 has quit IRC20:40

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!