Re: NewEra vs VB/Delphi
Posted in 1997
Michael Segel <mikey@segel.NO.SPAM.KINGOFMYDOMAIN.SPAM.NO.com> wrote: >> This may not be a good way of coding a window but unfortunately, most >> GUI development tools use this technique i.e. VB, PB, Delphi, Java, >> NextStep, Visual C++, Forte, Smalltalk. The reason for this is that >> the components that appear on a window need to live somewhere. If you >> don't put them in a class, you won't be able to access them. > >Uhm no, NeXTStep/OpenStep does not do it this way. >(Went to NeXTStep Dev camp in '92 ;-) I disagree. Even within NeXTSTEP, you have to define a class or classes to hold references (id) to your instantiated controls. It is quite common to subclass Window and View to hold these. Otherwise you have fat Controller classes and lots of duplicated code when you have common behaviour across windows. >NeXT instantiates the drag'd object. It is not a subclass of the >object. The instantiated object then has the ability to have identity >associated with it. This identity has to be stored somewhere therefore you have to define a class to hold them. In NewEra, all controls have an identity and you can put these references in whatever class or subclass you want. >This is one of my points that New Era stinks. >You specifically have to create a subclass to instantiate one copy >of the window. No you don't with the proviso that all objects have to be sub-classed from ixObject. For example we use a WinControl and TabControl class subclassed from ixObject to manage the GUI part of our app. The ids to all the widgets live inside those two classes. We hardly ever subclass the window. Even if we do, that class is used in many physical windows. All NewEra widgets are first class objects. >What you do create is a controlling object which contains your methods >of control that you wish to enhance. This object can take the delegation >of the said window/button/field objects and give you control. However >from the OS, the object hierarchy is undisturbed. Like button is >within a window which is within the application. NewEra can be used in exactly the same way. But we don't do that because it has handlers which are easier to use. These are finer grained than NS Controllers making their reuse easier. David David W Chan GO5 Limited david@go5.com (work) dwc@cix.compulink.co.uk (home)