Re: Open a panel in secondary thread?

2020-03-21 Thread Vassilis via Cocoa-dev
Don't know if this helps you but you can look into dispatch_sync
and  dispatch_async.

Cheers

On Sat, Mar 21, 2020 at 9:16 PM Sandor Szatmari via Cocoa-dev <
cocoa-dev@lists.apple.com> wrote:

> You must run the panel on the main thread.
>
> Sandor
>
> > On Mar 21, 2020, at 3:05 PM, Gabriel Zachmann via Cocoa-dev <
> cocoa-dev@lists.apple.com> wrote:
> >
> > Is it possible to open an NSOpenPanel in a secondary thread?
> >
> > I create the thread like this:
> >
> >directoryScanThread_ = [[NSThread alloc] initWithTarget: self
> >   selector:
> @selector(scanDirectory:)
> > object: nil];
> >[directoryScanThread_ start];
> >
> >
> > But when I do:
> >
> >NSOpenPanel *oPanel = [NSOpenPanel openPanel];
> >
> > it crashes at this point.
> >
> > In the docs, I found a hint that one should use
> >
> >lockFocusIfCanDraw
> >
> > but that is deprecated now.
> >
> > Any ideas will be highly appreciated.
> >
> >
> > Best regards, Gabriel
> >
> >
> > ___
> >
> > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> >
> > 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:
> >
> https://lists.apple.com/mailman/options/cocoa-dev/admin.szatmari.net%40gmail.com
> >
> > This email sent to admin.szatmari@gmail.com
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/bpantazhs%40gmail.com
>
> This email sent to bpanta...@gmail.com
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Thunderbolt port audio programmability

2020-03-21 Thread Jens Alfke via Cocoa-dev

> On Mar 20, 2020, at 8:00 PM, Carl Hoefs  
> wrote:
> 
> when the AU subsystem renders this data, it ignores the offset and generates 
> a "corrected" X-axis-centered audio signal anyway

Interesting ... I guess there’s filtering or normalization going on at some 
stage (in software or in the DAC hardware itself.) But this is way out of my 
depth.

I’d ask on the coreaudio-dev list, if it still exists, or the equivalent area 
of Apple’s dev forum.

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Open a panel in secondary thread?

2020-03-21 Thread Sandor Szatmari via Cocoa-dev
You must run the panel on the main thread.

Sandor

> On Mar 21, 2020, at 3:05 PM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> Is it possible to open an NSOpenPanel in a secondary thread?
> 
> I create the thread like this:
> 
>directoryScanThread_ = [[NSThread alloc] initWithTarget: self
>   selector: 
> @selector(scanDirectory:)
> object: nil];
>[directoryScanThread_ start];
> 
> 
> But when I do:
> 
>NSOpenPanel *oPanel = [NSOpenPanel openPanel];
> 
> it crashes at this point.
> 
> In the docs, I found a hint that one should use
> 
>lockFocusIfCanDraw
> 
> but that is deprecated now.
> 
> Any ideas will be highly appreciated.
> 
> 
> Best regards, Gabriel
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/admin.szatmari.net%40gmail.com
> 
> This email sent to admin.szatmari@gmail.com
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Open a panel in secondary thread?

2020-03-21 Thread Rob Petrovec via Cocoa-dev
No you can’t one an NSOpenPanel on a secondary thread.  UI elements must be on 
the main thread.

—Rob


> On Mar 21, 2020, at 1:05 PM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> Is it possible to open an NSOpenPanel in a secondary thread?
> 
> I create the thread like this:
> 
>directoryScanThread_ = [[NSThread alloc] initWithTarget: self
>   selector: 
> @selector(scanDirectory:)
> object: nil];
>[directoryScanThread_ start];
> 
> 
> But when I do:
> 
>NSOpenPanel *oPanel = [NSOpenPanel openPanel];
> 
> it crashes at this point.
> 
> In the docs, I found a hint that one should use
> 
>lockFocusIfCanDraw
> 
> but that is deprecated now.
> 
> Any ideas will be highly appreciated.
> 
> 
> Best regards, Gabriel
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
> 
> This email sent to petr...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Open a panel in secondary thread?

2020-03-21 Thread Alex Zavatone via Cocoa-dev
Isn’t the main thread meant for updating the UI?

> On Mar 21, 2020, at 7:05 PM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> Is it possible to open an NSOpenPanel in a secondary thread?
> 
> I create the thread like this:
> 
>directoryScanThread_ = [[NSThread alloc] initWithTarget: self
>   selector: 
> @selector(scanDirectory:)
> object: nil];
>[directoryScanThread_ start];
> 
> 
> But when I do:
> 
>NSOpenPanel *oPanel = [NSOpenPanel openPanel];
> 
> it crashes at this point.
> 
> In the docs, I found a hint that one should use
> 
>lockFocusIfCanDraw
> 
> but that is deprecated now.
> 
> Any ideas will be highly appreciated.
> 
> 
> Best regards, Gabriel
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Open a panel in secondary thread?

2020-03-21 Thread Gabriel Zachmann via Cocoa-dev
Is it possible to open an NSOpenPanel in a secondary thread?

I create the thread like this:

directoryScanThread_ = [[NSThread alloc] initWithTarget: self
   selector: 
@selector(scanDirectory:)
 object: nil];
[directoryScanThread_ start];


But when I do:

NSOpenPanel *oPanel = [NSOpenPanel openPanel];

it crashes at this point.

In the docs, I found a hint that one should use

lockFocusIfCanDraw

but that is deprecated now.

Any ideas will be highly appreciated.


Best regards, Gabriel


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com