Maciej Goszczycki
Maciej Goszczycki

Reputation: 1128

Io's method scope

How does the Io's method scope work? When I define:

method(x, x + 1)

what object does slot x belong to? I tried self, call and even Object without any luck?

For example in the REPL:

slotNames

is the same as

Lobby slotNames

in a method:

method(slotNames)

is the same as? What?

Thanks

Upvotes: 0

Views: 123

Answers (1)

MKroehnert
MKroehnert

Reputation: 3737

x is stored in the arguments list of the message not as slots.

You can access the arguments of the current message via

m := method(x, y, call message arguments).

Upvotes: 2

Related Questions