realbasic-nug
[Top] [All Lists]

Re: How to draw my subclass canvas

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: How to draw my subclass canvas
From: c hinkle <chuckbo at mac dot com>
Date: Fri, 25 Apr 2003 06:05:07 -0500
>> When I was using the Canvas object, its Paint method was
>>   if dd <> nil then
>>       g.drawobject dd,0,0
>>   end if
> 
> Well, then the simplest explanation is that dd = nil.  Did you test
> this by putting a breakpoint on the "if" statement above, and looking
> at the properties of the object?
> 
>> Now, the window contains the subclass, and the DD property was moved to the
>> subclass, and the Paint method was moved to the subclass. But the
>>     self.canvas1.refresh
>> doesn't branch to the canvas1 (the subclass) Paint method.
> 
> How are you determining that?  You actually put a breakpoint in the
> Paint event?  What about adding a MsgBox or Beep command, just to be
> sure?


Yes, I have a breakpoint on the if statement. That Paint method is never
called.

I tried Mars' suggestion just now -- try changing it from a method to an
event, but I'm not able to enter the code. What I mean is I open the
subclass and add a new event. I name it Paint, and I specify the parameter
    g as Graphics
I close the window and click on Paint under New Events, but it's empty. I
don't see a Sub and End Sub statement like I'd expected, and even if I click
over in the righthand pane, my cursor doesn't change to the text insertion
mode. I can't enter any code for my new event.

chuck 


---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>

Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>

Subscribe to the digest: 
<mailto:realbasic-nug-digest at lists dot realsoftware dot com>
.


<Prev in Thread] Current Thread [Next in Thread>