setProp question

Thomas McGrath III mcgrath3 at mac.com
Tue Jan 20 15:43:08 EST 2009


Mark, Hi,

So it is because they are all at the default customKeys "set".So if I  
rewrite ALL of my custom property code to make a new set then it would  
work?
i guess it is either that or write a bunch of setProps.

Hhhmmmm

And yes it was the when and which not the what.......

Thanks again,


Tom McGrath III
Lazy River Software
3mcgrath at comcast.net

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html





On Jan 20, 2009, at 3:09 PM, Mark Schonewille wrote:

> Hi Tom,
>
> If you only want to know _what_ has changed, you can save a copy of  
> the custom properties set in a global array (or in another custom  
> properties set and copy it to an array variable when you need it).  
> When you want to make a comparison, you can copy the customkeys  
> properties set to an array and compare all the elements of the array.
>
> If you want to know _when_ a custom property changes, you will have  
> to use a setprop handler for each single property. You can use  
> square brackets if you do this and thus create a properties set, but  
> not for the customKeys. If you use a different properties set, it  
> should work.
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> http://economy-x-talk.com
> http://www.salery.biz
> Dutch forum: http://runrev.info/rrforum
>
> We are always looking for new projects! Feel free to contact us to  
> discuss your custom software project!
>
> On 20 jan 2009, at 20:32, Thomas McGrath III wrote:
>
>> Is there a way to find out what custom property was set by using  
>> the setProp control structure?
>>
>> My custom properties are all in the default custom property set  
>> "customKeys" and they are set from many places depending on user  
>> action. I just want to know that or if any of them were changed so  
>> that I can do a clean up of another objects custom properties.
>>
>> First off the example in the dictionary is wrong or at least won't  
>> compile:
>> 	
>> setProp mySet[thisProperty] newValue
>> 	if thisProperty is "that" then put newValue into me
>> end setProp
>>
>> This led me to believe that I could script this:
>>
>> setProp customKeys[thisProperty] newValue
>>  	 if thisProperty is among the customKeys of this card then
>> 		beep -- replaced by my cleanup code
>> 	end if	
>> end setProp
>>
>> This of course does not work. Are there any ideas on a better way  
>> to detect what was changed???
>>
>>
>> Thanks in advance,
>>
>> Tom McGrath III
> _______________________________________________
> 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