> source is. If it is an object reference, great. If it is a string, it > looks for obvious stuff like 'self.Form', 'form', 'app', etc.
Where line(s) of code does this so I can see what "etc" covers? > If none > of those apply, it does an eval() to see if that string evaluates to > a valid object reference. This is the point at which it tries to > figure out what 'myObj' might refer to. It should try harder :) j/k - I'm guessing what ever it is currently doing is just fine, I was just having trouble figuring out what it was doing. > >>> If myObj exists at the time you are assigning the DataSource, then >>> use the object reference, not a string containing a temporary name to >>> that object. >> That does not answer my question. > > Yes it does. You just don't want to change your pre-conceived notion > of how things are supposed to work so that you can see how they > actually work. You told me how to work around the problem, I was asking for an explanation on why the problem is happening. now I see the answer is simply "myObj is not in scope when the string is evaluated." > >> The reason I want to understand is so I can figure out how to "use >> the object >> reference" when creating the textbox in the CD? > > You really need to keep your namespaces straight. I don't know why > it isn't overwhelmingly obvious to you that the name 'myObj' is long > out of scope at the time that a cdxml is parsed into class code and > then instantiated. Because it isn't obvious when things are being evaluated, and what things you have done "cause we're lazy." I'm sure the shortcuts will be handy once I know how to use them. > Maybe you are thinking along the lines of VFP- > style private memvars, which might work in something like this, but > anyone who's worked with Python for even a short while would > understand that there is nothing even remotely equivalent to 'private'. There is, but just like it isn't good practice in VFP, it isn't in python either, so it is just as well you don't know about it :) Carl K _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
