Forgot your password?
typodupeerror
User Journal

jcr's Journal: JCR's first CoreData app..

Journal by jcr

Those of you who have the Xcode tools installed on your Mac, can find my first CoreData app in /Developer/Examples/CoreData/Stickies/.

I wrote it mostly to learn how to use CoreData in a non-document-based app. Once I showed it to the CoreData team though, they liked it enough to include it in the Developer Tools examples.

There's a lot of code in that app, but nearly all of it is just to implement the bizarre little mutant windows that people expect to see in a Stickies application.

The real work of the app, that is, storing rich text notes in a per-user database, requires no code. After more than a decade of NeXTSTEP and Cocoa development, that still amazes me.

When you run CoreData Stickies, open the debug window for a different view of the database.

  If you have any questions about this sample, go ahead and post them in a comment here. I'll check this page from time to time.

Note: on Leopard, there's a bug prevents the windows from resizing. To fix it, add these two lines of code to StickyResizeCornerView.m: // Fix for Leopard. Turning on MouseMoved events wasn't necessary before Leopard, but now it is for some reason. -jcr
- (void) mouseDown:(NSEvent *) theEvent { [[self window] setAcceptsMouseMovedEvents:YES]; }
- (void) mouseUp:(NSEvent *) theEvent { [[self window] setAcceptsMouseMovedEvents:NO]; }

This discussion has been archived. No new comments can be posted.

JCR's first CoreData app..

Comments Filter:

The person who makes no mistakes does not usually make anything.

Working...