Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×
User Journal

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

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 means-and-ends moralists, or non-doers, always end up on their ends without any means. -- Saul Alinsky

Working...