Finding all properties

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
Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Finding all properties

Post by Andycal » Thu Mar 06, 2008 9:52 am

I'm trying to find how I can stop an image being resized or moved during runtime, a bit like 'set the resizable of stack...'.

Whilst trying to find this, it dawned on me that there is really a need to get a list of all the properties for each object and their names to edit them with script. Does one exist?

(Oh, and if anyone can help with the original query, that'd be a bonus too!)

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Mar 06, 2008 10:27 am

Dear Andy,

In the property inspector, on the Size & Position pane, there is a checkbox to lock this. You can still change size and position using scripts or the property inspector, but not manually, once this checkbox has been set.

You can set this property by script as well: set the lockLoc of img 1 to true

The propertyNames gives you a list of all properties. There is a plugin, called SmartProperties, but this hasn't worked for me since Rev 2.7.1. You might give it a try, though.

You can write a script to get all properties. If you do, note that some properties will be returned as an array.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

All properties

Post by bjb007 » Thu Mar 06, 2008 2:44 pm

I've never used a programming
language which didn't have, somewhere in
the docs, a list of all the properties of a
each object.

Seems a serious omission and one which
should be corrected ASAP - but I'm not
holding my breath.
Life is just a bowl of cherries.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Mar 06, 2008 3:01 pm

Dear bjb007,

When you open the built-in dictionary, you see a long list of all messages, properties, functions, commands, keywords, operators, globals, constants, and reserved words and I'm not even sure that this list is complete. You can filter this list to see only what you need. I have always found this sufficient.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Object Properties

Post by bjb007 » Thu Mar 06, 2008 11:50 pm

Would be more helpful to have properties
of a particular object listed together to
know what can be changed for, say, a
button.

As it is, it's a matter of opening the inspector
and looking, then going to the Dictionary to
see what a particular property does.

Not the best answer I feel.
Life is just a bowl of cherries.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Mar 07, 2008 12:00 am

Dear bjb007,

In the property inspector, you always see either the name of a property on the palette and a description in the tooltip or the reverse. Works for me.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Object Properties

Post by bjb007 » Mon Jun 09, 2008 6:18 am

Belated thanks Mark.

Ah! the tooltips. Hadn't noticed
them before. Guess I was in too
much of a hurry.
Life is just a bowl of cherries.

Post Reply