Re: Threadsafe copy of objective c object

2013-09-04 Thread Jonathan Taylor
Thanks to everyone who has chimed in on this one - you've all been really helpful. Looks like some conclusions are emerging; some selected replies below. On 3 Sep 2013, at 20:21, Tom Davie wrote: > Remove the mutation methods. Make your object immutable, the referential > transparency will giv

Subclassing a View Controller in a Storyboard

2013-09-04 Thread Dave
Hi All, If I am using a Storyboard that contains a view controller, LTWMusicViewController that I'd like to sub-class like so: LTWRockMusicViewController : LTWMusicViewController Then in the viewDidLoad method, do: -(void) viewDidLoad { [super viewDidLoad]; self.pMusicCategory = kRockMusicCat

Re: Core Data Initialization

2013-09-04 Thread Dave
On 3 Sep 2013, at 15:59, Fritz Anderson wrote: > On 2 Sep 2013, at 9:33 AM, Jerry Krinock wrote wise things > about handling mismatches between stores and MOMs, and the practice of > copying a generic store into Documents/ if no store is there. > >> On 2013 Sep 02, at 04:01, Dave wrote: >>

Re: Core Data Initialization

2013-09-04 Thread Willeke
Op 2 sep 2013, om 13:01 heeft Dave het volgende geschreven: > Is this advisable? Yes, it's in the Core Data FAQ: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/Articles/cdFAQ.html#//apple_ref/doc/uid/TP40001802-SW5 _

Re: Core Data Initialization

2013-09-04 Thread Dave
On 4 Sep 2013, at 12:13, Willeke wrote: > > Op 2 sep 2013, om 13:01 heeft Dave het volgende geschreven: > >> Is this advisable? > > Yes, it's in the Core Data FAQ: > https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/Articles/cdFAQ.html#//apple_ref/doc/uid/TP4000

Re: Subclassing a View Controller in a Storyboard

2013-09-04 Thread Matt Neuburg
On Sep 4, 2013, at 4:13 AM, cocoa-dev-requ...@lists.apple.com wrote: > Date: Wed, 04 Sep 2013 10:23:04 +0100 > From: Dave > Subject: Subclassing a View Controller in a Storyboard > > Hi All, > > If I am using a Storyboard that contains a view controller, > LTWMusicViewController that I'd like

Re: Subclassing a View Controller in a Storyboard

2013-09-04 Thread Kyle Sluder
On Wed, Sep 4, 2013, at 08:08 AM, Matt Neuburg wrote: > Maybe I just don't understand what the OP is trying to do. It seemed very > strange to me. m. Yes, more context would indeed help. It's not necessarily strange to want to use the same interface with multiple view controllers, but it does go

Re: NSPanel doesn't reposition correctly after screen resize

2013-09-04 Thread Steve Mills
On Sep 3, 2013, at 16:11:01, Lee Ann Rucker wrote: > NSWindowDidChangeScreenNotification is sent when the window moves to another > screen. NSApplicationDidChangeScreenParametersNotification is when the screen > itself changes. You'll probably have to listen to both of them, but they can > sha

Re: Why is translatesAutoresizingMaskIntoConstraints on in my storyboard?

2013-09-04 Thread Kevin Cathey
All top level views in XIBs and storyboards have translatesAutoresizingMaskIntoConstraints=YES. This is because most UIKit and AppKit view and controller subclasses are not yet using constraints to layout, so the default of translatesAutoresizingMaskIntoConstraints=YES is least unexpected. As

Re: Threadsafe copy of objective c object

2013-09-04 Thread Marcel Weiher
On Sep 4, 2013, at 10:56 , Jonathan Taylor wrote: > On 3 Sep 2013, at 19:49, Marcel Weiher wrote: >> Unless there is some dire reason not to do this, I would make a copy on the >> main thread every time the UI changes, and stash that copy somewhere the >> worker thread can access it easily.

Re: Subclassing a View Controller in a Storyboard

