Forum Navigation
You need to log in to create posts and topics.

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

Posted by: mcrm <mcrm@...>

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
_updateEvt:

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

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!

Ryan