7.0.1-RC1 selectively not obeying "open card in script?

Bob Sneidar bobsneidar at iotecdigital.com
Tue Nov 11 16:55:51 EST 2014


I just ran into this. If a variable contains “card foo” then the command open card foo resolves to open card card foo. You can see the problem. There is no card named card foo. Just foo. 

Is this the problem you are seeing? 

Bob S


> On Nov 8, 2014, at 13:29 , Dr. Hawkins <dochawk at gmail.com> wrote:
> 
> On Wed, Nov 5, 2014 at 6:55 PM, Peter Haworth <pete at lcsql.com> wrote:
> 
>> I'd say that's a bug.  It's good practice to use quotes around card and
>> stack names but unless there are any characters in those names like spaces,
>> etc, it shouldn't cause a problem without them.
>> 
> 
> The more I think about this, the more serious of a bug it appears.
> 
> Consider the innocuous,
> 
>     put "stack " and the short name of this stack into myStack
> 
> This will produce something like
> 
>     stack someStack
> 
> And then later
> 
>      open myStack
> 
> This is a rather drastic change in how LiveCode works.  For decades,
> 
> 
>    open aString
> 
> would take that string, if a single item such as a variable, as a literal.
> That is apparently no longer the case; the unquoted words of aString, such
> as whatever the value of "myStack" is, are now apparently being processed
> *again*.
> 
> This breaks code, and there is no reason to expect an arbitrarily named
> variable to even *be* around.
> 
> On top of that, when there is no variable of a name, the word is supposed
> to be processed as string; this has been the case since hypercard.
> 
> While I am quite aware of the value of being able to point one variable at
> another, this is just half-cocked (and would be even if it wasn't breaking
> defined behavior.
> 
> 
> And this is breaking production code I use on a daily basis.
> 
> *Bug 13972* <http://quality.runrev.com/show_bug.cgi?id=13972> - open card
> treats string as variable breaking old code (edit
> <http://quality.runrev.com/show_bug.cgi?id=13972#>)
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list