focus on field broke?

Bob Sneidar bobs at twft.com
Mon Nov 28 13:14:30 EST 2011


At the end of my openStack handler in my CSL Logon stack I have a simple line:

   focus on field "fldusername" 

Also, I have some code a bit before it, which looks like this:
   go invisible stack "CSL Launcher" 
   go me

I do this because all the database initialization and access code is in CSL Launcher and simply going to that stack will set everything up. If I comment out those two lines, then I can use the short version:
   focus on field "fldusername" 

If I do not comment those lines out, I get a runtime error:
stack "CSL Logon": execution error at line 74 (Chunk: no such object) near "fldusername", char 10

If I use the form:
   focus on field "fldusername" of card 1 of me

then it works famously either way. It appears that using the form "go me" does not change  the defaultStack to the stack the script is in. 

Now it gets interesting. If I change "go me" to "go stack me" then it works fine again! I thought that perhaps "me" is not what I think it is, except when I use "put me" just before the command "go me" I get
stack "CSL Logon" 

That is what you would expect. So it seems that using "go me" does NOT set the defaultStack to CSL Logon like you would expect, but using "go stack me" DOES!! What "go stack me" *SHOULD* resolve to is "go stack stack CSL Logon" which *SHOULD* produce a compilation error! But it doesn't. 

I hope that is not confusing. I have to think this is a bug. Not a huge one, but if using the form "me" produces unreliable results, or different results at different times, this may be a problem elsewhere. 


Bob



More information about the use-livecode mailing list