Using the property inspector

Moderators: LCMark, LCfraser

Post Reply
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1540
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Using the property inspector

Post by [-hh] » Sat Sep 09, 2017 2:31 am

My newest widget has such a lot of options that I tried to use some 'unusual' features of the property inspector
  1. Grouping to have some editors in a row:
    metadata.property.group is "A"
    doesn't work (LC 9 and 8.1.6). Is it not yet implemented?
  2. Using
    metadata.property.editor is "com.livecode.pi.set"
    I couldn't find a way to populate the announced list field.
  3. I couldn't find a way to populate an option menu of the PI from LC Builder by a handler (except a crazy do-script-path using LCS- "execute:"). In short: Is there a way to have
    metadata.property.editor is "com.livecode.pi.enum"
    metadata.property.options is tString
    where tString is a variable?
  4. Is there any way to have push buttons of type "Apply" or "Revert" or "Cancel" with the usual getters and setters?
As the above may sound a bit criticising, I would like to make this clear:
While developing this "huge" widget I started to love the property editor and its concept:

It is incredible easy to give the user a way to edit arrays or text, to choose colors or a textfont, or to work with option menus. And I have seen that there are already ways prepared to have own sections for a widget...

Thanks to the team for that tool. It may be unfinished but is already an effective and elegant tool!
shiftLock happens

livecodeali
Livecode Staff Member
Livecode Staff Member
Posts: 120
Joined: Thu Apr 18, 2013 2:48 pm

Re: Using the property inspector

Post by livecodeali » Tue Sep 12, 2017 9:55 am

Hi Hermann,
1. I can confirm that

Code: Select all

metadata property.group
is not working correctly.

2. The following is working for me in 8.1.6:

Code: Select all

property circleType get mType set mType
metadata circleType.editor is "com.livecode.pi.set"
metadata circleType.options is "a,b,c,d,e"
metadata circleType.default is "a"
Screen Shot 2017-09-12 at 09.38.47.png
The same specification for options works for me too, to fill an option menu for an enum property.
However the following is also not working correctly

Code: Select all

metadata circleType.options is "Label For A|a,Label For B|b,..."
3. You cannot use a variable in the metadata directive (yet). I'm not sure if that is planned - it would be nice though.

4. The push button pi editor is "com.livecode.pi.action". The following works here:

Code: Select all

property circleType get mType set applyType
metadata circleType.editor is "com.livecode.pi.action"
metadata circleType.label is "Apply"

public handler applyType(in pType as String)
   log mType
end handler
When I click the 'Apply' button, the applyType handler is called and the mType variable is logged accordingly.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1540
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Using the property inspector

Post by [-hh] » Tue Sep 12, 2017 10:33 am

Hi Ali,

thanks for the answer.
Especially for the "action"-info. I couldnt find that on github or in release notes.

Next week I'll try to collect all PI things for sharing (and save you some work). I think this tool is currently underestimated.

H.

Edit Sep 30, 2017: Here is now kind of LCB-PI cheat sheet: https://forums.livecode.com/viewtopic.p ... 54#p158554
Last edited by [-hh] on Sat Sep 30, 2017 5:33 pm, edited 1 time in total.
shiftLock happens

livecodeali
Livecode Staff Member
Livecode Staff Member
Posts: 120
Joined: Thu Apr 18, 2013 2:48 pm

Re: Using the property inspector

Post by livecodeali » Tue Sep 12, 2017 10:58 am

Ah, sorry about the lack of docs for the action thing, I think I added it for the datagrid but must have forgotten to update the docs!

Post Reply

Return to “LiveCode Builder”