bug or feature

Alex Rice alex at mindlube.com
Sun Aug 31 00:29:00 EDT 2003


On Saturday, August 30, 2003, at 08:50  PM, Steve Gehlbach wrote:

> The only reason I haven't use the short id is I wanted something 
> general that would work from any stack.
>
> Seems like you just need a word, like "object" in front of gField that 
> would do it.  The do " " approach seems clunky, and, really 
> unnecessary if the syntax could be worked out.

I can't answer if it's a bug or feature- I'm too much of a newcomer to 
xtalk scripting. Just come observations.

Making a syntax change might break hypercard language compatibility, 
which seems to be a huge issue for a lot of folks. (I'm not one of them 
though)

Most commands will accept the long or abbrev forms of the id. long and 
abbrev both start of with the object type. Like this for example does 
work:

   put the long id of btn 1 into tID
   hide tID -- hides the button

Specifically the issue you are seeing seems to be with the "get/put" 
commands. There is already a keyword "control" that could be used to 
achieve what you are saying- I would expect it to work this way:

   put the long id of fld 1 into tID
   put "hello" into control tID -- error

Since "put x into obj" doesn't work for you, in the meantime I would 
just use the previous suggestion of just setting the text property of 
the field instead of using the "put into" shortcut. This is what you 
have to do for all other properties anyways (htmlText, etc) so it might 
be a better general solution anyways.

   put the long id of fld 1 into tID
   set the text of tID to "hello" -- does same as what put "hello" into 
would do



Alex Rice <alex at mindlube.com> | Mindlube Software | http://mindlube.com

what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco




More information about the use-livecode mailing list