Set HTMLText and Get Effective HTMLText

Bob Sneidar bobsneidar at iotecdigital.com
Wed May 18 12:38:58 EDT 2022


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 <use-livecode at lists.runrev.com> 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



More information about the use-livecode mailing list