How can I pass a handler a long ID as a string?

David Burgun dburgun at dsl.pipex.com
Wed Mar 22 12:09:33 EST 2006


Hi,


Instead of doing:

myHandler (the long id of fld "myField" of cd "myCard" of stack  
"myStack")

do

myHandler (the long id of me)


That should fix it!

All the Best
Dave

On 22 Mar 2006, at 14:47, Graham Samuel wrote:

> I've never come across this before, and it's got me confused. I  
> have a handler, say "myHandler" that has a couple of parameters  
> which are intended to be the long ids of objects (actually fields).  
> The handler manipulates the fields, something like
>
>   on myHandler para1
>
>     do "put empty into"&&para1
>
>     ...
>
>   end myHandler
>
> I find that this works if the parameters are set in the same  
> context as the handler itself - for example in a 'mouseUp' handler  
> on the card where I've put the code of myHandler, but if I call it  
> from elsewhere with a call like
>
>    myHandler (the long id of fld "myField" of cd "myCard" of stack  
> "myStack")
>
> I find that during the call the engine evaluates the parameter and  
> passes me the contents of the field, and not the reference to the  
> field. What I want is to pass the long id to my handler as a  
> **string**. I can't see why this doesn't work, and more importantly  
> so far I'm stuck for a way round it. I've tried
>
>   put the long id of fld "myField" of cd "myCard" of stack  
> "myStack" into temp
>   myHandler temp
>
> but it has exactly the same effect.
>
> What am I doing wrong?
>
> TIA
>
> Graham
>
>
> ----------------------------------------
> Graham Samuel / The Living Fossil Co. / UK and France
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list