Confusing display of custom property sets in the inspector.

All flavors welcome.
Forum rules
Be kind.
Post Reply
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Confusing display of custom property sets in the inspector.

Post by Skids »

The background to my question is that I am editing some code written by Scott Rossi of Tactile Media. He made the code available to all users at a Livecode conference in 2014. Scott's code makes extensive use of what I believe is a custom property array named tmControlData for example:

Code: Select all

-- END VALUE
------------
setProp tmEndValue pValue
   set the tmControlData["endValue"] of me to pValue
   updateMyValue
end tmEndValue

getProp tmEndValue
  return myEndValue()
end tmEndValue

Initially my question is what and where is the array tmControlData? I could not find it by searching or see it in the property inspector as it just listed the properties under "custom keys.
Screenshot 2024-08-15 at 06.56.28.png
Screenshot 2024-08-15 at 06.56.28.png (23.59 KiB) Viewed 2398 times
However on closer inspection I noted that while the name tmControlData is listed in the dropdown once selected the actual name may be displayed however sometimes the name "customKeys" remains displayed as the selection is not always accepted.
The dropdown lists these options note the blank row which I find odd:
Screenshot 2024-08-15 at 06.57.54.png
Screenshot 2024-08-15 at 06.57.54.png (52.47 KiB) Viewed 2398 times
and once selected the property inspector makes a little more sense:
Screenshot 2024-08-15 at 06.59.18.png
Screenshot 2024-08-15 at 06.59.18.png (27.4 KiB) Viewed 2398 times
However if the property inspector is closed and then reopened it reverts to listing the custom property set under "customKeys" The same is true if a second set of properties are added; initially a list of properties is displayed under the heading "customKeys.

I have another screen shot but the forum only allows me to add three files.

The list of properties displayed appears to be the first custom set added to the control but I have not confirmed this.

This post started as a question about the storage of properties and has morphed to being more of a bug report about the inspector. However, as I have wasted a hour working out what is going on I thought it worth posting in the hope that the information is useful.
Mostly using a Mac Studio M2 running MacOS Sonoma.
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Confusing display of custom property sets in the inspector.

Post by Skids »

The missing screen shot showing a second property set added via code:
Screenshot 2024-08-15 at 07.04.51.png
Screenshot 2024-08-15 at 07.04.51.png (35.03 KiB) Viewed 2397 times
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Confusing display of custom property sets in the inspector.

Post by tperry2x »

I think there's a bug in the standard Inspector (well, one of many) that shows blank property sets.
In the "Properties" stack that I'm building (that might see the light of day... one day), you can see the array actually is comprised of:
the-array.png
the-array.png (12.97 KiB) Viewed 2395 times
I also note, I understand why this didn't work before. I didn't initialise it - (I didn't know I had to, DOH!), so just tried to naively mess about with it beforehand.
new-prop.png
new-prop.png (197.26 KiB) Viewed 2395 times
To combat the initialisation step, you could perhaps put the script of the initialise button in a "on preOpenStack" handler in the stack script, or in the group itself, you could have:

Code: Select all

on preOpenControl
   SetMaxValue 100
   SetValue 0
   InitialiseProgress 100
end preOpenControl
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Confusing display of custom property sets in the inspector.

Post by Skids »

I look forward to a new and improved property inspector!

May I suggest that discussion of CustomControls is continued over on one of three new threads that I have just created?

The API is described on a card that may be viewed by ctrl clicking on the icon in the palette.

For the Progress Gauge try https://openxtalk.org/forum/viewtopic.php?t=1153

best wishes

Simon
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3210
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Confusing display of custom property sets in the inspector.

Post by tperry2x »

Skids wrote: Thu Aug 15, 2024 6:19 am I have another screen shot but the forum only allows me to add three files.
Was thinking about this earlier. Is that because you got a warning triangle when you tried to upload the 4th one?
Try hitting 'Preview' then continue uploading more files, that should work.
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Confusing display of custom property sets in the inspector.

Post by Skids »

Try hitting 'Preview' then continue uploading more files, that should work.
I find that I have to hit preview twice every time I want to add an attachment. The first time I get a warning the second time preview works o.k. and then I can add attachments. If I don't then the attachment appears to load but I don't get the "Place in Line" button and despite the attachment being listed it is not attached.

S
Mostly using a Mac Studio M2 running MacOS Sonoma.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests