Page 1 of 1
List of metadata .editors?
Posted: Sun Mar 22, 2015 7:38 pm
by Zryip TheSlug
Do we have a list of possible metadata editors?
I've seen so far:
- com.livecode.pi.color
- com.livecode.pi.enum
- com.livecode.pi.text
Do we have something for the available fonts?
I've tried: com.livecode.pi.font with no chance.
Re: List of metadata .editors?
Posted: Mon Mar 23, 2015 12:07 pm
by livecodeali
Hi Zyrip,
Thanks for the question. I have filed a bug report so we don't forget to document this (
http://quality.runrev.com/show_bug.cgi?id=15057).
The editors are stacks in the ide, and can be found in the Toolset/palettes/inspector/editors folder. Currently they are
com.livecode.pi.boolean
com.livecode.pi.color
com.livecode.pi.enum
com.livecode.pi.file
com.livecode.pi.number
com.livecode.pi.pattern
com.livecode.pi.set
com.livecode.pi.string
com.livecode.pi.text
but there should be more for the next release (well, there will be at least an array editor too).
In terms of an editor for fonts, currently you can do the following
metadata <property>.editor is "com.livecode.pi.enum"
metadata <property>.options is "execute:get the fontnames; sort it"
(or indeed any LiveCode script that generates the list of options you want in the 'it' variable). However, I'm not sure I particularly like this, and I think we might want to have a font editor instead.
Widgets do have a textFont property, but it didn't make it into the property definition file for dp 1 (see
http://forums.livecode.com/viewtopic.ph ... c1#p122182)
Re: List of metadata .editors?
Posted: Tue Mar 24, 2015 12:34 am
by Zryip TheSlug
@ livecodeali
Thanks!
livecodeali wrote:Hi Zyrip,
metadata <property>.editor is "com.livecode.pi.enum"
metadata <property>.options is "execute:get the fontnames; sort it"
I was not aware of the execute thing, very useful.
I didn't seen the answer to my question was here. I defined my own properties inside my widget script (wtextColor and wfontSize) and I'm now understanding why I was forced to prefix them to have them properly working.