|dynamical CreateFeatures ? [message #710172]
||Thu, 04 August 2011 19:27
| Hernan Gonzalez
Registered: October 2010
Location: Buenos Aires, Argentina
Motivation: in the Graphiti tutorial in the Help, the creation of each object (Eclass) corresponds to a (say) MyCreateFeature class, there is a single class, and a single instance of this class, and a single create icon in the palette; and the "name" of each create object is filled by the user in a creation popup. Suppose that, in addition to that, I wish to have some feature to create some set of Eclass objects with some predetermined names |
I'd wish to avoid to code a separate CreateFeature class for each case.
I wonder, if, for example, I could add some "name" property to my MyCreateFeature class, and create several instances of this class to return them in my MyFeatureProvider.getCreateFeatures() , so that each instance would have a different behaviour. Would this be impossible, or convoluted?
In particular, it's not clear for me which is the contract of the IFeatureProvider.getCreateFeatures() method: when is this -internally- called? Only for the palette? Must this be in sync with the palette? Can I have several instances of the same class?
Another issue (more difficult, I guess) would be to make those instances dynamic; for what I see, the contents of the palette MyToolBehaviorProvider.getPalette() seems to be static, is that so?
[Updated on: Thu, 04 August 2011 19:29]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01757 seconds