Behavior like that happens in applications, at best, if you launch the alert
from a thread that's not the main thread. If that's the case, there's not
anything you really can do about that other than rewriting your code to bring
up the alert within your main thread, typically via some CarbonEvent posting.
Also, you need to make your message and explanation strings to be Pascal
strings, not C-strings. Pascal strings are explicitly unsigned character
arrays (the zeroth byte goes from 0 to 255 for the length of the string), so
you wouldn't need to do the typecast you're doing in your call. If you're not
familiar with that method of declaration, this is how it would be:
I am porting an old application based on the YAAF multi-platform
framework to Carbon. It displays an alert using StandardAlert;
however, I can't click on the OK button and I have to kill the
application.
Here is a piece of code that exhibits exactly the same behavior.
I saw in a previous post
(http://lists.apple.com/archives/printing/2003/Nov/msg00047.html
) that it is a problem with "with user and bootstrap context".
Unfortunately, that doesn't tell me much, and my app does have to
display such warning dialogs. Anything I'm doing wrong? I'm quite new
to Carbon.
TIA,
J.P.
_______________________________________________
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
_______________________________________________
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