`placement` allows you to cause a tag to be laid out in a different location in the view hierarchy than its lexical declaration. The names `parent` and `immediateparent` are pretty bad -- they should be something like `lexicalParent` and `dynamicParent` or `layoutParent`, instead.

Defining your own tag (class) allows you to write constraints easily, without having to resort to the underlying `applyConstraint` machinery. It is straightforward to convert a view heirarchy to a class, and I recommend this as a way to write constraints for tags that you want to dynamically instantiate (over trying to write constraints in Javascript).

I'd need to see more of what you are really trying to do to comment more intelligently.

You can 'get the benefit of constraints' by writing a class and then instantiating the class.
On 2007-07-10, at 06:14 EDT, Robin Sheat wrote:

On Tuesday 10 July 2007 21:51:42 P T Withington wrote:
Are you looking for 'placement'?
I don't think that's quite what I'm after. I want to have a tag not be a child of the lexical parent (i.e. the class that its declaration is contained in), but of some other class which is specified during initialisation. Right now
I'm just saying 'this.thing = new thing(this.parent, {...});' (where
this.parent is what I want it to be a subnode of), but this way I don't get
the benefit of constraints.

--
Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D

Reply via email to