This might be a dumb question, but here goes... In the dictionary it states:
You can use the set command to set the properties of the templateImage before creating an image. The new image has the properties of the templateImage, by default. Changing the properties of the templateImage does not affect existing images.
Suppose you already have an empty image object in place. When you put a new image into the object, do the set properties of the templateImage apply to the image? Or do you have to create the object first for the properties to apply accordingly? From the dictionary, it seems that the image object must be created first.
keithglong wrote:Suppose you already have an empty image object in place. When you put a new image into the object, do the set properties of the templateImage apply to the image?
no.
keithglong wrote:Hi All,
This might be a dumb question, but here goes... In the dictionary it states:
Or do you have to create the object first for the properties to apply accordingly? From the dictionary, it seems that the image object must be created first.
I am currently experimenting. Anyway, what I meant is that it seems that after you set the properties of the templateImage, you must then create the image object programmatically directly afterwards, and then add your image to the image object for the properties to apply to the said image. Correct?
The templateImage (and all other templates) only apply when creating a new object. Existing objects do not acquire properties suddenly (we'd be upset if that happened.)
The templateImage can include imagedata or a filename, which would mean the image content is already there when the new object is made. If you don't supply those, then the new image object will be empty but any other properties you've set on the template will be there.
The template objects are most useful when you need to script the creation of many similar objects. If you are only creating a single image, it isn't any harder to set the properties on the one you just made without messing around with templates.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com