Isolated process for each NSDocument of my app

2013-06-13 Thread Daniele Margutti
Hi guys,
While I’m making an app (it’s docs based) I would to have a separated process 
for each opened NSDocument.
The main idea is to have the main app which launch a process for each opened 
NSDocument/NSWindow and forward all messages to foreground window/process.
In this case each process is isolated from the others as like with Safari.
What’s the best way to accomplish it on OS X?
Thanks a lot
Daniele
___

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: knowing if a titlebar click is actually a resize click

2013-06-13 Thread Steve Mills
On Jun 12, 2013, at 20:35:40, Ken Thomases k...@codeweavers.com wrote:

 I'm not sure I understand.  It's running an internal event loop?  If that's 
 the case, then you definitely get the NSWindowWillStartLiveResizeNotification 
 before seeing an NSLeftMouseDragged.  So, while you would have had to set up 
 for your window moving during the NSLeftMouseDown, you can undo your internal 
 state changes upon seeing the NSWindowWillStartLiveResizeNotification and 
 then subsequently ignore any NSLeftMouseDragged events you see.
 
 Actually, if you call super before handling mouse events as potential window 
 dragging, then you should know if an NSLeftMouseDragged is a potential drag 
 based on whether or not NSWindowWillStartLiveResizeNotification was posted 
 during the call to super.

You are correct. I was previously misunderstanding how the resize code flow was 
arranged. Yes, the resize code is totally run inside NSWindow's sendEvent while 
handling the primary NSLeftMouseDown event, so I can get the 
NSWindowWillStartLiveResizeNotification to be notified that I can skip that 
particular NSLeftMouseDown after it returns from super. Thanks again!

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



___

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: Isolated process for each NSDocument of my app

2013-06-13 Thread Jens Alfke

On Jun 13, 2013, at 3:52 AM, Daniele Margutti m...@danielemargutti.com wrote:

 In this case each process is isolated from the others as like with Safari.
 What’s the best way to accomplish it on OS X?

There is no [public] support for running parts of the GUI of an app in separate 
processes. It requires things like sending events over IPC and maintaining 
shared-memory window/view buffers. I’m somewhat familiar with the way Chrome 
does it, having worked on Chrome for a few years, and it is very complex and 
messy. (You can check out the Chromium source and look through it if you want.) 
I’m sure Safari’s implementation is too, unless they’re using some hypothetical 
private AppKit APIs for cross-process events/views.

The short answer is that this would be very difficult to do, and you’ve have to 
become intimately familiar with XPC, the low levels of AppKit event handling, 
CoreGraphics, shared memory, etc. etc.

On the plus side, if you accomplished it and made it into a reusable framework, 
you’d be a hero.

—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

Prevent NSLevelIndicatorCell change when clicking in non-selected row

2013-06-13 Thread Trygve Inda
I have an NSTableView and one column uses NSLevelIndicatorCell.

I want to prevent the action from being run (so that it can't be changed) if
the click is in a non-selected row. This is to prevent accidental changes.

Ideas?

Thanks,

Trygve



___

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: Isolated process for each NSDocument of my app

2013-06-13 Thread Tom Davie
The best way is to write an application that's stable.  The only reason
browsers started doing this was because they had to deal with 3rd party
code (e.g. flash) that was giving them a terrible reputation for
instability.  If you're controlling the entire app, you have no reasonable
reason to do this.  Simply fix your crasher bugs instead.


On Thu, Jun 13, 2013 at 12:52 PM, Daniele Margutti
m...@danielemargutti.comwrote:

 Hi guys,
 While I’m making an app (it’s docs based) I would to have a separated
 process for each opened NSDocument.
 The main idea is to have the main app which launch a process for each
 opened NSDocument/NSWindow and forward all messages to foreground
 window/process.
 In this case each process is isolated from the others as like with Safari.
 What’s the best way to accomplish it on OS X?
 Thanks a lot
 Daniele
 ___

 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/tom.davie%40gmail.com

 This email sent to tom.da...@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: Isolated process for each NSDocument of my app

2013-06-13 Thread Daniele Margutti

On 13 Jun 2013, at 20:05, Tom Davie tom.da...@gmail.com wrote:

 The best way is to write an application that's stable.  The only reason 
 browsers started doing this was because they had to deal with 3rd party code 
 (e.g. flash) that was giving them a terrible reputation for instability.  If 
 you're controlling the entire app, you have no reasonable reason to do this.  
 Simply fix your crasher bugs instead.

Overall stability is not my reason to evaluate this kind of a architecture; for 
a particular reason each document should interact with an external singleton 
class but each singleton must be unique around the app; think about 
UIApplication on iOS; I need to work with a similar thing so I need to “run” 
multiple projects and each one must see a single instance of this object. I 
cannot change this kind for several reason, so an architecture like this could 
be a great answer to enable multiple documents support in my application.
___

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: Isolated process for each NSDocument of my app

2013-06-13 Thread Jens Alfke

On Jun 13, 2013, at 11:29 AM, Daniele Margutti m...@danielemargutti.com wrote:

 Overall stability is not my reason to evaluate this kind of a architecture; 
 for a particular reason each document should interact with an external 
 singleton class but each singleton must be unique around the app; think about 
 UIApplication on iOS; I need to work with a similar thing so I need to “run” 
 multiple projects and each one must see a single instance of this object. I 
 cannot change this kind for several reason, so an architecture like this 
 could be a great answer to enable multiple documents support in my 
 application.

I think you’ll find it easier to refactor your code to avoid depending on a 
global/singleton*, than to implement low-level system functionality to split 
your app across processes.

—Jens

* which you should do anyway; that’s a bad design.
___

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: Isolated process for each NSDocument of my app

2013-06-13 Thread Daniele Margutti

On 13 Jun 2013, at 21:04, Jens Alfke j...@mooseyard.com wrote:

 
 On Jun 13, 2013, at 11:29 AM, Daniele Margutti m...@danielemargutti.com 
 wrote:
 
 Overall stability is not my reason to evaluate this kind of a architecture; 
 for a particular reason each document should interact with an external 
 singleton class but each singleton must be unique around the app; think 
 about UIApplication on iOS; I need to work with a similar thing so I need to 
 “run” multiple projects and each one must see a single instance of this 
 object. I cannot change this kind for several reason, so an architecture 
 like this could be a great answer to enable multiple documents support in my 
 application.
 
 I think you’ll find it easier to refactor your code to avoid depending on a 
 global/singleton*, than to implement low-level system functionality to split 
 your app across processes.


That’s not possible due to some important reason I can’t explain here :( Belive 
me, if it was the right way I would have used them :(


___

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: Isolated process for each NSDocument of my app

2013-06-13 Thread Tom Davie

On 13 Jun 2013, at 20:29, Daniele Margutti m...@danielemargutti.com wrote:

 
 On 13 Jun 2013, at 20:05, Tom Davie tom.da...@gmail.com wrote:
 
 The best way is to write an application that's stable.  The only reason 
 browsers started doing this was because they had to deal with 3rd party code 
 (e.g. flash) that was giving them a terrible reputation for instability.  If 
 you're controlling the entire app, you have no reasonable reason to do this. 
  Simply fix your crasher bugs instead.
 
 Overall stability is not my reason to evaluate this kind of a architecture; 
 for a particular reason each document should interact with an external 
 singleton class but each singleton must be unique around the app; think about 
 UIApplication on iOS; I need to work with a similar thing so I need to “run” 
 multiple projects and each one must see a single instance of this object. I 
 cannot change this kind for several reason, so an architecture like this 
 could be a great answer to enable multiple documents support in my 
 application.

So really, what you're saying is Someone stuck a singleton where a singleton 
shouldn't be (anywhere at all), and now I'm screwed that I need more than one 
of them.  Your solution to this should be to not use a singleton (ever), 
rather than to try and hack about the application structure to carry on using a 
singleton.

Tom Davie
___

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

iOS Visual Element

2013-06-13 Thread koko
Besides a UIPopoverController, how is the content view of the 
UIPopoverController constructed:

view.png 291×204 pixels

I see it a lot in iPad apps and need to use it.

-koko

___

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: iOS Visual Element [link fixed]

2013-06-13 Thread koko

http://highrolls.net/view.png



___

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


Supporting rotation and zoom gestures with autolayout?

2013-06-13 Thread Rick Mann
I'm still having trouble implementing two-finger rotation and zoom gestures 
inside a UIScrollView with autolayout.

I have a large image that I want the user to be able to pinch zoom, and rotate, 
and pan around in. I can't see what constraints to use to make this work 
without it resizing the entire ancestral view chain.

Any advice or suggestions would be appreciated.

-- 
Rick




___

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: Isolated process for each NSDocument of my app

2013-06-13 Thread Kyle Sluder
On Thu, Jun 13, 2013, at 12:06 PM, Daniele Margutti wrote:
 That’s not possible due to some important reason I can’t explain here :(

It's far more possible than trying to slice portions of your app into
subprocesses.

--Kyle Sluder

___

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: Supporting rotation and zoom gestures with autolayout?

2013-06-13 Thread Kyle Sluder
On Thu, Jun 13, 2013, at 01:52 PM, Rick Mann wrote:
 I'm still having trouble implementing two-finger rotation and zoom
 gestures inside a UIScrollView with autolayout.
 
 I have a large image that I want the user to be able to pinch zoom, and
 rotate, and pan around in. I can't see what constraints to use to make
 this work without it resizing the entire ancestral view chain.
 
 Any advice or suggestions would be appreciated.

During pinching and zooming, remove all constraints involving the view,
turn on translatesAutoresizingMaskIntoConstraints for that view, and
directly manipulate its bounds and rotation. Reinstall the constraints
when you're done.

--Kyle Sluder
___

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: Supporting rotation and zoom gestures with autolayout?

2013-06-13 Thread Rick Mann

On Jun 13, 2013, at 14:13 , Kyle Sluder k...@ksluder.com wrote:

 During pinching and zooming, remove all constraints involving the view,
 turn on translatesAutoresizingMaskIntoConstraints for that view, and
 directly manipulate its bounds and rotation. Reinstall the constraints
 when you're done.

Wow, really? That seems heavy-handed. I thought autolayout was supposed to 
(eventually) replace the autoresizing mask.

When you say that view, it brings up another question. Is it enough for me to 
put a UIImageView inside a UIScrollView, or do I need another view in between 
them. Given that, for which view should I do what you suggest? The UIImageView 
inside, the UIScrollView (or the intermediate view, if that's necessary)?

Thanks!

-- 
Rick




___

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


Asynchronously mounting a remote file server?

2013-06-13 Thread Rick Mann
I'm not sure if this is the right list for this question. If not, please let me 
know what would be better (macnetworkprog?).

One drawback to aliases on OS X is that if the target item is on a remote 
server, the system will usually try to automatically mount that server volume 
whenever the alias is accessed. The problem is that code that accesses the file 
is almost always synchronous and on the main thread, so whatever it is (app, 
Finder, prefs pane) doing the accessing blocks for a really long time, 
especially if the server is not available.

I'd like to be smarter about this in my own apps. Is there a test I can perform 
before accessing aliases I've stored, or an async way to open/read from files 
that won't block the main thread?

Thanks.

-- 
Rick




___

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: Supporting rotation and zoom gestures with autolayout?

2013-06-13 Thread Kyle Sluder
On Thu, Jun 13, 2013, at 02:15 PM, Rick Mann wrote:
 
 On Jun 13, 2013, at 14:13 , Kyle Sluder k...@ksluder.com wrote:
 
  During pinching and zooming, remove all constraints involving the view,
  turn on translatesAutoresizingMaskIntoConstraints for that view, and
  directly manipulate its bounds and rotation. Reinstall the constraints
  when you're done.
 
 Wow, really? That seems heavy-handed. I thought autolayout was supposed
 to (eventually) replace the autoresizing mask.

Neither autoresizing masks nor autolayout constraints are appropriate
for describing the behavior you're trying to implement, which is tied
directly to user input. Plus, it involves rotation, which auto layout
definitely doesn't understand.

So theoretically, you shouldn't need to turn on
translatesAutoresizingMaskIntoConstraints for the view. In fact, it's
possible that you don't have to on iOS.

The reason I suggested turning it on is because at least on OS X, a view
contained within a constraints-based window that doesn't have any
constraints installed on it will misbehave. Specifically, when the view
lays out it will resize all dimensions of the view to zero. (r.12466034)

 
 When you say that view, it brings up another question. Is it enough for
 me to put a UIImageView inside a UIScrollView, or do I need another view
 in between them. Given that, for which view should I do what you suggest?
 The UIImageView inside, the UIScrollView (or the intermediate view, if
 that's necessary)?

I don't work on iOS stuff enough to have a good answer for you here.

--Kyle Sluder
___

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: Supporting rotation and zoom gestures with autolayout?

2013-06-13 Thread Rick Mann

On Jun 13, 2013, at 14:30 , Kyle Sluder k...@ksluder.com wrote:

 I don't work on iOS stuff enough to have a good answer for you here.

Fair enough; thanks for the suggestion, in any case.

Do the settings around automatic layout and resizing apply to the view you set 
them on, or children of that view (or both)?

-- 
Rick




___

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: iOS Visual Element [fuggedaboutit]

2013-06-13 Thread koko

On Jun 13, 2013, at 1:40 PM, koko k...@highrolls.net wrote:

 
 http://highrolls.net/view.png
 
 
 
 ___
 
 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/koko%40highrolls.net
 
 This email sent to k...@highrolls.net
 

___

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: iOS Visual Element [link fixed]

2013-06-13 Thread Alex Zavatone
One really easy way is to use a UITableViewController.

The link you sent looks a little different, but that's one way to think 
approach it.



On Jun 13, 2013, at 3:40 PM, koko wrote:

 
 http://highrolls.net/view.png
 
 
 
 ___
 
 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


Re: iOS Visual Element [link fixed]

2013-06-13 Thread koko
It is UIActionSheet ..
UIActionSheet Class Reference

On Jun 13, 2013, at 4:03 PM, Julius Oklamcak juli...@icodemonks.com wrote:

 http://stackoverflow.com/questions/10744260/uipopover-how-do-i-make-a-popove
 r-with-buttons-like-this 
 
 -Original Message-
 From: cocoa-dev-bounces+juliuso=icodemonks@lists.apple.com
 [mailto:cocoa-dev-bounces+juliuso=icodemonks@lists.apple.com] On Behalf
 Of Alex Zavatone
 Sent: Thursday, June 13, 2013 5:58 PM
 To: koko
 Cc: Cocoa Dev
 Subject: Re: iOS Visual Element [link fixed]
 
 One really easy way is to use a UITableViewController.
 
 The link you sent looks a little different, but that's one way to think
 approach it.
 
 On Jun 13, 2013, at 3:40 PM, koko wrote:
 
 http://highrolls.net/view.png
 
 

___

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: iOS Visual Element [link fixed]

2013-06-13 Thread koko
Here is a picture from the docs ..

http://highrolls.net/UIActionSheet.png

On Jun 13, 2013, at 4:29 PM, koko k...@highrolls.net wrote:

 It is UIActionSheet ..
 UIActionSheet Class Reference
 
 On Jun 13, 2013, at 4:03 PM, Julius Oklamcak juli...@icodemonks.com wrote:
 
 http://stackoverflow.com/questions/10744260/uipopover-how-do-i-make-a-popove
 r-with-buttons-like-this 
 
 -Original Message-
 From: cocoa-dev-bounces+juliuso=icodemonks@lists.apple.com
 [mailto:cocoa-dev-bounces+juliuso=icodemonks@lists.apple.com] On Behalf
 Of Alex Zavatone
 Sent: Thursday, June 13, 2013 5:58 PM
 To: koko
 Cc: Cocoa Dev
 Subject: Re: iOS Visual Element [link fixed]
 
 One really easy way is to use a UITableViewController.
 
 The link you sent looks a little different, but that's one way to think
 approach it.
 
 On Jun 13, 2013, at 3:40 PM, koko wrote:
 
 http://highrolls.net/view.png
 
 
 

___

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: -[NSManagedObjectContext performBlock:] concurrent or serial?

2013-06-13 Thread davelist

On May 31, 2013, at 7:40 PM, Rick Mann rm...@latencyzero.com wrote:

 Hi. If I issue a bunch of -performBlock: calls on a particular Managed Object 
 Context, will they execute serially or concurrently?
 
 Thanks,
 
 -- 
 Rick

I'm assuming serially and I would like to know too so I was hoping someone 
would provide a definitive answer. Did I miss it or did nobody respond to this?

Thanks,
Dave


___

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: -[NSManagedObjectContext performBlock:] concurrent or serial?

2013-06-13 Thread Rick Mann

On Jun 13, 2013, at 16:03 , davel...@mac.com wrote:

 
 On May 31, 2013, at 7:40 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Hi. If I issue a bunch of -performBlock: calls on a particular Managed 
 Object Context, will they execute serially or concurrently?
 
 Thanks,
 
 -- 
 Rick
 
 I'm assuming serially and I would like to know too so I was hoping someone 
 would provide a definitive answer. Did I miss it or did nobody respond to 
 this?

I have not yet gotten an answer.


-- 
Rick




___

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: Isolated process for each NSDocument of my app

2013-06-13 Thread Graham Cox

On 14/06/2013, at 5:06 AM, Daniele Margutti m...@danielemargutti.com wrote:

 That’s not possible


No offence, but when a programmer says this, all they're doing is revealing 
their own inexperience. I mean that in a friendly way; I've been there many 
times myself.

There *is* a way, you just have to figure it out (or ask someone to help you 
figure it out).

--Graham
___

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: Asynchronously mounting a remote file server?

2013-06-13 Thread Jens Alfke

On Jun 13, 2013, at 2:17 PM, Rick Mann rm...@latencyzero.com wrote:

 I'd like to be smarter about this in my own apps. Is there a test I can 
 perform before accessing aliases I've stored, or an async way to open/read 
 from files that won't block the main thread?

It’s not opening or reading from the file that’s the slow part, it’s resolving 
the alias, which happens first. (Aliases aren’t automatic or transparent like 
symlinks; something has to explicitly recognize a file as an alias and then 
resolve it to get the destination file’s location.)

I know the alias APIs have changed in the last few years, and I don’t know the 
new ones, but I’d imagine there is an async variant. Once you’ve resolved the 
alias, you can open/read from the file as normal. If you think the actual file 
I/O might still be too slow, you can do it on a background thread.

—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