[comp.windows.interviews] IV 3.0B ibuild questions

tang@braun.stanford.edu (Steve Tang) (05/30/91)

>	I have been using IV 3.0 for several weeks and find ibuild to be
>a very usefull tool.  I have come across a problem and have some questions.
>	The problem involves dissolving scene's.  If you try to dissolve
>a box (V or H) just inside of a scene class the system does not let you. 
>(Actually it allows you to carry out the action it just does not seem to 
>do anything.  Once you have done this if you try to save or build the 
>interface you get a segmentation fault.  Since running into this problem 
>I have figured out that dissolving the composition just inside the scene 
>may not be such a good idea but the segmentation fault is a stiff penalty.

There's only one case where ibuild forbids you from dissolving scenes
(boxes etc) and that is if you're in a Frame, other than that if you narrow
into an HBox for instance, you should be able to dissolve as
usual.  The segmentation fault is related to ungrouping leave level
elements and has been fixed in the next release.

>	I have a copy of the ibuild reference manual that came with the 3.0B
>distrubution (16 APR 91).  This has been usefull as a tutorial to get started
>but now I need a detailed manual which outlines the exact actions of all of
>the options in ibuild.  Does such a manual exist and if not is there a plan
>to write one.

The manual is the best we've got so far.  For now you'd have to send
mail to me or interviews on more specific questions.

>	Finally I have a question concerning the message class.  I would 
>like to be able to use ibuild to define a general dialog for error messages.
>Once created this composit class would be usable for most all error messages 
>if the message that it displayed could be changed after an instance of 
>the class was created.  Unfortunatly the message class does not make the 
>text public and does not have a method to change it.  Is there a reason 
>for this? ( I realize that I could inherit from message and make my own 
>message class or modify the Interior function when the dialog is created,
>But both of these solutions require the core class to modified.  I would 
>like to come up with a solution which prevents the need to modify the 
>core class.

The correct solution is to allow subclassing for any objects including
message objects, which is supported by ibuild's next release.  For
now, what you can do is to put a piece of default message in an
exported HBox, call it _insertpt, then you can Insert() new messages
dynamically.  For instance:

Hole::Hole(const char* name) : Hole_core(name) {
    _hparent->Propagate(false);
}

void Hole::Handle(Event& e) {
    if (e.eventType == DownEvent) {
        Message* msg = new Message("Hello");
        _insertpt->Insert(msg);
        _insertpt->Change(msg);
    }
}

_hparent is _insertpt's parent (e.g. a VBox) which is exported to the
Hole subclass object.  Specifying _hparent->Propagate(false) limits
the change in shape the new message would have on the window.