I’m using code from this example:
Right now I’m doing this, and it works:
myobject = factory.create(component, pos)
local url = msg.url(nil, myobject, “sprite”)
goput.add(url, nil, handle_click)
I have a few questions and observations.
- What’s the difference between the hash id returned by factory.create() and the url retrieved by msg.url()? Do we really need both concepts?
- Why factory.create() returns the hash id and not the url of the object created ?
- Coming from an object oriented language background, I think it would be more intuitive to get an “instance” of an object with factory,create() and then access its “properties” with something like myobject.url, myobject.id etc. Am I completly missing the point, since Lua is not object oriented?
- If I type url. ctrl+space I would expect to see a popup with the fields of url (socket, path, fragment). Is this impossibile at editing time, or is/will it implemented in Editor 2.0 ?