About
This is the M Cubed Software weblog. To find out more about us head to our about page.
Search
Feed
Archives
- June 2010
- April 2010
- March 2010
- February 2010
- January 2010
- November 2009
- August 2009
- July 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
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 ![]()
(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