[Dev] CPIA refactoring: eliminating blockName?
Andi Vajda
vajda at osafoundation.org
Thu Dec 1 17:20:34 PST 2005
The 'itsName' of an item only has to be unique within its siblings.
The reason itsName was not used is that we had decided a long time ago that
itsName was for debugging only and void of any semantics.
Andi..
On Thu, 1 Dec 2005, Bryan Stearns wrote:
> I used to wonder this too: as I understand it, we might have more than one
> copy of a block hierarchy around, yet need to find a block by name. I think
> itsName has to be unique, but blockName doesn't.
>
> 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
>>
>
>
More information about the Dev
mailing list