Page 1 of 2

Current Custom Properties setup ? [Re-Solved]

Posted: Fri Mar 15, 2019 10:39 pm
by bogs
Okey doke, I cracked open 8.1.2 to contribute pictures to a project I'm playing with.

I went to the custom properties pane, and entered two custom properties, and filled them out (like this)
Selection_002.png
It is there...
Then I closed out the PI, went to the message box to send this message -

Code: Select all

set the text of field 1 of stack "help" to the custPropCredits  of stack "help"
and... nothing happened to the field. I went back into the custom properties and..... They were both blank again ?!

Did something change in the cp realm?

Re: Current Custom Properties setup ?

Posted: Fri Mar 15, 2019 10:49 pm
by Klaus
Hi bogs,

"custom property sets" are just like arrays!
1. looks like you did not set a KEY for your entry!
2. Then use the "usual" array syntax:

Code: Select all

set the text of field 1 of stack "help" to the custPropCredits["name_of_your_key"] of stack "help"
Or do like this:

Code: Select all

set the customPropertySet of stack "help" to "custPropCredits"
set the text of field 1 of stack "help" to the "name_of_your_key" of stack "help"
Did something change in the cp realm?
Not since the Metacard days. :-)

Best

Klaus

Re: Current Custom Properties setup ?

Posted: Sat Mar 16, 2019 8:07 am
by richmond62
Screenshot 2019-03-16 at 9.03.06.png
-
Click on the "Key" and that should sort things out.

OR . . . "just"

Code: Select all

set the "Prawns" of btn "Button 1" to "Peeled"
and everything is done "magically" without having to fool around
with the Properties palette at all. 8)

Re: Current Custom Properties setup ?

Posted: Sat Mar 16, 2019 11:54 am
by bogs
Klaus wrote:
Fri Mar 15, 2019 10:49 pm
Did something change in the cp realm?
"custom property sets" are just like arrays! <sic>
Not since the Metacard days. :-)
Best
Klaus
Ah, I wasn't trying to make a 'CP set', just two simple separate CPs, heh.

Richmond, thank you for the picture, I think what changed is the layout (and meaning) of the controls in the panel, and that threw me off ...
Selection_001.png
It sticks here eh...
I don't feel so bad, least I was only doing the same thing over and over 6 times before asking Image

Re: Current Custom Properties setup ?

Posted: Sat Mar 16, 2019 12:00 pm
by Klaus
AHA!
Well, I am a very visual guy and the pic showed that you were selecting a CP set actually.

Re: Current Custom Properties setup ?

Posted: Sat Mar 16, 2019 12:32 pm
by bogs
Yah, it was a 'gotcha' for me, in all the versions I normally use, you just click the + icon at the top, then add the property. The redesign really threw me off, clicking that icon creates a 'set' now, and you have to go into the 'key' part to actually create just one property is how it works I guess.

Reversing the order of controls and setting the props in a completely different looking area, and changing all the dialogs wasn't something I was thinking had happened :?

I just love redesigns :P

Re: Current Custom Properties setup ?

Posted: Sat Mar 16, 2019 1:55 pm
by richmond62
The thing is counter-intuitive and set me cursing a while
back when I was experimenting with custom props in
square dominos.

So, nowadays I just use the type of code I mentioned
and avoid the palette as much as possible.

Re: Current Custom Properties setup ?

Posted: Sat Mar 16, 2019 2:06 pm
by bogs
richmond62 wrote:
Sat Mar 16, 2019 1:55 pm
So, nowadays I just use the type of code I mentioned
and avoid the palette as much as possible.
Well, normally that is how I would have approached it, in code -

Code: Select all

set the cpropMyProp of this stack to "prawns"
put the cpropMyProp of this stack into field 1
// etc
Problem is, this project ultimately isn't for me as much as a demonstration of the Lc IDE through the years, so I'm trying to centralize how much of what Lc can do can be done strictly through the IDE provided tools. They remained so consistent through the decades I just didn't count on the surprises with the new placements, it made me re-think the entire project layout I originally had :roll:

Re: Current Custom Properties setup ?

Posted: Sat Mar 16, 2019 3:47 pm
by richmond62
a demonstration of the Lc IDE through the years
There just has to be an "agenda" behind this: do tell! 8)

Re: Current Custom Properties setup ?

Posted: Sat Mar 16, 2019 4:47 pm
by bogs
Probably in another week or two you'll see it posted, I'm taking my very first swipe at trying to write a tutorial, waiting on feedback from a few people.

Problem is me, really, I don't use much past 6.5 (and more often than not, I'm in Mc), but I want to make sure the code AND the parts of the IDE needed to complete the tutorial can be located through (more or less) the same directions given.

If the versions get too far apart, I may have to scrap the one generic tutorial and write 2 different tutorials instead. Problem there is, 8.x and 9.x are already starting to go really different for certain things.

Re: Current Custom Properties setup ?

Posted: Sun Mar 17, 2019 2:27 am
by dunbarx

Re: Current Custom Properties setup ?

Posted: Sun Mar 17, 2019 10:59 am
by bogs
dunbarx wrote:
Sun Mar 17, 2019 2:27 am
Does this have any relevance?
Ha ha ha, I had forgotten all about that thread, good one :D

Unfortunately, it was my recognition skills that failed to see the difference in setup of cps that was the problem. Klaus and Richmond set me straight already.

Also unfortunately (or maybe fortunately), I can only run up to the 8.x series on my box, 9 and up still present too many problems to overcome. I suppose I can shove them into a VM, but for the moment it isn't of great importance.

Re: Current Custom Properties setup ? [Un-Solved]

Posted: Wed Mar 27, 2019 3:41 pm
by bogs
Mkay, so, I took another run (longest I used 8.1.2 yet) at doing the video to accompany this project.

I set the customProperties through the IDE again, this time using Richmond's picture as a guide. I then tested the line you see the debugger stopped at from the messageBox, and it worked! So I put it into the script and....
Selection_001.png
Whaaa...?
So now I am thoroughly confused. In no version of Mc to Lc 7 do I find it this hard to set a custom property through the IDE tools (I went and tested back to Mc 2.5). I didn't see any mention of a custom property set actually being *required* just to use a custom property in the guide, but I could have missed it.

Anyone else seeing this, or is this just something I'm not getting?

Re: Current Custom Properties setup ? [Un-Solved]

Posted: Wed Mar 27, 2019 3:48 pm
by Klaus
Question of the day: What is the debugger complaining about?

Re: Current Custom Properties setup ? [Un-Solved]

Posted: Wed Mar 27, 2019 4:19 pm
by bogs
My bad, says there is no such object (custom property), when apparently there is (I see it when i go to the palette, and of course the MB says it works).