undefine a custompropertie by script

Want to move your code and projects to LiveCode but don't know where to start?

Moderators: FourthWorld, heatherlaine, Klaus, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

undefine a custompropertie by script

Post by jmburnod » Mon Dec 22, 2008 9:12 am

Hi All,

How delete a custom propertie of an object by script ?


Thank you for help

Jean-Marc

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Dec 22, 2008 10:14 am

Dear Jean-Marc,

This script deletes custom property "foo" from an object, after it has been clicked on.

Code: Select all

on mouseUp
   put the customProperties of me into myArray
   delete variable myArray["foo"]
   set the customProperties of me to myArray
end mouseUp
Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

undefine a custompropertie by script

Post by jmburnod » Mon May 18, 2009 6:30 pm

Dear Mark

I'm confuse,

I watch after a search in the forum i have forgotten to thank you for your script.
It work fine also with param like that

Code: Select all

on dDelprop n,g
   put n into LaProp
   put g into BufIm
   put the customProperties of image bufIm  into myArray
   delete variable myArray[LaProp]
   set the customProperties of image bufIm  to myArray
end dDelprop
Best regards

Jean-Marc

Post Reply

Return to “Converting to LiveCode”