🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #37685

InterViews

#37685
From: Gangal Sameer H
Date: Mon, 05 Mar 1990 19:07
56 lines
1925 bytes
I am using interviews 	and  have some problem making a part of my
code work.

As a matter of fact I am having problems with updating a object called
  View which is derived from GraphicBlock. I capture an event 
and try to append a graphic(rectangle)  to the picture( which was 
passed to the constructor of View) and then call Update on the view. 
It gives me an error at Update.  

I even tried a simple program to insert  a rectangle into a View( inherited 
from GraphicBlock)   

class Minidraw;

class View:public GraphicBlock{
public:
        View(Rect*);
};
class Minidraw:public MonoScene{
public:
        Minidraw();
        Interactor * Interior(View *);
};
Minidraw::Minidraw()
{
        Rect * rect = new Rect(0,0,10,10);
        rect->SetColors(pblack, pwhite);
        rect->SetBrush(psingle);
        rect->SetPattern(psolid);
        rect->FillBg(true);
	View * view = new View(rect);
        Insert(new Frame(Interior(view)));
}

View::View(Rect * r):(nil, r)
{
	input = new Sensor(updownEvents);
        shape->width = round(20*cm);
        shape->height = round(10*cm);
}

Interactor * Minidraw::Interior(View *v)
{
        return new HBox(v);
}

main( int argc, char **argv){
        World* world = new World("minidraw", argc, argv);
        world->Insert(new Minidraw);
        world->Run();
}

this program gave me a CORE dump when the constructor for
the View was called.

Any kind of help will appreciated  very much.
Technical Details
Message-ID: <6743@cps3xx.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!netnews.upenn.edu!cps3xx!gangal

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!netnews.upenn.edu!cps3xx!gangal
From: gangal@cpsin3.cps.msu.edu (Gangal Sameer H)
Newsgroups: comp.windows.x
Subject: InterViews
Message-ID: <6743@cps3xx.UUCP>
Date: 5 Mar 90 19:07:21 GMT
Sender: usenet@cps3xx.UUCP
Reply-To: gangal@cpsin3.cps.msu.edu (Gangal Sameer H)
Distribution: usa
Organization: Dept. of Computer Science, Michigan State University
Lines: 56