Script help needed

Jan Schenkel janschenkel at yahoo.com
Tue Dec 30 01:59:21 EST 2003


--- David Squance <squance at elkvalley.net> wrote:
> Greetings,
> The following is part of a button script which gives
> an error message
> "chunk: no such object"
> 
>  put the drawnumber of this card into temp2   --
> there is the correct value
> in the custom properties
>   toplevel stack "draw lists"   -- goes to another
> substack
>   find temp1  -- this is from further up the
> handler, finds the correct
> card and is not a problem
>   put empty into fld temp2  -- there *is* a fld with
> the name drawn from
> the custom property
> 
> If I use the message box with:
> 
>  put the drawnumber of this card into temp2
>   toplevel stack "draw lists"
>   find temp1
>   put temp2
> 
> I get the expected result--the name of fld to be
> emptied.
> I tried:
> 
> put quote&temp2&quote into temp2
> 
> since it is a field name, but that made no
> difference.
> 
> Any help would be appreciated.  TIA
> 

Hi David,

Is there actually a field <temp2> on the card where
the result is found ? Once you toplevel the other
stack, you'll be in that other stack, and simple
control references are considered relative to tha
stock, not the new stack.
So a possible solution is the use o the long ID :
--
  put the drawnumber of this card into temp2
  put the long ID of fld temp2 into tFieldLongID
  toplevel stack "draw lists"
  find temp1
  put empty into fld tFieldLongID
--

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


More information about the use-livecode mailing list