Page 1 of 1
Finding all properties
Posted: Thu Mar 06, 2008 9:52 am
by Andycal
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!)
Posted: Thu Mar 06, 2008 10:27 am
by Mark
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
All properties
Posted: Thu Mar 06, 2008 2:44 pm
by bjb007
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.
Posted: Thu Mar 06, 2008 3:01 pm
by Mark
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
Object Properties
Posted: Thu Mar 06, 2008 11:50 pm
by bjb007
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.
Posted: Fri Mar 07, 2008 12:00 am
by Mark
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
Object Properties
Posted: Mon Jun 09, 2008 6:18 am
by bjb007
Belated thanks Mark.
Ah! the tooltips. Hadn't noticed
them before. Guess I was in too
much of a hurry.