set the label for the left hand expression / popup in an NSPredicateEditorRowTemplate?

2010-01-13 Thread Mike Chambers
I am looking for some input on how to set the label for the left hand expression / popup in an NSPredicateEditorRowTemplate. I need to programmatically create a NSPredicateEditorRowTemplate so I can populate the right side expression / drop down with dynamically generated values. In my subclass,

Problem chaining initialization methods

2010-01-03 Thread Mike Chambers
I am having a weird problem when chaining initializers in a class which extends NSPredicateEditorRowTemplate. If I call the -(id)initWithArray:(NSArray *)arr forKeyPath:(NSString *)keyPath andTitle:(NSString *)title initializer directly when initializing, then everything works. However, if I

Reference NSSearchFieldCell within NSSearchField?

2009-12-29 Thread Mike Chambers
The NSSearchField docs mention that it wraps an NSSearchFieldCell, which contains such APIs as setSendsWholeSearchString (which i need to dynamically set). Is there any programatic way to get a reference to the NSSearchFieldCell wrapped in a particular NSSearchField? I know I can link an IBOutlet

Customizing left expression title in NSPredicateEditorRowTemplate

2009-12-28 Thread Mike Chambers
I have am creating a simple NSPredicateEditorRowTemplate instance that I instantiate like so: NSMutableArray *seriesExpressions = [NSMutableArray arrayWithCapacity:[series count]]; for(NSString *s in series) { [seriesExpressions addObject:[NSExpression

Re: Customizing left expression title in NSPredicateEditorRowTemplate

2009-12-28 Thread Mike Chambers
ok. I got this working by adding: - (id)copyWithZone:(NSZone *)zone { return [self retain]; } to my template subclass. Can anyone tell me if I am approaching this the correct way? mike On Mon, Dec 28, 2009 at 2:42 PM, Mike Chambers mikechamb...@gmail.com wrote: I have am creating

Having problems understanding NSPredicateEditor

2009-12-26 Thread Mike Chambers
I have an application that contains a NSTableView of Card data types. The NSTableView gets its data from an NSArray of Card instances. I want to allow the user to be able to filter the view based on the Card fields. I know I need to use a NSPredicateEditor to present the UI for the user, and to

Encoding / Decoding CGPoint with NSCoder

2009-01-15 Thread Mike Chambers
I am using NSCoder to encode my class. This is working fine, but I am having trouble figuring out how to encode CGPoint. I have searched online, but have found some conflicting information, and as I am relatively new to Objective-C, I am having trouble figuring it out. Does anyone have a simple

Is NSKeyedArchiver portable / reliable?

2008-12-19 Thread Mike Chambers
I need to include a set of data with my application. It is an Array of about 1500 objects. Since this may also be used as an iphone app, I need this to be as fast and efficient as possible. I want to use NSKeyedArchiver to serialize the data to a file, and then include that file in the

NSTextField in a sheet and focus

2008-12-09 Thread Mike Chambers
I have a sheet which contains an NSTextField. I need to allow users to enter line returns in the textfield, so I have implemented the functionality according to this apple note: http://developer.apple.com/qa/qa2006/qa1454.html This works great. However, if the user clicks out of the text field

Sheet opens but not attached to window

2008-12-08 Thread Mike Chambers
I am trying to create a custom sheet for my application. The sheet is contained in a separate nib named CalendarSheet, and has a class called CalendarSheetController set as its File Owner. (The class is below). I open the sheet like so: [calendarSheet showSheet:mainWindow]; Where mainWindow is

How to design / structure sheets

2008-12-05 Thread Mike Chambers
I am creating a custom sheet for my application which allows a user to add an item to iCal. However, it is not clear to me the best way to structure my code. Im following the info at:

Creating a Bottom Bar on NSWindow

2008-12-02 Thread Mike Chambers
I am working on an app, and need to create a bottom bar for it. I could not find any control or info on how to do this, but I noticed that if I set the Appearance : Texture attribute to true in Interface Builder (for the window), I seemed to get a bottom bar. You can see a screenshot here:

Cant set state of NSMenuItems attached to NSSearchField

2008-11-30 Thread Mike Chambers
I have an NSMenu attached to an NSSearchField as a searchMenuTemplate. The menu is as Follows: --- All Start End Country Station Notes Frequency If the user selects All, I want to remove all check marks from other selected menu items. If the user selects anything except All, then I

NSMutableArray vs NSArrayController

2008-11-28 Thread Mike Chambers
I have a simple app that uses an NSArrayController to bind data to an NSTableView. The NSArrayController is bound to a NSMutableArray. When the app loads I load data from a file, and add it to the NSMutableArray. However, the data does not appear in the NSTableView until I click one of the headers

Binding : NSArrayController does not reflect changes to NSMutableArray

2008-11-27 Thread Mike Chambers
First, I am new to Cocoa, so I apologize if this question is super simple. I am currently reading through Cocoa Programming for Max OS X, and am trying to create a simple example of a NSTableView that is bound to an NSArrayController which is bound to an NSMutableArray in my application

Re: Binding : NSArrayController does not reflect changes to NSMutableArray

2008-11-27 Thread Mike Chambers
fyi I figured out the issue. I had mispelled one of the properties in my nib which was causing the problem. mike On Thu, Nov 27, 2008 at 12:12 AM, Mike Chambers [EMAIL PROTECTED] wrote: First, I am new to Cocoa, so I apologize if this question is super simple. I am currently reading through