About Search Archive
Matt Gallagher: Cocoa with Love Matt Gallagher: Cocoa with Love
← Newer 13 14 15 16 17 18 19 20 21 Older →
  • Open the previous document on application startup

    May 2, 2008 (an Objective-C era article)

    Setting up your application to open the most recent document on startup is easier than you might think. Here's a quick solution with a some code you can plug straight into your app.
    Read more...
  • Propagate deletes immediately in Core Data

    Apr 25, 2008 (an Objective-C era article)

    Learn some limitations associated with cascading deletes in Core Data and find out how to immediately propagate deletes in Core Data, overcoming these potential problems.
    Read more...
  • viewWillDraw - a welcome addition to NSView in 10.5

    Apr 20, 2008 (an Objective-C era article)

    A method named viewWillDraw appeared in NSView in Mac OS X 10.5. If you have cause to use it, this method replaces 6 other methods from earlier versions of Mac OS X. Read more to find out if you should use it and how it helps.
    Read more...
  • Type punning isn't funny: Using pointers to recast in C is bad.

    Apr 14, 2008 (an Objective-C era article)

    A very common C technique for reinterpreting data types has the potential to cause nasty bugs. Apple knows this, which is why the implementation of NSRectToCGRect (correctly) doesn't do what the documention claims. I show you a technique to perform reinterpret casts safely in your own code.
    Read more...
  • The value of immutable values

    Apr 6, 2008 (an Objective-C era article)

    This is an explanation of why Cocoa contains immutable value classes and why the value classes you create in your own program should be immutable too.
    Read more...
  • Supersequent implementation

    Mar 30, 2008 (an Objective-C era article)

    Ever wanted to override a method using a category but still invoke the default method from the category? Like invoking the super method on a super class, this example will show you how to invoke any "supersequent" method no matter if its on the super class, the current class or even another category on the current class.
    Read more...
  • Testing Core Data with very big hierarchical data sets

    Mar 28, 2008 (an Objective-C era article)

    I test Core Data's performance with a one million object data set stored in a basic three-tiered hierarchy. I look at the performance when building, loading, fetching and traversing.
    Read more...
  • Construct an NSInvocation for any message, just by sending

    Mar 19, 2008 (an Objective-C era article)

    I will show you how to use object forwarding to record any message in an NSInvocation, by simply sending the message to an object. Unlike techniques shown elsewhere, this will allow you to record any message, including NSObject messages and even the forwarding messages themselves.
    Read more...
  • Cocoa Application Startup

    Mar 14, 2008 (an Objective-C era article)

    How does a Cocoa Application start up? Where are the main places to put code so that it gets run on startup? Learn the answers in this series of startup diagrams.
    Read more...
  • Break into Debugger

    Mar 9, 2008 (an Objective-C era article)

    For your debugging pleasure: a DebugBreak() macro to programmatically stop the debugger at a line of code (not inside a child function). Some of this code can be found elsewhere but I present it here, PPC and Intel capable and ready to run.
    Read more...
← Newer 13 14 15 16 17 18 19 20 21 Older →
  • Subscribe: RSS or JSON
  • Mastodon: @cocoawithlove
  • Bluesky: @cocoawithlove
  • Github: mattgallagher

© 2008-2024 Matt Gallagher. All rights reserved.
Code may be used in accordance with license on About page.
If you need to contact me: