List of metadata .editors?

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
Zryip TheSlug
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 163
Joined: Tue Jan 26, 2010 10:15 pm
Contact:

List of metadata .editors?

Post by Zryip TheSlug » Sun Mar 22, 2015 7:38 pm

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.
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel

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

Re: List of metadata .editors?

Post by livecodeali » Mon Mar 23, 2015 12:07 pm

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)

Zryip TheSlug
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 163
Joined: Tue Jan 26, 2010 10:15 pm
Contact:

Re: List of metadata .editors?

Post by Zryip TheSlug » Tue Mar 24, 2015 12:34 am

@ 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.
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)
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.
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel

Post Reply

Return to “LiveCode Builder”