[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu (Was: Re: Unimplemented AppKit classes)

From: Nicola Pero
Subject: Re: Menu (Was: Re: Unimplemented AppKit classes)
Date: Sat, 25 Jan 2003 02:21:45 +0000 (GMT)

> > I used '#' because it was remining me of
> ..
> >   Go up the page to the <a href="#index">index</a>.
> >  </body>
> > </html>
> > 
> > but probably any other syntax would have been good as well.
> BTW: We are using XML namespaces for this. This has the advantage that 
> the processing is already done by the XML parser (and it can be 
> validated using XML-schema).
> It's also quite flexible since you can attach multiple semantics to a 
> tag, eg:
>    <button js:action="doIt()"/>
>    <button objc:action="doIt:"/>
>    <button notification:action="NSDoIt"/>
> etc. (we use it to attach different WOAssociation subclasses to a WO 
> binding)

I like this suggestion of using namespaces, and thought it could be added
later as an extension.

I'd prefer to keep a basic simple format - as easy and friendly as
possible - with no namespaces.

But extendable.  If the basic simple format uses no namespaces, then it's
quite natural to associate each extension we add to Renaissance (either in
the main Renaissance, or in a loadable bundle) with a new namespace.


About the point of references to objects, at the moment we do

 <window delegate="#NSOwner"/>

to have the window delegate set to the NSOwner.  I think, reading in
between your lines and trying to extract your suggestions, you'd probably
suggest that we use

 <window outlet:delegate="NSOwner"/>


Hmmm.  I don't think a XML tool can validate the fact that 'NSOwner'
points to something, because there is no tag with id 'NSOwner' in the
file.  The code loading the file might add arbitrary objects to the
context table ('NSOwner' is just a default one), so an XML tool can't
really validate those as valid references to ids anyway.

There is an advantage in clarity, maybe, and not using '#' in this
`unofficial' way.  I find it somewhat more cumbersome, with longer
attribute names.  Maybe it should be supported as an alternative syntax.  
Not sure, I'm tempted to not change anything unless I'm sure the change is
for the better :-)  If you have some convincing arguments for writing
<window outlet:delegate="NSOwner"/> instead of <window
delegate="#NSOwner"/>, please let me know.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]