Discussion:
Checking if a Custom Property Exists
Matt Denton
2002-03-13 05:00:01 UTC
Permalink
Hello all,

Does anyone know how to check if a custom property exists?

I've tried:

put exists (the gCustomProp of this stack)

and:

put there is a (the gCustomProp of this stack)

... both yielding 'false' for a property that does exist and holds a
value. Short of cycling through the prop list, I can't work out any
other way.

Many thanks!

Matt Denton
Matt Denton
2002-03-13 05:08:01 UTC
Permalink
Hello List,

After spending many hours working and testing images for my project, I
wanted to share one of my findings (thanks to Geoff for his help too!).
I'm trying to create a 'skins' file of images that are referenced by
another stack. These images are PNGs and must scale:

Setting an icon image can reference any open stack, however the image
can not be scaled. Neat and easy if resizing is not an issue;

Setting the imageData of an object at the moment only works if the image
is on the same card. Also both source and destination must be the same
size or the data becomes scrambled;

And finally the simple solution (very obvious and tucked inside in the
documentation):

put image "Original" of stack "Another Stack" into image "Working Copy"

This resizes the destination to the same size as source.

Not sure if this is of any help to anyone else, maybe!

Cheers,

Matt Denton
Ken Norris (dialup)
2002-03-13 06:24:01 UTC
Permalink
Post by Matt Denton
And finally the simple solution (very obvious and tucked inside in the
put image "Original" of stack "Another Stack" into image "Working Copy"
This resizes the destination to the same size as source.
Not sure if this is of any help to anyone else, maybe!
----------
Absolutely! So much so that I'll put this in my own index files for Rev.
Imagery is crucial in my adaptive software, and so is geometry. The posts
I've seen have lead me to believe that the geometry manager isn't always
reliable and may have to be resized via scripts.

Thanks,
Ken N.
Jeanne A. E. DeVoto
2002-03-13 06:43:06 UTC
Permalink
Post by Matt Denton
Does anyone know how to check if a custom property exists?
Use the customKeys:

if "myCustomPropName" is among the lines of \
the customKeys of this stack then
-- it exists!
end if

--
Jeanne A. E. DeVoto ~ ***@runrev.com
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!

Continue reading on narkive:
Loading...