Stephen Kay
2006-04-05 19:36:56 UTC
I'm attempting to follow the instructions in Apple's Carbon Porting Guide,
to port an OS9 PowerPlant app to OSX (using PP 2.2.2). I'm at the first
stage, where you try to carbonize the code, while linking to your normal
libraries, plus CarbonAccessors.o.
I have #defined:
#define ACCESSOR_CALLS_ARE_FUNCTIONS 1
#define OPAQUE_TOOLBOX_STRUCTS 1
...and I have fixed all the errors related to the opaque structures etc, and
am able to link and run.
However, I'm having a problem where, in PowerPlant's LWindow::UpdatePort(),
the updateRgn for every single window in the application is empty when
UpdatePort() is called, and so it exits and nothing is drawn in any of the
windows.
It calls ::GetWindowRegion(mMacWindowP, kWindowUpdateRgn, updateRgn).
Universal Headers states that this function is supposed to be available in
CarbonAccessors.o. But it always is returning an empty region.
If I comment out the test for ::EmptyRgn(updateRgn), then the rest of the
code in LWindow::UpdatePort() is performed, and they all draw as per normal.
Obviously, this isn't the fix I need. ;-)
Anybody hear of this problem before? I've been trying to track what might be
causing this, and I don't have a clue yet.
Thanks,
to port an OS9 PowerPlant app to OSX (using PP 2.2.2). I'm at the first
stage, where you try to carbonize the code, while linking to your normal
libraries, plus CarbonAccessors.o.
I have #defined:
#define ACCESSOR_CALLS_ARE_FUNCTIONS 1
#define OPAQUE_TOOLBOX_STRUCTS 1
...and I have fixed all the errors related to the opaque structures etc, and
am able to link and run.
However, I'm having a problem where, in PowerPlant's LWindow::UpdatePort(),
the updateRgn for every single window in the application is empty when
UpdatePort() is called, and so it exits and nothing is drawn in any of the
windows.
It calls ::GetWindowRegion(mMacWindowP, kWindowUpdateRgn, updateRgn).
Universal Headers states that this function is supposed to be available in
CarbonAccessors.o. But it always is returning an empty region.
If I comment out the test for ::EmptyRgn(updateRgn), then the rest of the
code in LWindow::UpdatePort() is performed, and they all draw as per normal.
Obviously, this isn't the fix I need. ;-)
Anybody hear of this problem before? I've been trying to track what might be
causing this, and I don't have a clue yet.
Thanks,
--
Stephen Kay
Karma-Lab ***@karma-lab.NOSPAM.com
^^^^^^^
Stephen Kay
Karma-Lab ***@karma-lab.NOSPAM.com
^^^^^^^