Tracking And Deleting Objects Via Custom Properties?
JOHN PATTEN
johnpatten at me.com
Tue May 29 23:03:56 EDT 2012
Thanks Peter, Paul, and Mike!
I forgot about the lineOffset… :)
Cheers!
John Patten
SUSD
On May 29, 2012, at 7:33 PM, Peter M. Brigham, MD wrote:
> You could use this, something I saved along the way. I *think* it's from the stdLib by Ken Ray and Richard Gaskin, but I've lost track.
>
> on deleteCustomProperty tObjRef,tPropSet,tProp
> -- not sure where this comes from, it's not mine
> -- thanks to <whoever> !
> put the custompropertyset of tObjRef into oldPropSet
> set the custompropertyset of tObjRef to tPropSet
> put the customkeys of tObjRef into keysList
> set the wholematches to true
> put lineoffset(tProp,keysList) into propLine
> if propLine <> 0 then
> delete line propLine of keysList
> set the customkeys of tObjRef to keysList
> end if
> set the custompropertyset of tObjRef to oldPropSet
> end deleteCustomProperty
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
>
> On May 29, 2012, at 10:14 PM, JOHN PATTEN wrote:
>
>> Hi All…
>>
>> I have a script that is storing objects via their name in a custom property of the card. I'm trying to delete one of the objects by checking if the object name is 'among' the 'list' of items. This works fine. However I can delete the name of the object from the list of objects in the custom property?
>>
>> Here's essentially what I'm trying to do:
>>
>> on mouseUp
>> put the buttonList of current card into tButtons
>> put the short name of last btn into tTargetButton
>> if tTargetButton is among the lines of tBullets then
>> delete the foundline of tButtons
>> answer tTargetButton & "Button has been deleted."
>> end if
>> end mouseUp
>>
>> How can I delete the name of an object listed in the custom property?
>>
>> Thank you!
>>
>> John Patten
>> SUSD
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list