Re: Managing relationships by fetching related objects within subclass of NSManagedObject

2013-02-09 Thread Keary Suska
On Feb 9, 2013, at 8:28 PM, Devarshi Kulshreshtha wrote: > Hi Keary, > > Thnx for your reply :-) > > Regarding your answer to my 2nd query, I understand that once I map the > newEmployee to company, the inverse relationship from company to employee > will be by default, no need for me to map i

Re: Managing relationships by fetching related objects within subclass of NSManagedObject

2013-02-09 Thread Devarshi Kulshreshtha
Hi Keary, Thnx for your reply :-) Regarding your answer to my 2nd query, I understand that once I map the newEmployee to company, the inverse relationship from company to employee will be by default, no need for me to map it back. So in that case should I do a check, say- if( aCompanyObject.emplo

Re: am I being called on the correct GCD queue?

2013-02-09 Thread Roland King
On 10 Feb, 2013, at 8:21 AM, Kyle Sluder wrote: > On Feb 9, 2013, at 4:19 PM, Kyle Sluder wrote: > >> On Feb 9, 2013, at 12:11 PM, Matt Neuburg wrote: >> >>> If dispatch_get_current_queue() is deprecated >> >> It's not deprecated in any currently non-NDA'd SDK. > > Oh wait, 6.1 has shipped

Re: am I being called on the correct GCD queue?

2013-02-09 Thread Gwynne Raskind
The replacement I've seen for checking whether the current queue is "correct" for the code in which it's running looks something like this (for a complete implementation example, see GCDAsyncSocket): static char *kMYObjectIsOnItsOwnQueueKey = "Whatever": - (instancetype)init { if ((self

Re: am I being called on the correct GCD queue?

2013-02-09 Thread Kévin Vavelin
So, try dispatch_get_specific method instead, I'll take a look on it. Vavelin Kévin Twitter | Blog | LinkedIn Entrepreneur Developer OS X / iOS ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: am I being called on the correct GCD queue?

2013-02-09 Thread Kyle Sluder
On Feb 9, 2013, at 4:25 PM, Kévin Vavelin wrote: > I think dispatch_get_current_queue was replace with dispatch_get_main_queue > but i'm not sure... Can you check it ? dispatch_get_main_queue has always existed and has always returned the main, serial queue. It is not a replacement for dispatc

Re: am I being called on the correct GCD queue?

2013-02-09 Thread Kévin Vavelin
I think dispatch_get_current_queue was replace with dispatch_get_main_queue but i'm not sure... Can you check it ? Vavelin Kevin OS X / iOS Developer Entrepreneur On 9 févr. 2013, at 21:11, Matt Neuburg wrote: > If dispatch_get_current_queue() is deprecated, how can I check whether this > met

Re: am I being called on the correct GCD queue?

2013-02-09 Thread Kyle Sluder
On Feb 9, 2013, at 4:19 PM, Kyle Sluder wrote: > On Feb 9, 2013, at 12:11 PM, Matt Neuburg wrote: > >> If dispatch_get_current_queue() is deprecated > > It's not deprecated in any currently non-NDA'd SDK. Oh wait, 6.1 has shipped, hasn't it? Guess I need to update my SDK. (I've been living o

Re: am I being called on the correct GCD queue?

2013-02-09 Thread Kyle Sluder
On Feb 9, 2013, at 12:11 PM, Matt Neuburg wrote: > If dispatch_get_current_queue() is deprecated It's not deprecated in any currently non-NDA'd SDK. > how can I check whether this method is being called on the right dispatch > queue? For example, I'd like to throw a wobbly (an assertion, mayb

am I being called on the correct GCD queue?

2013-02-09 Thread Matt Neuburg
If dispatch_get_current_queue() is deprecated, how can I check whether this method is being called on the right dispatch queue? For example, I'd like to throw a wobbly (an assertion, maybe) if this method is called on any queue whose label isn't "com.neuburg.myCoolQueue". Is that a wrong thing t

Re: Managing relationships by fetching related objects within subclass of NSManagedObject

2013-02-09 Thread Keary Suska
On Feb 9, 2013, at 10:20 AM, Devarshi Kulshreshtha wrote: > Say I have an employee entity and a company entity in core data. > > So employee and company are related to each other like this: > > Employee <<---> Company > > Now I am trying to right a manageRelationships method in each class, > s

Managing relationships by fetching related objects within subclass of NSManagedObject

2013-02-09 Thread Devarshi Kulshreshtha
Hi All, I need some suggestions on an implementation. Say I have an employee entity and a company entity in core data. So employee and company are related to each other like this: Employee <<---> Company Now I am trying to right a manageRelationships method in each class, something like this: