Changes in superclass are not reflected in subclasses. 
Author Message
 Changes in superclass are not reflected in subclasses.

Quote:
> > I have encountered a problem whereby I have make some changes to some
> > components (eg. menu bar) in the UI superclass, then I versioned and
> > released it. In the UI subclasses, I can't seem to see the changes. I'm not
> > sure whether the changes of UI components made in the superclass will be
> > inherited to its subclasses. Is there a way that I would be able to see the
> > changes in the subclasses?
> Unfortunately, in VisualAge, there is no Visual inheritence.
> There is in WindowBuilder, and there is in VisualWorks.
> You can build your windows programmatically to get inheritence if you really
> like. We use visual parts as templates for building a window.

... and that is why we adopted as a standard not to express behavior
using "graphical programming" i.e. connections or links that the
VisualAge IDE allows developers to use.  If in the superclass UI you
had a button and you create subclasses UIs, and then, oops, you
realized you forgot to put a connection between the button's click
event and some other action, you go back to edit graphically the
superclass UI, but then, surprise surprise, when you run the subclass
UI, pressing that button doesn't do anything.  If instead the
superclass has that behavior expressed textually in code, as for
example by having this line in #finalInitialize, "self myButton
abtWhen: #click perform: (#myButtonPressed asMessageTo: self)", then
there would be no problem.

the keyword here is "snapshot":  when subclass UIs are created in the
Visual Organizer, they take a once-at-creation-only copy of the
superclass, and any changes added later to the superclass will never
be transfered to the subclasses.



Tue, 20 Apr 2004 08:30:42 GMT  
 Changes in superclass are not reflected in subclasses.

Quote:
> > Unfortunately, in VisualAge, there is no Visual inheritance.

"Visual" classes are not different from the other classes. You have the same
inheritance mechanism in the whole Smalltalk hierarchy.
    The problem You have is not about inheritance, Its about the
composition editor, The graphical tool for building GUIs in VAST. It creates
a method named #abtBuildInternals containing the code for drawing the GUI
and making connections between attributes,  events, actions and scripts. The
problem is: When You create a VisualPart A, as a subclass of another
VisualPart B, the composition Editor creates the B>>#abtBuildInternals, that
overwrites the method A>>#abtBuildInternals ... so... B losses A widgets and
connections.....
                                Claudio


Quote:
> > > I have encountered a problem whereby I have make some changes to some
> > > components (eg. menu bar) in the UI superclass, then I versioned and
> > > released it. In the UI subclasses, I can't seem to see the changes.
I'm not
> > > sure whether the changes of UI components made in the superclass will
be
> > > inherited to its subclasses. Is there a way that I would be able to
see the
> > > changes in the subclasses?

> > Unfortunately, in VisualAge, there is no Visual inheritence.
> > There is in WindowBuilder, and there is in VisualWorks.
> > You can build your windows programmatically to get inheritence if you
really
> > like. We use visual parts as templates for building a window.

> .... and that is why we adopted as a standard not to express behavior
> using "graphical programming" i.e. connections or links that the
> VisualAge IDE allows developers to use.  If in the superclass UI you
> had a button and you create subclasses UIs, and then, oops, you
> realized you forgot to put a connection between the button's click
> event and some other action, you go back to edit graphically the
> superclass UI, but then, surprise surprise, when you run the subclass
> UI, pressing that button doesn't do anything.  If instead the
> superclass has that behavior expressed textually in code, as for
> example by having this line in #finalInitialize, "self myButton
> abtWhen: #click perform: (#myButtonPressed asMessageTo: self)", then
> there would be no problem.

> the keyword here is "snapshot":  when subclass UIs are created in the
> Visual Organizer, they take a once-at-creation-only copy of the
> superclass, and any changes added later to the superclass will never
> be transfered to the subclasses.



Wed, 21 Apr 2004 03:11:12 GMT  
 Changes in superclass are not reflected in subclasses.

Quote:
> > > Unfortunately, in VisualAge, there is no Visual inheritance.

> "Visual" classes are not different from the other classes. You have the
same
> inheritance mechanism in the whole Smalltalk hierarchy.
>     The problem You have is not about inheritance, Its about the
> composition editor, The graphical tool for building GUIs in VAST.

*One of* the tools for building GUIs in VAST. Don't forget WBPro...

    http://www.instantiations.com/sts/wbp.htm

...which also nicely supports visual inheritance and subclassing.

-Eric Clayberg
 Sr. Vice President of Product Development
 Instantiations, Inc.

 http://www.instantiations.com



Thu, 22 Apr 2004 10:36:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. color ramp not changing to reflect interactive seting of hi/low color boxes

2. How to copy a subclass from a superclass?

3. Envy subclasses for superclass access

4. Envy subclasses for superclass access

5. Invoking a subclass's method on its superclass's instance

6. Refreshing a DropList Queue to reflect a filter change

7. windows-cmd shell doesn't reflect _winreg changes

8. I am not deaf, but am I mute?

9. Using methods in the superclass' superclass

10. Change superclass at runtime

11. Proposed superclass is not subclassable

12. Changing an Instance to another subclass

 

 
Powered by phpBB® Forum Software