robinson@akira.enet.dec.com (Willard J. Robinson) (06/21/91)
I have a somewhat simple question - can you display an empty Viewer?
I have been hacking a simple editor based on idraw and want a window
that looks like:
_____________________
| menu bar |
|-----------------------|
|f | |
|i | |
|x | viewer |
|e | |
|d | |
| | |
|V | |
|G | |
------------------------
So I constructed a tray as follows:
_tray->HBox(_tray, commands, _tray); // commands is the menubar
_tray->HBox(_tray, hborder, _tray);
_tray->HBox(_tray, post, _viewer, _tray);// post is the fixed VGlue
_tray->VBox(_tray, commands, hborder, post, _tray);
_tray->VBox(_tray, commands, hborder, _viewer, _tray);
and the viewer was set up using:
GraphicView* view = (GraphicView*) _comp->Create(COMPONENT_VIEW);
_comp->Attach(view);
view->Update();
_viewer = new Viewer(this, view, page, grid);// page and grid were set-up also
The problem is that the viewer is not displaying when the window comes up
and after studying the Idraw code for a while I cannot figure out what I
am doing wrong(the example above generates a core dump).
I also tried setting the 'natural size' variables in the Viewer - the frame
of correct size came up and the program promptly crashed.
Since I am an InverViews novice any help would be appreciated.
thanks
Will Robinson
(please followup to this post or send mail to robinson@asds.enet.dec.com)
digital equipment
stow, ma