|
From: | Helge Hess |
Subject: | Re: Renaissance menus on OS X ? |
Date: | Tue, 07 Jan 2003 14:59:04 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 |
Nicola Pero wrote:
Currently gsmarkup files are exact descriptions of the resulting tree, but they could be templates which *create* the exact descriptions.Oh yes - you know I *love* this kind of stuff :-)
Me too, but the major difficulty is to transport the Web/HTML templating idea to an AppKit framework in a useful way. But we'll manage that ! ;-)
<hbox> <var:foreach list="MyBundleManager.allPrefBundles" item="item"> <button var:label="item.bundlePath.stringByDeletingLastPathComponent"/> </var:foreach> </hbox>
..
Just to make sure - I suppose you are using 'xxx.yyy' to mean 'the result of [xxx valueForKey: @"yyy"]' ? (or better, 'xxx.any.thing' to mean the result of '[xxx valueForKeyPath: @"any.thing"]').
In this case, yes. What is bound is actually dependend on the concrete "WOAssociation" subclass. At Skyrix we have an XML implementation of .wo files (called .wox ;-). It maps the XML namespace to a concrete assocation class, so you can do:
<button var:label="item.name"/> => WOKeyPathAssociation <button js:label="1+3"/> => WOJavaScriptAssocation <button const:label="Blah!"/> => WOValueAssociation Very flexible.BTW: The difficult thing with associations is change tracking. I'll explain that to you at the FOSDEM, too difficult to write the problem down ;-)
Helge
[Prev in Thread] | Current Thread | [Next in Thread] |