It’s 12:36am: Do you know where your teenagers are?

Just a quick note to say hi before I go to bed. Hi! Quickly: Had a good day at work — had some big discoveries regarding the NSToolbar and NSToolbarItem classes. If that sounds like gibberish, don’t worry, it is.
I’m really proud of myself. I think I’ve reached some new plateau. Today, for the first time since I can remember, I made two unique meals out of the leftovers in the fridge instead of just going with my usual. And they were good! I think there’s a lesson there.
Finished Buffy season 4 tonight. Kinda sad about that. It’s a fantastically written show. Something to look forward to, though: season 5 comes out on DVD Dec 9th. ๐Ÿ™‚


Comments

6 responses to “It’s 12:36am: Do you know where your teenagers are?”

  1. What did you find out about the classes? I just upgraded to Xcode and I’m loving it, aside from some minor differences that cost me an afternoon transitioning my project. (If I’d listened to the compiler warnings in Project Builder before upgrading, it would’ve gone a bit more smoothly…)

  2. Well, for instance, how to use them. ๐Ÿ™‚ A CocoaDevCentral tutorial made it pretty easy. Basically, you create an NSToolbar, associate it with a window, and specify an object to act as its delegate by providing a method which provides NSToolbarItems (including all available items and the default set).

  3. I’m working with some 30 Project Builder projects at work, so moving to Xcode could be a major undertaking. I’ll most likely be installing Xcode tonight along with Panther, so we’ll see how things looks.
    By the way, which warnings? I’ve been happily ignoring this one:
    ld: warning dynamic shared library: not made a weak library in output with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1

  4. The warning that bit me in the ass on the transition to Xcode was that I was returning a value from a method that I’d declared as returning void. And I wasn’t just returning a variable; I was returning the result of a statement, like this:
    return [attributes setObject:anObj forKey:anAttr];
    In Jaguar, this gave a warning at compile time but worked anyway, and attributes (an NSMutableDictionary*) would have anObj added to it. In Panther, it gives the same warning about returning a value from a void-valued method, but at run-time, it does NOT add anObj to attributes. Because this was in a core data storage class for my application, the effects cascaded and I wound up spending a lot of time trying to figure out why my view wasn’t drawing correctly — it was because the attributes it was supposed to be using to draw were missing!
    It was silly of me to have left those functions like that, anyway — they had been returning the results of the setObject:forAttribute: call, but then I decided it was a reliable enough operation that for my research application I didn’t need to check it …. so I just changed the return type but not the return statement. Lazy me.

  5. I think Xcode is well worth the transition time, although in a corporate setting you may not have the luxury of making that decision for yourself.
    One thing to note is that some nice Xcode features (including Fix and Continue, I think, which is fantastic for my work) are available only if you migrate your PB targets to “Xcode native” targets. I think this changes the toolchain to the new one for that target, but I could be wrong about that. By default, when you open a PB project in Xcode, it leaves it in old-style PB target mode to maintain maximum compatibility.
    I’ve never come across the warning that you mentioned. But I tend to use a small number of libraries that I call frequently, so I wouldn’t need to make a “gratuitous reference to a symbol in the library” (I love that phrase!). Also, since my project is essentially a data-mining tool for my own use, I don’t care at all about backwards compatibility. ๐Ÿ™‚

  6. Aaron Hilton Avatar
    Aaron Hilton

    That’s sweet, I can’t wait to get my hands on Panther and Xcode tools. I’ve been itching to use a really good IDE on my iBook since I got it. Unfortunately, the closest IDE with these sorts of features was netbeans. but man, was it slow..
    Writing NeXT/Apple OSX apps is fun, and Xcode.. well.. it’s making me fidget in anticipation. Thinking about the whole switch thing, I’m surprised how much of a mac convert I’ve become in the last year. Damn it Krishen.. I think you started it! ๐Ÿ™‚
    Btw, thanks for the tut link. It’s time I start playing.