Re: Should all CoreData relationships be optional in swift?

2015-09-15 Thread Quincey Morris
On Sep 15, 2015, at 20:14 , Jim Thomason wrote: > > So I added this: > > class Foo { > ... > var image : NSImage { get { return self.type.image } } > > } > > The problem is, this image value is used to populate a cell in a Source > Control List. When I add a new Foo, it's immediately added

Re: Should all CoreData relationships be optional in swift?

2015-09-15 Thread dangerwillrobinsondanger
Maybe a default image is appropriate if the FooType is not set or is optional. Sent from my iPhone > On Sep 16, 2015, at 12:14 PM, Jim Thomason wrote: > > I'm doing some porting/updating work and came across an issue. > > I have two objects - which we'll call Foo and FooType. > > Every Foo m

Should all CoreData relationships be optional in swift?

2015-09-15 Thread Jim Thomason
I'm doing some porting/updating work and came across an issue. I have two objects - which we'll call Foo and FooType. Every Foo must have a FooType, and every FooType is associated with multiple Foos. The FooType also has an image associated with it, and the Foo uses that image exclusively. So