setprops, which property?

Ken Ray kray at sonsothunder.com
Mon May 6 20:51:01 EDT 2002


Dave,

This is wonderful! Great catch on this... just goes to show you can learn
something new every day.

;-)

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Dave Cragg" <dcragg at lacscentre.co.uk>
To: <use-revolution at lists.runrev.com>
Sent: Monday, May 06, 2002 4:16 PM
Subject: Re: setprops, which property?


> At 1:05 pm -0700 6/5/02, Niklas "Almesj-" wrote:
> >Thanks Ken,
> >That is my experience aswell.. Which makes me wonder how I can use
> >setProps with a custompropertyset (since I can't get setprops to work
with
> >the name of the either, once a custompropertyset has been assigned)?
> >
> >cheers,
> >/Niklas
> >
> >From: "Ken Ray" <kray at sonsothunder.com>
> >To: <use-revolution at lists.runrev.com>
> >Subject: Re: setprops, which property?
> >Date: Sun, 5 May 2002 15:57:14 -0500
> >Organization: Sons of Thunder Software
> >Reply-To: use-revolution at lists.runrev.com
> >
> >Niklas,
> >
> >I don't think there is currently a way to do that. If you have:
> >
> >setProp myArray theValue
> >   -- stuff here
> >   pass myArray
> >end myArray
> >
> >... and you execute "set the myArray[10] of this stack to 100", you will
> >trigger the setProp handler, and 'theValue' will contain '100', but you
> >won't be able to retrieve the '10' key.
> >
> >Am I wrong? I'd love it if I were...
>
>
> Sorry. I missed the beginning of this. Is this what you need?
>
> on mouseUp
>   set the myArray["age"] of me to "very old"
> end mouseUp
>
> setprop myArray[whichKey] pValue
>   switch whichKey
>    case "name"
>     answer "Your name is" && pValue
>     break
>    case "age"
>     answer "You are" && pValue
>     break
>    end switch
> end myArray
>
> Cheers
> Dave Cragg
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list