defining user properties with do

Need help with a script? This is the place to discuss how to get your code running!

defining user properties with do

Postby sctell » Mon Jul 17, 2017 5:08 am

This fails with an error "expected of or in but found something else":

Code: Select all
    put replace("T & L"," ","") into tName
   
    put merge("define the [[tName]] of this project") into tDef
   
    do tDef


Is "&" not allowed in property names?

If not what other characters are not allowed, to enable me to build a property name in script?


All the best

Terry
sctell
 
Posts: 1124
Joined: Sun Jul 06, 2008 10:41 am

Re: defining user properties with do

Postby Scott » Mon Jul 17, 2017 10:16 am

sctell wrote:Is "&" not allowed in property names?


Correct. I don't think any operator is allowed.
User avatar
Scott
Site Admin
 
Posts: 1213
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: defining user properties with do

Postby codegreen » Mon Jul 17, 2017 9:26 pm

If not what other characters are not allowed, to enable me to build a property name in script?

If I understand your question correctly, you're over-thinking this.

The actual behavior (thanks largely to Stéphane, who lobbied long and vehemently for it) is outwardly simpler (if subtly ambiguous):

Code: Select all
  get "WooWOO"
  define the it of me as "Hubba HUBBA!"

No do needed...

-Mark
codegreen
 
Posts: 1503
Joined: Mon Jul 14, 2008 11:03 pm

Re: defining user properties with do

Postby sctell » Mon Jul 17, 2017 10:50 pm

codegreen wrote:The actual behavior (thanks largely to Stéphane, who lobbied long and vehemently for it) is outwardly simpler (if subtly ambiguous):


Mark,

Would never have guessed this behaviour.

How could all these little nuggets be captured and be placed somewhere?

Thanks once again.

All the best

Terry
sctell
 
Posts: 1124
Joined: Sun Jul 06, 2008 10:41 am

Re: defining user properties with do

Postby Scott » Tue Jul 18, 2017 6:20 am

sctell wrote:How could all these little nuggets be captured and be placed somewhere?


You mean like in the documentation provided with the beta?

(c;
User avatar
Scott
Site Admin
 
Posts: 1213
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: defining user properties with do

Postby sctell » Tue Jul 18, 2017 8:43 am

Scott wrote:You mean like in the documentation provided with the beta?



The actual behavior (thanks largely to Stéphane, who lobbied long and vehemently for it) is outwardly simpler (if subtly ambiguous):



Could not find any reference to the behaviour requested by Stéphane in the documentation. Will you point this out to me please. ;)


All the best

Terry
sctell
 
Posts: 1124
Joined: Sun Jul 06, 2008 10:41 am

Re: defining user properties with do

Postby Scott » Tue Jul 18, 2017 9:43 am

Page 16 of "SuperCard b28 Preliminary Doc.pdf".
User avatar
Scott
Site Admin
 
Posts: 1213
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: defining user properties with do

Postby sctell » Tue Jul 18, 2017 9:51 am

I can't see it what Stephane requested.

I can see define but I can't see any reference to:

get "WooWOO"
define the it of me as "Hubba HUBBA!"


which is the subtle behaviour I was referring to, not the use of define.

I am talking about the use of a variable in the use of define

define the myVariable of this project.

or

get myVariable
define the it of this project

All the best

Terry
sctell
 
Posts: 1124
Joined: Sun Jul 06, 2008 10:41 am


Return to Scripting in SuperTalk

Who is online

Users browsing this forum: No registered users and 2 guests

cron