> In Flash you can create new properties of an object on the fly. Is it > possible with Director. I am attempting to add globals to the globals, > which I have found to have an ilk of #instance. So it seems that all one > would have to do is append a new property of the globals object instance. > Since it is not a list one can not just AddProp. I am trying to create a > tutorial for programming that allows users to define variables. > But since I > want to allow them to manipulate them over time, it needs to be global as > opposed to local. I'm confused; are you trying to declare/initialise _globals_ on the fly, or add properties to an instantiated object on the fly? The former you seemed to have solved. The latter I'm unsure about, but your object could store a property list in a property which you can certainly add new properties to when you need to. I'd be careful about treating (the globals) as an instance, even though ilk says it is. Open a fresh copy of Director Open the message window Type "showGlobals" Type "aVar = 3" showGlobals put (the globals).count clearGlobals showGlobals put (the globals).count put (the globals)[2] put (the globals).getPropAt(2) As you say, you're not allowed to addProp(), but try setAProp() You're now in the realm of Director's symbol table, and I'm not sure how manipulable it is at this level. Once it has reserved a symbol, I don't think it can be removed without closing/re-starting Director. Anyone else have any insight? -Sean. [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]
