• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSColorPanel and close box
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColorPanel and close box


  • Subject: Re: NSColorPanel and close box
  • From: Matthias Schmidt <email@hidden>
  • Date: Thu, 01 Oct 2015 18:30:37 +0900

> Am 30.09.2015 um 17:09 schrieb Matthias Schmidt <email@hidden>:
>
>
>> Am 30.09.2015 um 16:11 schrieb Jens Alfke <email@hidden>:
>>
>>
>>
>>> On Sep 30, 2015, at 12:04 AM, Matthias Schmidt <email@hidden> wrote:
>>>
>>> while ([NSColorPanel sharedColorPanelExists]) {
>>>      PA_Yield();
>>>  }
>>
>> Yikes! That looks very suspicious. You shouldn't be running loops like that in a Cocoa app. AppKit is event driven, so you handle a single event and return.
>
> there is PA_RunInMainProcess((PA_RunInMainProcessProcPtr)… which would run the panel as modal dialog, that would be one possible approach I guess.
> So I need to redesign my code and open the panel like this:
> NSInteger result = [ panel runModal ];

it looks like this approach is not working with NSColorPanel it just makes buummm …

so I need to go back to the original approach and find a way how to make these buttons work …

cheers
Matthias



>
> Another would be to split the tasks, like open panel and get panel values and close the thing, which would require to return a reference to the panel to 4D.
>
> I have to think about that.
>
>
>>
>> It sounds like PA_Yield is running the run loop modally, which would explain why the color panel won't work. If that’s the way their plugin API works, it's got some problems.
>
>
> it just keeps the current 4D process away from doing anything.
>
>>
>> (Also, why did you take this off-list? Now no one else can comment.)
> (you replied directly to me and I just hit reply ;-)
>
> Matthias
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSColorPanel and close box
      • From: Matthias Schmidt <email@hidden>
  • Prev by Date: Re: How to install 10.11 ?
  • Next by Date: Re: How to install 10.11 ?
  • Previous by thread: Re: How to install 10.11 ?
  • Next by thread: Re: NSColorPanel and close box
  • Index(es):
    • Date
    • Thread