Is there a way to delete all the custom properties?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Is there a way to delete all the custom properties?

Post by Mag »

I tried this:


Code: Select all

   set the customKeys of this stack to none -- doesn't work
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Is there a way to delete all the custom properties?

Post by jmburnod »

HI Mag

Code: Select all

   set the customKeys of this stack to empty -- works
Best
Jean-Marc
https://alternatic.ch
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Is there a way to delete all the custom properties?

Post by Mag »

Thanks! :D
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Is there a way to delete all the custom properties?

Post by Mag »

PS
And... there is also a way to delete all the custom keys create? Can't find it in docs...
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Is there a way to delete all the custom properties?

Post by Klaus »

Mag wrote:... a way to delete all the custom keys create?
Monsieur? :shock:
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Is there a way to delete all the custom properties?

Post by Mag »

Sorry, but it seemed to me in my first tests that the statement deleted only the definitions, at least so it reads in the Inspector, also if I changed the panel. Then in other tests it put a 0 in the first line of custom properties list... Then I tested with message box and worked... In the end my guess is that it is just another bug of LiveCode...
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Is there a way to delete all the custom properties?

Post by Klaus »

Sorry, still no idea what you are talking about? 8)

This is the way to go:

Code: Select all

set the customKeys of this stack to empty
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Is there a way to delete all the custom properties?

Post by Mag »

Thank you Klaus.

PS
I was trying to say that LiveCode don't updates the Inspector information about custom properties when I use that command. And if updates the list, it shows wrong data.

So, I'm wonder if this is a known bug of LiveCode or if it's just another thing that is broken in my stack.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Is there a way to delete all the custom properties?

Post by Klaus »

Hi Mag,

AHA! Yes, looks like this is the case.
Obviously LC only updates the inpsector after not-scripted actions.

In cases like these, just select another object and then again the
previous object to force an updaae of the inspector.


Best

Klaus
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Is there a way to delete all the custom properties?

Post by Mag »

Nice suggestion to change the selected object. it is not enough to change the Inspector tab. Thank you.
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Is there a way to delete all the custom properties?

Post by Mag »

OK, tried. It works only when i run the command from the message box, it fails from a button script. I think it's a bug of LiveCode version 6.6.2
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Is there a way to delete all the custom properties?

Post by bn »

I think it's a bug of LiveCode version 6.6.2
have a look at this stack.

Kind regards
Bernd
Attachments
deleteCustomKeys.livecode.zip
(1.16 KiB) Downloaded 295 times
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Is there a way to delete all the custom properties?

Post by Mag »

Hi Bernd,

thank you so much for the stack, really appreciated. So the problem is the IDE that just displays wrong information.

And what about to delete the keys along with the properties?
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Is there a way to delete all the custom properties?

Post by bn »

Hi Mag,
And what about to delete the keys along with the properties?
if you look at the stack and first click "set2CustomProps" then
click at "showCustomProps" it reports the content of the 2 custom properties
then
click at "showCustomKeys" and it shows the 2 keys.

Now click button "deleteCustomProps"
again click the 2 "show..." buttons

Nothing appears in the field.

So not only the content of the custom properties is gone but also the keys of the custom properities.

What happens in the inspector is that once it is set to show the custom properties and the custom properties change the inspector does not update the custom properties. You have to switch to another pane in the inspector e.g. Colors and Pattern and go back to custom properties to see the change. Then you will also notice that keys and content is gone after clicking "deleteCustomProps".

It is a bit confusing but it works.

Kind regards
Bernd
Post Reply