From: Scott L Holmes Date: 2006-05-18T02:26:47+09:00 Subject: Re: Need help designing UI Ryan Leavengood wrote: > So for you example, the "Close Window" toolbar button would have a > message with an associated CLOSE command constant, with the target of > the message being the window. When the button is clicked, the CLOSE > message will be sent to the window and the handling of that message > will close the window (of course.) The nice thing about this is that > the CLOSE message could be used from other places without having to > change how it is handled within the window. Thanks for replying Ryan. This got me thinking about some design goals. Your description sounds like MS Windows, in any case, it implies some sort of Windowing management. What I'm building is pretty high level and the overall impetous of the project is not the UI - more of a library kind of thing. The UI is sweetness? So to keep things simple, I'm thinking I need to concentrate on two things. A command constant. Definitely warming to this idea. The constant as in your description is merely a token to pass around. Some form of context. A toolbarbutton is on a toolbar is on a viewer. In a generic way, when the viewer gets created, it would register a context which could be a simple random number. All sub-parts get the context? When the toolbarbutton fires it broadcasts a command constant and the context? Thinking out loud. Does avoid the references but now I gotta pass around a random number. In Ruby - that's a reference too. hmmmmm. -- Posted via http://www.ruby-forum.com/.