🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.programmer.help
4 messages
4 total messages Started by Stephen Kay Wed, 05 Apr 2006 19:36
Porting OS9 PP app, LWindow updateRgn always empty
#42
Author: Stephen Kay
Date: Wed, 05 Apr 2006 19:36
36 lines
2675 bytes
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,

-- 
Stephen Kay
Karma-Lab   sk@karma-lab.NOSPAM.com
                        ^^^^^^^
Porting PP App to Carbon, can't launch >>CarbonLib<< not found
#43
Author: Stephen Kay
Date: Fri, 07 Apr 2006 05:41
31 lines
2447 bytes
I am porting a PowerPlant app to Carbon, I am now at the point where I am
trying to link against CarbonLib, on OS 9.2.2.

The app links, but when it launches, it immediately quits with an error of
"Could not launch "app" because the library ">>CarbonLib<<" was not found.

Of course, I have CarbonLib 1.6.1 installed in my Extensions.

I have searched the archives:

I've seen references to needing a SIZE resource with ID -1.
- I have that.

I also have all the bits set for AcceptSuspendResumeEvents, canBackground,
doesActivateonFGSwitch,is32bitCompatible,isHighLevelEventAware,
localAndRemoteHLEvents.

I saw mention of not enough memory allocated to the app. I have plenty.

Someone else said this might be caused by also having InterfaceLib in the
project. Well, I can't remove InterfaceLib, or I get a zillion other link
errors at this point in the port. However, that is the only other lib still
being included.

Any ideas?

Thanks,
Stephen Kay
Karma-Lab   sk@karma-lab.NOSPAM.com
                        ^^^^^^^
Re: Porting PP App to Carbon, can't launch >>CarbonLib<< not found
#44
Author: pwasson
Date: Fri, 07 Apr 2006 23:07
16 lines
2220 bytes
Stephen Kay wrote:
> I am porting a PowerPlant app to Carbon, I am now at the point where I am
> trying to link against CarbonLib, on OS 9.2.2.
>
> The app links, but when it launches, it immediately quits with an error of
> "Could not launch "app" because the library ">>CarbonLib<<" was not found.

> Someone else said this might be caused by also having InterfaceLib in the
> project. Well, I can't remove InterfaceLib, or I get a zillion other link
> errors at this point in the port. However, that is the only other lib still
> being included.

They're right. You can't link against both InterfaceLib and CarbonLib.
Remove InterfaceLib and then solve the link errors; they're probably
things that don't exist anymore in Carbon that you have to call
replacements for.
Re: Porting PP App to Carbon, can't launch >>CarbonLib<< not found
#45
Author: Stephen Kay
Date: Wed, 12 Apr 2006 19:02
26 lines
2545 bytes
in article 1144451243.955555.248090@g10g2000cwb.googlegroups.com,
pwasson@mac.com at pwasson@mac.com wrote on 4/7/06 7:07 PM:

> Stephen Kay wrote:
>> I am porting a PowerPlant app to Carbon, I am now at the point where I am
>> trying to link against CarbonLib, on OS 9.2.2.
>> 
>> The app links, but when it launches, it immediately quits with an error of
>> "Could not launch "app" because the library ">>CarbonLib<<" was not found.
> 
>> Someone else said this might be caused by also having InterfaceLib in the
>> project. Well, I can't remove InterfaceLib, or I get a zillion other link
>> errors at this point in the port. However, that is the only other lib still
>> being included.
> 
> They're right. You can't link against both InterfaceLib and CarbonLib.
> Remove InterfaceLib and then solve the link errors; they're probably
> things that don't exist anymore in Carbon that you have to call
> replacements for.

Thank you for confirming this. That's now what I'm doing.

-- 
Stephen Kay
Karma-Lab   sk@karma-lab.NOSPAM.com
                        ^^^^^^^
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads