[futurebasic] RE: [FB] invisible window contents

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2001 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <wedwards@...>
Date: Wed, 14 Mar 2001 04:41:59 -0500
Yep, I'm restoring the port correctly.  I've been at it all night, trying to
figure out what the cause and solution is.  I cut my project down to the
absolute minimum in order to illustrate the problem.  The problem only
occurs when one particular function is called which flashes the messages and
restores the port.

If anyone is feeling spunky and likes their oatmeal lumpy, (you might even
like your grits lumpy) I have very small project you can feel free to kick
around.  I dont know if this is a bug on my end, which is most likely is or
a hidden bug in the runtime but either way the problems is kicking my butt.

I've massaged this thing to death, copying the gray region and restoring it,
copying the clip region and restoring it, trying to manipulate the visible
region.  Everything is present, just invisible.


W.

-----Original Message-----
From: Robert Purves [mailto:robert.purves@...]
Sent: Wednesday, March 14, 2001 12:03 AM
To: futurebasic@...
Subject: Re: [FB] invisible window contents


>I have a project that captures a small portion of the screen, flashes a
>message, then restores the section of the screen.  This is all done with
>gWorlds. The messages are copybits directly the desktop port and then the
>section of the screen restored.  The problem I have is that any FB window
>that is opened after the messages are flashed are empty.
>
>The newly built windows are supposed to have edit fields, buttons and
lists.
>Ok, if that wasnt strange enough, after some poking around I figured out
>that the contents *are* there but they are invisible. If I click the mouse
>where I know a button should be, my dialog event occurs.

Could it be that the port is not restored after you finish your GWorld
stuff? The skeleton should resemble this:

dim @ windowGW as ptr, screenDevice as handle
dim myGW as ptr
dim err  as OSErr
window 1
GetGWorld( windowGW, screenDevice ) // remember port/device
err = fn NewGWorld( myGW, ... )
SetGWorld( myGW, 0 )
//... do stuff
SetGWorld( windowGW, screenDevice ) // restore port/device
// now OK to close window 1


Robert P.



--
To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>