can I edit stack widget layouts as xml or source code?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
EndangeringSpecies
Posts: 12
Joined: Thu May 05, 2011 4:47 am

can I edit stack widget layouts as xml or source code?

Post by EndangeringSpecies » Mon Jun 06, 2011 1:52 am

in most modern visual development environments it is possible to not only place widgets and edit their properties visually but also access either the source code or the xml representation of the screen configurations. E.g. in WPF this is done by editing the XAML files and in WinForms by editing source code of the .Designer code files. Is there an equivalent to that here in RunRev?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7266
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: can I edit stack widget layouts as xml or source code?

Post by jacque » Mon Jun 06, 2011 6:05 am

One of the hardest things for people coming to LiveCode from other languages is to unlearn some of the paradigms they're used to. The objects you see in the tool palette aren't really "widgets", they are elemental objects created by the engine which have a number of different properties set to make them behave as they do.

However, the tool palette is a bit misleading because it presents similar objects as distinct types, when in fact there are only a handful of "real" objects. There is one button object, one field object, one player object, etc. All the different types you see in the palette are just shortcuts for some of the most common property settings that people most often use.

Each object has a huge number of variations, all of which are changed by setting various properties. A button has hundreds of properties. By altering these, you can make a button into a combo box, a push button, a menu button, a popup or dropdown, etc. They are all just variations on the single "button" object.

Most of the properties are edited via the object's property inspector, though there are a few that aren't represented there and must be set by script or from the message box. You'll generally find everything you need in the inspector though. To use an object's inspector, select the Edit tool in the tool palette, click the object you want to edit, and click the Inspector icon in the toolbar. Or, as a shortcut, just double-click the object with the edit tool. The property inspector will open with the object's current properties set. You can change them there. Note that everything you see in the inspector can be scripted; the inspector is just a GUI interface for that.

LiveCode tries to make things easy by only showing properties relevant to the type of object you're editing. This is a bit misleading. If you are editing any type of menu button, then only menu properties are represented. However, you can in fact change a menu button to any other type by setting or unsetting some menu properties by script from the message box, and bingo, your menu button can turn into a radio button or a push button. In some ways I wish LiveCode did not give the impression that there are different types of buttons or fields; there is really only one elemental object of each type.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”