Article View: comp.windows.interviews
Article #260Problems in Unidraw
From: Anthony Utano
Date: Wed, 08 Apr 1992 06:28
Date: Wed, 08 Apr 1992 06:28
41 lines
1533 bytes
1533 bytes
Hi Everybody
We are creating a graphical editor using Unidraw, and
and a point we have access to a COMPONENT_VIEW. From
this we want to find the viewer that this view
is in.
In grview.c ( from the library ), there is this member
function of GraphicView, which is advertised as
"Return the viewer( if any) that displays the view )"
The actual member function is as follows...(From lib)
Viewer* GraphicView::GetViewer () {
GraphicView* parent = (GraphicView*) GetParent();
if (parent == nil) {
return nil;
} else {
return parent->GetViewer();
}
}
Now this will always return nil, as it is
'recursive' UNLESS there is some GraphicView which explictly
has overloaded GetViewer to return a useful value. [ y/n
am I on the right track ?]
This seems a little unusual, I would think that a view
should always be able to find its viewer...
The system I am working on is similar to Idraw, I suspect
that the top level view is suspect ??
Any clues, is GraphicView::GetViewer wrong?
Thanks in advance,
Anthony Utano
Email: a.utano@trl.oz.au
Technical Details
Message-ID:
<1992Apr8.062804.14719@trl.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bruce!trlluna!titan!cassiopeia!utanoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bruce!trlluna!titan!cassiopeia!utano From: utano@cassiopeia.trl.OZ.AU (Anthony Utano) Newsgroups: comp.windows.interviews Subject: Problems in Unidraw Keywords: InterViews Unidraw Message-ID: <1992Apr8.062804.14719@trl.oz.au> Date: 8 Apr 92 06:28:04 GMT Sender: news@trl.oz.au (USENET News System) Organization: Telecom Research Labs, Melbourne, Australia Lines: 41