2013-09-04 Thread Kyle Sluder
On Sep 4, 2013, at 7:02 AM, Matt Neuburg wrote: > > On Sep 4, 2013, at 4:13 AM, cocoa-dev-requ...@lists.apple.com wrote: > > What you're doing has a lot of bad smells: > > * If I'm only going to call instantiateViewController, why am I using a > storyboard here at all? If I use a .xib file in

Re: Core Data Initialization

2013-09-04 Thread Fritz Anderson
On 4 Sep 2013, at 6:33 AM, Dave wrote: > It doesn't actually say use an Core Data SQLite file, it says use a > persistent store which may or may not be the same thing. Using an SQLite file > that has been created using an older version of the app is really dodgy for a > number of reasons: > >

Re: Core Data Initialization

2013-09-04 Thread Dave
On 4 Sep 2013, at 15:54, Fritz Anderson wrote: > On 4 Sep 2013, at 6:33 AM, Dave wrote: > >> It doesn't actually say use an Core Data SQLite file, it says use a >> persistent store which may or may not be the same thing. Using an SQLite >> file that has been created using an older version of

Re: Subclassing a View Controller in a Storyboard

2013-09-04 Thread Dave
On 4 Sep 2013, at 15:02, Matt Neuburg wrote: > > On Sep 4, 2013, at 4:13 AM, cocoa-dev-requ...@lists.apple.com wrote: > >> Date: Wed, 04 Sep 2013 10:23:04 +0100 >> From: Dave >> Subject: Subclassing a View Controller in a Storyboard >> >> Hi All, >> >> If I am using a Storyboard that contai

Re: Subclassing a View Controller in a Storyboard

2013-09-04 Thread David Duncan
The point is, if the only difference between an LTWMusicViewController and an LTWRockMusicViewController is that the latter defaults to the “Rock” category, then you don’t actually *need* the LTWRockMusicViewController subclass. You just need to ensure that when you want an LTWMusicViewControlle

Re: iOS Deleting an Entity from Core Data

2013-09-04 Thread Alex Finkel
So you want to issue an app update that will not have that entity and in the same time will not force your users to delete the app and re-install it. To achieve that you will need to do a Core Data Migration. https://developer.apple.com/library/ios/documentation/cocoa/Conceptual/CoreDataVersioning/

Re: Subclassing a View Controller in a Storyboard

2013-09-04 Thread Dave
On 4 Sep 2013, at 21:12, David Duncan wrote: > The point is, if the only difference between an LTWMusicViewController and an > LTWRockMusicViewController is that the latter defaults to the “Rock” > category, then you don’t actually *need* the LTWRockMusicViewController > subclass. You just ne

iOS Deleting an Entity from Core Data

2013-09-04 Thread Dave
Hi, I want to remove an Entity from a Core Data Store (SQLite). I deleted it in the model, but when I run the App now, it crashes with a "Z" table already created error. I've also removed (AFAIK) all references to this in the Project. This entity has no relationships and was basically created a

Re: Subclassing a View Controller in a Storyboard

2013-09-04 Thread Dave
> You could do that, but OP is using storyboards. In that case, the proper way > to pass that info is in -prepareForSegue:. I took a look at prepareForSegue, but I'm not sure how it would help here? In the Storyboard I have a VC with a name of "LTWMusicViewController", there is NOT a "LTWRockMu

NSTimezone and offset

2013-09-04 Thread Lorenzo Thurman
Im working with NSTimezone and I need to get the current timezone offset, but I'm finding this more difficult than I think it should be. I thought it might just be the way I'm looking at things, but I don't think so. If create an NSTimezone object and then send that object a daylightSavingTim

Re: NSTimezone and offset

2013-09-04 Thread dangerwillrobinsondanger
You are confusing the method with secondsFromGMT CDT is 3600 seconds is one hour ahead of CST and the docs could be more clear about this method being self referential rather than GMT referential. Sent from my iPhone On 2013/09/05, at 13:21, Lorenzo Thurman wrote: > Im working with NSTimezon