[futurebasic] Button redraws & backgrnds with Jim's CDEF (revisited)

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: Ryan Michael McGann <mcrm@...>
Date: Tue, 18 Nov 1997 10:46:28 -0500 (EST)
OK, Mel & Staz, I tried to fix my code (mistake #1). The problem if you
don't remember was that the buttons created with FB statements that
utilize Jim's CDEFs (Mel knows) don't redraw properly when they're
clobbered. Namely, they erase whatever pretty ppat is drawn for the
window and use a white background instead. Mel, you may be of better
help. Here's my update function that is called on the raw MacOS

LOCAL FN update (evtMessage&)
        CALL GETPORT (oldPort&)
        CALL SETPORT (evtMessage&)
        FN drawBackground (evtMessage&)
        CALL DRAWCONTROLS (evtMessage&)
        CALL SETPORT (oldPort&)

I know the drawBackground works because without controls it's fine. It's
the controls that mess it up. Am I supposed to do a %EVENT, 0? I tried
this & it just continiously refreshes the window non-stop (without
drawing the background I might add). Mel: is there a special varCode I
am supposed to use for buttons with backgrounds? What gives?

Thanks for the help!