Bill,

The solution to your issue is to use the short name version of name.

Marc

On May 17, 2017, at 1:41 PM, William Prothero via use-livecode 
<use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>> wrote:

Folks:
It can be difficult for long term users of an application to appreciate the 
“exceptions” to the philosophy of a dev app. I think the livecode community is 
affected by “familiarity” over clarity sometimes. For years (when Director was 
a viable dev platform), I had a negative feeling about Hypercard type syntax. I 
had done some pretty extensive programming in Hypercard and Supercard too. I 
liked the way Director worked. I liked that it did not insult my intelligence 
by requiring “put 3 into x” instead of the universal "x=3” syntax that all 
algebra students lewarn in gradeschool, When Director died, I looked around, 
held my nose, and jumped to livecode, and now I’m glad I jumped that initial 
negative barrier. But, I take exception to the many claims that livecode is 
“english-like” (in spite of the many “english-like” commands), especially if 
you want to do the advanced work that most of the users do.

For example, suppose I want to do the very basic task of coding a conditional 
that test for the name of a card. What I would intuitively expect is:

put the name of this cd into cdName

What I get for cdName is:  Suppose the name of the cd is theName
card “theName”

Ok, now I only want the name, so I do

if word 2 of the name of this cd is “theName” then
 —do my stuff
end if

Nooooo, I don’t get that. First, I need to do:

put word 2 of cdName into cdName
replace quote with “” in cdName
if word 2 of the name of this cd is “theName” then
 —do my stuff, this works
end if

I don’t call this intuitive.  I just spent more time than I should have sorting 
this out.

So, how should a company supporting a platform deal with this? Macromedia chose 
a really nice strategy when they added dot syntax, which its users wanted. What 
they did was implement a flag named “useLegacyCode”  (or something like that). 
This way the legacy users could just set that flag and couldn’t complain about 
their apps breaking, and the new apps could be built on a more refined code 
base.

This could be a strategy for the LiveCode mothership to implement when it 
becomes desirable to implement new, improved, and different code syntax that 
may conflict with legacy syntax. There are other non-intuitive oddities like 
the example I gave above. If livecode wants to embody “english-like” syntax, 
there could be numerous improvements to help the newby. Conversely, perhaps 
another language entirely might compile to the same tokens as the current 
version, but that’s a job for another huge effort.

Just sayin'…..

Regards,
Bill P,

William A. Prothero
http://earthlearningsolution.org/

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

---------------
Marc Siskin
Manager, Modern Language Resource Center
Carnegie Mellon University
msis...@andrew.cmu.edu<mailto:msis...@andrew.cmu.edu>



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to