property contents
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
property contents
Hello All
im following along with a live code tutorial online
the video instructs that i need to make a custom property and then fill its property contents with a number 1
the tutorial video is being done on mac os......while i have windows so i dont see the exact same layout for livecode and therefore I dont see the property contents section....please advise
im following along with a live code tutorial online
the video instructs that i need to make a custom property and then fill its property contents with a number 1
the tutorial video is being done on mac os......while i have windows so i dont see the exact same layout for livecode and therefore I dont see the property contents section....please advise
Re: property contents
Hi wanglucas,
that video has been made with an older version of LC!
The current version does look the same on each platform!
OK
1. Click "Add new element"
2. Enter you name of the custom property in the KEY field
3. Enter the VALUE for that CP in the VALUE field
That's it!
Best
Klaus
that video has been made with an older version of LC!
The current version does look the same on each platform!
OK
1. Click "Add new element"
2. Enter you name of the custom property in the KEY field
3. Enter the VALUE for that CP in the VALUE field
That's it!

Best
Klaus
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: property contents
You can also do this sort of thing:
Code: Select all
set the myDaftProperty of button "Press" to "cookbook"
Re: property contents
What everyone said.
Custom properties are one of the most endearing, er, properties of LC. You can create, populate, modify and delete them at will, all from either the property inspector, as Klaus taught, or daftly ad hoc, as Richmond offered.
They are available from every corner of LC, not just, for example, script local or global variables, which are only available within scripts. They survive sessions. They can be named descriptively. They can contain arrays, delimited text, whatever.
I like them.
Craig
Custom properties are one of the most endearing, er, properties of LC. You can create, populate, modify and delete them at will, all from either the property inspector, as Klaus taught, or daftly ad hoc, as Richmond offered.
They are available from every corner of LC, not just, for example, script local or global variables, which are only available within scripts. They survive sessions. They can be named descriptively. They can contain arrays, delimited text, whatever.
I like them.
Craig
Re: property contents
When you save a stack and quit, all variables are gone, CPs stay (survive)! 

Re: property contents
You sure you want to say it that way? 
*Edit - after having re-read it, I have come to the conclusion that my reading skills can also use improvement

*Edit - after having re-read it, I have come to the conclusion that my reading skills can also use improvement

Last edited by bogs on Sat Apr 18, 2020 11:02 am, edited 1 time in total.

Re: property contents
Yes, but I'm not a native english speaker, so please forgive me if this is not correct.
Re: property contents
Oh my.
Well, Hopefully I didn't confuse the heck out of poor wanglucas, as far as it went, what was said above was true in the context you brought up, i.e. if you statically set up a custom property through the inspector or through code in the ide, when you save that stack, the information you entered literally becomes part of that stack, and survives between sessions.
However, if you create a stack where you start creating custom properties through code dynamically, the only way that survives sessions is if you are using a launcher stack or are still in development in the IDE.
If the stack creating custom props dynamically through code is part of the executable, those custom properties will most definitely *not* survive between sessions.
My apologies to wanglucas for building suspense as it were, but as many times as we've seen that come up here, I can't imagine leaving it as stated above.
Well, Hopefully I didn't confuse the heck out of poor wanglucas, as far as it went, what was said above was true in the context you brought up, i.e. if you statically set up a custom property through the inspector or through code in the ide, when you save that stack, the information you entered literally becomes part of that stack, and survives between sessions.
However, if you create a stack where you start creating custom properties through code dynamically, the only way that survives sessions is if you are using a launcher stack or are still in development in the IDE.
If the stack creating custom props dynamically through code is part of the executable, those custom properties will most definitely *not* survive between sessions.
My apologies to wanglucas for building suspense as it were, but as many times as we've seen that come up here, I can't imagine leaving it as stated above.

Re: property contents
Bogs.
Launcher stack?
Surely no OS will allow an executable to be saved, nor any changes made to such a file during its "session"(such as any fooling around with a custom property). But that is an entirely different discussion.
A custom property, however it is made, becomes part and parcel of a stack, just as any field or button or any other change would. Once that stack is saved, it is saved as well. Forever.
If you restart your machine and reopen the stack from scratch, there it is. Just like that new button you made just before the last save.
So did you mean that no part of an executable, when making a standalone, would save a CP?
Craig
Launcher stack?
Surely no OS will allow an executable to be saved, nor any changes made to such a file during its "session"(such as any fooling around with a custom property). But that is an entirely different discussion.
A custom property, however it is made, becomes part and parcel of a stack, just as any field or button or any other change would. Once that stack is saved, it is saved as well. Forever.
If you restart your machine and reopen the stack from scratch, there it is. Just like that new button you made just before the last save.
So did you mean that no part of an executable, when making a standalone, would save a CP?
Craig
Re: property contents
Oh I see, you wouldn't have ever lowered your standards enough to make one of those, would you?

When you say something like ....
...without any clarification, then I think this is exactly the discussion you should be includingdunbarx wrote: ↑Fri Apr 17, 2020 5:47 pmCustom properties are one of the most endearing, er, properties of LC. You can create, populate, modify and delete them at will, all from either the property inspector, as Klaus taught, or daftly ad hoc, as Richmond offered.
They are available from every corner of LC, not just, for example, script local or global variables, which are only available within scripts. They survive sessions. They can be named descriptively. They can contain arrays, delimited text, whatever.

I suppose if you don't agree, I could always go through say, the last couple of years threads on the subject and link them here to refresh your memory, but I know you wouldn't want to force me to actually do some kind of work to belabor the point, especially knowing how lazy I am




Re: property contents
Bogsie.
Um, do we agree on the facts? I am not sure, though I suspect we do.
I never, in my original fanboy post about the glories of CP's, mentioned or even considered standalone applications. That was not my point.
You did, though, and expanded the range of the discussion, ah, just a bit.
I still love you.
Craig
Um, do we agree on the facts? I am not sure, though I suspect we do.
I never, in my original fanboy post about the glories of CP's, mentioned or even considered standalone applications. That was not my point.
You did, though, and expanded the range of the discussion, ah, just a bit.
I still love you.
Craig
Re: property contents
I think we completely agree on the facts my friend, the only reason I posted was because I think you left a few of them out 
I don't think the discussion was expanded in the least, btw, simply prefacing or exiting what you posted with the words "While in the IDE..." or "While in development..." would have sufficed to clarify it completely.
Hopefully, what ever newcomer hits this thread next won't come away with a mistaken impression that c.p.'s some how magically survive after the program is turned into an executable ( unless it is a launched stack ).

I don't think the discussion was expanded in the least, btw, simply prefacing or exiting what you posted with the words "While in the IDE..." or "While in development..." would have sufficed to clarify it completely.
Hopefully, what ever newcomer hits this thread next won't come away with a mistaken impression that c.p.'s some how magically survive after the program is turned into an executable ( unless it is a launched stack ).

Re: property contents
Hey Bogs,
I'm still waiting for an explanantion why my comment "When you save a stack and quit, all variables are gone, CPs stay!" might be funny or strange or whatever you answer "You sure you want to say it that way?" implied!
Best
Klaus
I'm still waiting for an explanantion why my comment "When you save a stack and quit, all variables are gone, CPs stay!" might be funny or strange or whatever you answer "You sure you want to say it that way?" implied!

Best
Klaus