Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RunAppModalLoopForWindow() returns error under Panther, sometimes



If the bug is related to the process being hidden, you
could call SetFrontProcess() on yourself to ensure your
application is not hidden when the dialog appears.

Kevin G.



Good afternoon,

I realize that the list has been dominated by Leopard issues of late, so I
thought I could mix it up with a problem on Mac OS X 10.3.9 (Panther). <g>


In testing, somebody with an older system is reporting that our application
does not start. Our Panther test system, running the same version (10.3.9)
on a G4 Mac Mini, works just fine. (The failing system is a much slower
PowerBook G4 with half the memory, if that matters.)


With an instrumented build, we determined that a critical modal dialog box
is not displaying correctly. The RunAppModalLoopForWindow() function is
returning error code -5615 (windowWrongStateErr). Even though this is not
a documented return code for that function, everything I can find (not
much) says that this could happen if the target window is hidden, and I was
able to verify this by deliberately hiding the dialog box.


The OS X 1.4 release notes suggest that this is a known bug with this:

"RunApplicationModalLoopForWindow[sic] no longer returns
windowWrongStateErr if the process is hidden (3703740)."

(http://developer.apple.com/releasenotes/Carbon/RN-HIToolbox/index.html )

My code, literally, says:

   ShowWindow ( Dialog );
   SelectWindow ( Dialog );

   _Error = RunAppModalLoopForWindow ( Dialog );

I do not know how the dialog box could be hidden at this point ('Dialog' is
a WindowRef from a correctly loaded Nib), and I cannot figure out why it
would work on one system but fail on another. I even tried using
TransitionWindow() as an attempt to assure that the window was visible.


Does anybody know any method to work around this issue (or see a problem
with my implementation)?


This game is supposed to ship next week, and it would be a shame to not
(officially) support OS X 10.3 due only to this bug.


Thanks for any help you can provide.


Gregg Seelhoff, Technical Director -- Digital Gamecraft (tm) SophSoft, Incorporated "Nothing short of a Masterpiece." http://www.sophsoft.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >RunAppModalLoopForWindow() returns error under Panther, sometimes (From: Gregg Seelhoff <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.