Help: Id's can be completly unreliable
J. Landman Gay
jacque at hyperactivesw.com
Wed Nov 10 13:28:24 EST 2010
On 11/10/10 8:42 AM, Claudi Cornaz wrote:
> Hi,
>
> After some more tinkering I fortunatly solved the formattedWidth problem.
> Apparently you have to be on the card containing the field to get
> the formattedWidth/Height etc, otherwise it will return 0.
>
> This is mentioned in the docs, so I could have 'known' this.
>
> I am glad I got this working so I can continue.
>
> But still be warned and prepared to deal with the ID 0 problems you may
> encounter.
ID 0 is the id for all template objects (the templateButton, the
templateField, etc.) You shouldn't ever see that ID in controls you
create yourself. Did you name your custom templates "templateButton" or
"templateField"? If so, then the engine is returning the built-in
template ID and not the one you created.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list