Article View: comp.windows.interviews
Article #188A question
From: Irina Bam
Date: Thu, 06 Aug 1992 19:28
Date: Thu, 06 Aug 1992 19:28
25 lines
1488 bytes
1488 bytes
Can anyone please help me with the following question regarding Unidraw? What should I do to create and draw an object (say, a line) using a command rather than a tool? I can create a LineComp and LineView but then how should I include them into the hierarchy? I thought they should be children of the editor's component, but Append (a function that appends a new child) is a private function. So, it seems it is not intended to be used this way. Also, LineComp and LineView have a graphic object that also may have a parent. What should it be and how to set it? Another, more C++ question is this. When you do GraphicComp* comp = GetEditor()->GetComponent(); comp->Interpret(command); the function that gets executed is GraphicComps::Interpret. But GetComp returns Component, and the actual variable _comp that it returns is declared as GraphicComp. So, I would expect the function GrachicComp::Interpret to get executed, not GraphicComps::Interpret. What's the catch? Thanks for your help. Irina.
Technical Details
Message-ID:
<1992Aug6.192808.1757@beaver.cs.washington.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!darwin.sura.net!mips!sdd.hp.com!caen!batcomputer!cornell!uw-beaver!irinaShow Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!darwin.sura.net!mips!sdd.hp.com!caen!batcomputer!cornell!uw-beaver!irina From: irina@cs.washington.edu (Irina Bam) Subject: A question Message-ID: <1992Aug6.192808.1757@beaver.cs.washington.edu> Sender: news@beaver.cs.washington.edu (USENET News System) Organization: Computer Science & Engineering, U. of Washington, Seattle Date: Thu, 6 Aug 92 19:28:08 GMT Lines: 25