Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: SetPort (NULL)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SetPort (NULL)



On 31/07/2003 00:53, Sean Mc Laughlin wrote:

> On Wednesday, Jul 30, 2003, at 21:12 Europe/Dublin, Mike Kluev wrote:
>
>> that the current port is doomed is not necessarily a problem; see
>> below.
>>
>> Host()
>> {
>> GetGWorld(&savedPort, &savedDevice);
>> SetGWorld(pluginWindow, NULL);
>> (*plugin)();
>> // current port might be doomed at this point
>> // but this is not a problem
>> SetGWorld(&savedPort, &savedDevice);
>> }
>
> I agree, in a perfect world where all host apps will behave correctly
> this would make perfect sense.
> So what do you say to a user who claims your buggy plug-in is crashing
> their expensive host app?
> Somehow I can't imaging Adobe/Quark/Microsoft dropping everything to
> save your reputation.

This works in real life as well. Even in host doesn't follow the
above rule, it will work if you do it in plugin:

Plugin()
{
GetGWorld(&savedPort, &savedDevice);
SetGWorld(pluginWindow, NULL);
...
if (ok pressed) DisposeWindow(pluginWindow);
SetGWorld(&savedPort, &savedDevice);
}

> Also, are you suggesting that I just ignore Apple's directive?

Do not blindly follow any directives regardless of the source.

Mike
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: SetPort (NULL) (From: Sean Mc Laughlin <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.