🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.help
Article #42

Porting OS9 PP app, LWindow updateRgn always empty

#42
From: 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
                        ^^^^^^^
Technical Details
Message-ID: <C05993CC.5C2EC%sk@karma-lab.nospam.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!029d7ba7!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 101ec9,40d4aed6fca1bb40,start
X-Google-Thread: f7f77,40d4aed6fca1bb40,start
X-Google-Thread: f635e,40d4aed6fca1bb40,start
X-Google-Thread: 10bcce,40d4aed6fca1bb40,start
X-Google-Attributes: gid101ec9,gidf7f77,gidf635e,gid10bcce,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!029d7ba7!not-for-mail
User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6
Subject: Porting OS9 PP app, LWindow updateRgn always empty
From: Stephen Kay <sk@karma-lab.nospam.com>
Newsgroups: comp.sys.mac.programmer.help,comp.sys.mac.oop.powerplant,comp.sys.mac.programmer.codewarrior,codewarrior.mac
Message-ID: <C05993CC.5C2EC%sk@karma-lab.nospam.com>
Mime-version: 1.0
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
Lines: 38
Date: Wed, 05 Apr 2006 19:36:56 GMT
NNTP-Posting-Host: 68.164.202.200
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread3.news.atl.earthlink.net 1144265816 68.164.202.200 (Wed, 05 Apr 2006 12:36:56 PDT)
NNTP-Posting-Date: Wed, 05 Apr 2006 12:36:56 PDT
Organization: EarthLink Inc. -- http://www.EarthLink.net