Accessing FilesOwner fm controller

2009-11-16 Thread Harry Plate
I am writing a plugin to another application, and I must manage my own NIBs. I have been successful loading them and getting some of the basic UI elements working. But, what I am having trouble with is communicating with "File's Owner". When I instantiate the NIB, I pass my class as owner - then

NSOpenPanel accessoryView and new windows...

2009-11-16 Thread Harry Plate
I am successful creating/defining an accessoryView for an NSOpenPanel. However, I find that some secondary windows that are displayed as a result of a button in that accessory view, do not get displayed properly, nor am I able to get keyboard focus to that window. When I say "properly", the new w

Trying to display a simple sheet

2009-01-19 Thread Harry Plate
This is a newbie question I am certain. I am experimenting with sheets with a simple application (1st cocoa app) and want to display a simple alert message as a sheet. 1) So my first mistake was to use NSRunAlertPanel(). Did its thing but gave me an independent window. 2) Further reading disclose

Re: Trying to display a simple sheet

2009-01-20 Thread Harry Plate
Scott, > NSApp beginSheet is the correct method, without any runModalForWindow. > Thanks. I did finally find the crux of my problems; I had been trying to do all this prototyping within the -awakeFromNib method. Apparently that is "too soon" - as everything worked just fine when I moved the cod

NSTextView and front/middle/back ellipses

2009-01-22 Thread Harry Plate
I have a simple text view that will display its text information with an ellipses on the right (end) if the string is too long for the view. Nice, but... How can I tell NSTextView to use a "front" or "middle" ellipses for viewing purposes? -h ___ Coc

Re: NSTextView and front/middle/back ellipses

2009-01-23 Thread Harry Plate
Randall, >> How can I tell NSTextView to use a "front" or "middle" ellipses for >> viewing >> purposes? > > You'll have to set a (mutable) paragraph style, and specify > NSLineBreakByTruncatingHead or NSLineBreakByTruncatingMiddle for the > NSLineBreakMode using -setLineBreakMode:. Thanks a bun

NSTableView crash when selected.

2009-02-13 Thread Harry Plate
I am struggling w/ a crash in my first Cocoa app that is using a TableView. Some history: my app and its table view was working just fine when I was simply adding NSString objects to the table. Then I started using NSAttributedString instead so I could get the display ellipses. Now after draggin

Re: NSTableView crash when selected.

2009-02-17 Thread Harry Plate
Shawn, Corbin, Thanks for the suggestions! [Corbin] > 1. break on objc_exception_throw : > http://www.corbinstreehouse.com/blog/index.php/2008/08/your-most-important-bre > akpoint-in-cocoa/ > 2. Use Instruments to find the over release: > http://www.corbinstreehouse.com/blog/index.php/2007/10/ins

Re: NSTableView crash when selected.

2009-02-17 Thread Harry Plate
Andy, > You don't know and it doesn't matter. Don't think in terms of retain > counts. Think about whether you "own" an object, i.e., whether you > are responsible for releasing it. Good stuff! Thank you. That "mmObjectOwnership" doc is good. Had not seen that before I am sure that I will tri

NSTableView behavior changes

2009-02-17 Thread Harry Plate
I am new to NSTableView (and to Cocoa for that matter) so excuse my lame questions. I have an NSTableView doing what I want (kinda), but I want to modify its behavior, and I am at a loss as where to begin. What I want is this: 1) to disable any possible editing of the "strings" in the table.

Re: NSTableView behavior changes

2009-02-17 Thread Harry Plate
Graham, Thanks for the insights! > > In IB, select the table column, and uncheck 'editable'. This will > prevent the item getting into the editable state at all. > IB is kinda tricky here; one must "drill down" into the table view until one can see the column properties. But I got there! >

Re: NSTableView behavior changes

2009-03-17 Thread Harry Plate
Graham, Finally getting back to this problem. >>2) I would like my user to be able to select a table entry, and >> be able >> to respond to the 'delete' key - by discarding the selected entry. >> Currently >> that does not work at all. > > You have to make this happen yourself. The controlle

Re: NSTableView behavior changes

2009-03-18 Thread Harry Plate
Matt, >> 1) I defined my controller class: >>@interface MCController : NSResponder >> >> 2) I then defined (void)deleteBackward:(id) >> >> 3) in -awakeFromNib, I set my controller as 1st responder: >> >>[sourceTableView setNextResponder:self] > > Instead of 2, define keyDown and chec

Re: NSTableView behavior changes

2009-03-18 Thread Harry Plate
Raleigh, Ahhh. Certainly I was suspecting that the some other class wanted to deal with the key equivelant. > That's because Cmd-A is a key equivalent. The "Select All" Edit menu item gets > triggered for you. I don't understand what you mean by "uneditable" table > view. Editable and selectable