On Oct 20, 2006, at 3:41 PM, Frank Condello wrote:

On 20-Oct-06, at 3:32 PM, Barrie Jones wrote:

On Oct 20, 2006, at 2:28 PM, Mars Saxman wrote:


On Oct 20, 2006, at 11:14 AM, Barrie Jones wrote:

Although TargetPowerPC was flagged as an error when running "Check Project for Errors" it was accepted when the app was compiled.

That is clearly a bug in the "Check Project" code. It'd be great if you could file a bug report.

Now there is another Error:

Parameters are not compatible with this function:
return callGL(gl_ctx, windowptr)

What is the definition of "windowptr"?

I don't know. Someone else wrote this code for me. I am trying to contact the person. Since I don't understand this code I am hoping some experts will give me some guidance. The most frustrating thing is that everything worked perfectly in RB 5.5
Barrie

"windowptr" looks like an error in the original code... I didn't write it, but whoever did probably abandoned or otherwise forgot to update the Classic target so the error wasn't caught until you changed the target constants and tried to compile it on Mac OS X. That bit of code was never meant to run on Mac OS X, and if it does, it _will_ crash

I just got this reply from the guy who wrote the code. He in turn got help from many other sources:

Not sure where it is defined. I read where Joe said in OS X that Self.MacWindowPtr is getting the right port, vs the different one used in OS 9. (where just a GetPort would work)

And that they were defined as same?

Perhaps this thread might be of aid. I really don't understand what they would have changed in the newer version of RB that would break something like this?

http://www.monkeybreadsoftware.de/listarchive-realbasic-nug.old/ 2002-09/thread-07_532.shtml

A snip is below.

Did they issue a compatibility/changes list? (might help to know if that is the case)

The language ref for WindowPtr just says "When passing a window to a declare, use a WindowPtr, not a Window object."

So I am not sure it is defined anywhere otherwise, than the declare?

Somebody must have changed what WindowPtr means in RB 2006 recently, or how it is gained, when sent to a declare in OS X? Because if your code works in RB2005, and RB 5.5, then seems to me its a bug in RB perhaps?

Robert


Re: MacWindowPtr... what is it?
Date: 08.09.2002 00:19 (Sat, 7 Sep 2002 16:19:32 -0700)
From: Joseph J. Strout
At 4:11 PM -0700 9/07/02, David Newberry wrote:

>>GetPortBitMapForCopyBits( GetWindowPort(self.MacWindowPtr) )
>
>Yay! :D This worked perfectly... thanks Joe!

Great!

>>>>It's a WindowPtr in classic, or WindowRef in Carbon.
>>>
>>>Yes... :) But according to my header files:
>>>typedef WindowPtr WindowRef;
>>
>>Right, these are two names for the same thing.
>
>Now I'm *really* confused. :P GrafPtr tindowPtr pidowRef <> GrafPtr?

Nope. GrafPtr <> WindowPtr. And WindowPtr windowRef. (Therefore,
GrafPtr <> WindowRef.) All statements are true under Carbon. Under
Classic, all three types are pretty much equal (i.e., a WindowPtr or
WindowRef is a subclass of a GrafPtr), which is why it's easy to
write code that works under Classic but breaks under Carbon.

> I am pretty obviously missing something. :) But it's not a big
>deal... I'll just try to remember that I have to stop thinking of
>WindowRefs and GrapfPtrs being the same thing.

Yep, that's the important thing.

Cheers,
- Joe

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to