• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Populating a new SQLite Core Data store with default data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Populating a new SQLite Core Data store with default data


  • Subject: RE: Populating a new SQLite Core Data store with default data
  • From: "Jon C. Munson II" <email@hidden>
  • Date: Mon, 23 Feb 2009 16:36:41 -0500
  • Organization: JTA Enterprises LLC

> >
> > 	// generic
> > 	NSManagedObject someObject = [NSEntityDescription insert...];
> > 	(anEntity *)someObject.attribute = @"somevalue";
>
> Same here, I don't know if this must be seen as a bug or not. This
> works for me :
>
> ((anEntity *)someObject).attribute = @"somevalue";
>
> Frédéric=

[Jon C. Munson II] Thanks to Wim as well for the reply.

I decided to try and (since it worked) then go with the explicit route,
since I was mostly there anyway.

I added @class anEntity to the .h file.

I added #import "anEntity" to the .m file.

I then changed my insert statement to:

	anEntity *thisObject = [NSEntityDescription insert...];
	thisObject.attribute = @"somevalue";

After looking at the generic version (at top) and realizing that I had
pulled in the class info anyway, I saw no value (for what I'm doing) to
continue that approach, hence the explicit approach just above.

If that's not good, do let me know.

Thanks for all the answers and input!

Peace, Love, and Light,

/s/ Jon C. Munson II

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Populating a new SQLite Core Data store with default data (From: "Jon C. Munson II" <email@hidden>)
 >RE: Populating a new SQLite Core Data store with default data (From: "Jon C. Munson II" <email@hidden>)
 >Re: Populating a new SQLite Core Data store with default data (From: mmalc Crawford <email@hidden>)
 >RE: Populating a new SQLite Core Data store with default data (From: "Jon C. Munson II" <email@hidden>)
 >Re: Populating a new SQLite Core Data store with default data (From: mmalc Crawford <email@hidden>)
 >RE: Populating a new SQLite Core Data store with default data (From: "Jon C. Munson II" <email@hidden>)
 >Re: Populating a new SQLite Core Data store with default data (From: "I. Savant" <email@hidden>)
 >RE: Populating a new SQLite Core Data store with default data (From: "Jon C. Munson II" <email@hidden>)
 >Re: Populating a new SQLite Core Data store with default data (From: "I. Savant" <email@hidden>)
 >RE: Populating a new SQLite Core Data store with default data (From: "Jon C. Munson II" <email@hidden>)
 >Re: Populating a new SQLite Core Data store with default data (From: Frédéric Testuz <email@hidden>)

  • Prev by Date: Re: Populating a new SQLite Core Data store with default data
  • Next by Date: Getting CGImage out of NSBitmapImageRep in 10.4
  • Previous by thread: Re: Populating a new SQLite Core Data store with default data
  • Next by thread: Re: Populating a new SQLite Core Data store with default data
  • Index(es):
    • Date
    • Thread