About

This is the M Cubed Software weblog. To find out more about us head to our about page.


Search


Feed

 Subscribe (Atom)


Archives

Rules and Tokens

Posted on 12/05/2007 at 06:23 AM in

First, a little oddity I noticed while messing around in Interface Builder today. If you add an NSTextFieldCell to a table column and try to change it’s class you’ll notice that it doesn’t list NSTokenFieldCell. If you want to have a token cell in your table you have to add the NSTokenFieldCell header from AppKit into IB. Why it isn’t already in IB I don’t know, but it’s worth pointing out.

And now onto something a bit more exciting. I’ve spent the day working on our next application and hit a snag when I wanted to build a rule editor, similar to those used in Mail and iTunes for smart Mailboxes/Playlists. After spending a few hours trying to write something I gave up and decided to look for sample code on the interweb. After much searching I found that there wasn’t really any code that did what I want, things were looking glum. Then I stumbled across this code and suddenly the sun came out (thanks a lot to Joar for this code). Several hours later and I had a working rule editor. All that was left to do was package it up, update our Open Source site and write a blog post (*checks writing blog post off his list*).

So here it is, M3RuleEditor. Feel free to download it, use it, hack it, put it in your apps, make soup from it…. whatever takes your fancy. And keep a look out for this code appearing in a new M Cubed app coming soon wink

image

(1) Comments





Comments

I’m guessing the reason that NSTokenFieldCell doesn’t appear in that list is that under Tiger, using Token Field Cells in NSTableViews and NSMatrix wasn’t full supported / working. There’s a note in the docs about it somewhere, which I can’tr track down for the moment, but there’s this for now:

http://www.cocoabuilder.com/archive/message/cocoa/2006/6/10/165371

Posted by ssanchez on 16/05/2007 at  12:33 AM

Post a Comment

Commenting is not available in this weblog entry.

<< Back to main