[Sorry about that - accidentally hit Send early.]

I used to wonder this too: we might have more than one copy of a block hierarchy around*, yet need to find a block by name within the rendered world. itsName has to be unique (though namespaces provide scoping).

...Bryan

(* imagine two detail views that we've cached, one for Event and one for Message: both have their own instances of the headline block.)

Alec Flett wrote:
Working on the ZaoBao tutorial, and trying to explain the difference between a Block's blockName and its itsName, I'm starting to wonder: why do we have both?

I came up with two reasons:
- easy referencing/lookup of blocks by name.
  But schema.ns() provides easy access to any well-known object by name.
- event dispatching - to dispatch to an event with a given name.
  But again, schema.ns provides easy access.. and besides I think in many cases I think we'd be better off just using SendToBlockByReference and just directly referencing the block.

Thoughts? I can see how blockName was useful at one point, but I think now its purpose has been superceded by schema.ns().

Alec

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "Dev" mailing list http://lists.osafoundation.org/mailman/listinfo/dev



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev

Reply via email to