If I may add something to this, the reason why the syntax did not throw an 
error at compile time is because the compiler does not know whether or not 
VarHTMLText is a variable that contains the value "field HTMLTextField1" or the 
name of any object to be precise. If it did then it would be valid syntax. I do 
this all the time for DataGrids, as I can have datagrids on different cards in 
different stacks with the same name, eg. "dgCustomers". 

So I script 
put the long id of group "dgCustomers" into tGridID

Now I can script 
put the dgHilitedIndex of tGridID into tIndex

Bob S


> On May 18, 2022, at 09:23 , Rick Harrison via use-livecode 
> <[email protected]> wrote:
> 
> This works:
> 
> set the HTMLText of field "HTMLTextField1" of this card to URL VarURL
> 
> 
> This doesn’t work:
> 
> set the HTMLText of VarHTMLText to URL VarURL
> 
> (The syntax is accepted fine, but it throws the following error at execution 
> time.)
> 
> Chunk: error in object expression

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

Reply via email to