bug or feature

Steve Gehlbach steve at nexpath.com
Sun Aug 31 12:36:01 EDT 2003


Alex Rice wrote:

> 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

I agree, and thanks for the help.  RR should make the "control" modifier 
work as you show.  As it turns out, I was seeing some other problems, 
specifically, where gField holds the long id of a field, and the context 
is a different stack:

set the textColor of the last line of gField to "blue"

This was setting the last line to blue, but changing all other lines to 
the default color.  That doesn't happen if you make the call on the same 
card as the field.  So I think there are problems with these long id 
object references and differing context.

I am going to change my design to pass in a message name, and an object 
ref, and send a message back to the object and let it modify the field 
locally.  All in all, it maybe a better design anyway, but the long id 
object references make me nervous.  I don't want to build a large design 
on this principle and get screwed with strange behavior after I have 
1000 lines of code or something.  Easier to change it now.

Steve




More information about the use-livecode mailing list