Re: firstResponder KVO snow leopard crash; bug?

2009-11-18 Thread Corbin Dunn
On Nov 17, 2009, at 1:04 PM, Aaron Clarke wrote: > We have an application that runs fine on leopard (10.5) but occasionally > crashes on snow leopard (10.6) when closing an NSWindow. Here is the > backtrace for the crash: > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Re

Re: firstResponder KVO snow leopard crash; bug?

2009-11-18 Thread Corbin Dunn
On Nov 17, 2009, at 1:04 PM, Aaron Clarke wrote: > We have an application that runs fine on leopard (10.5) but occasionally > crashes on snow leopard (10.6) when closing an NSWindow. Here is the > backtrace for the crash: > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Re

Re: firstResponder KVO snow leopard crash; bug?

2009-11-19 Thread Corbin Dunn
On Nov 18, 2009, at 5:06 PM, Sean McBride wrote: > On 11/18/09 9:00 AM, Corbin Dunn said: > >> Oh -- another thing. Does your subclass of NSCollectionView override: >> >> (void)viewWillMoveToWindow:(NSWindow *)window { >> >> but not call super? If not... ca

Re: firstResponder KVO snow leopard crash; bug?

2009-11-19 Thread Corbin Dunn
On Nov 18, 2009, at 5:28 PM, Aaron Clarke wrote: > > On Nov 18, 2009, at 12:00 , Corbin Dunn wrote: > >> >> On Nov 17, 2009, at 1:04 PM, Aaron Clarke wrote: >> >>> We have an application that runs fine on leopard (10.5) but occasionally >>> c

Re: Hightlight on mouseover a NSTextFieldCell inside a TableView

2009-12-01 Thread Corbin Dunn
On Dec 1, 2009, at 2:06 AM, Gustavo Pizano wrote: > Hello, I have been searching how to achieve this. > I have a NSTableView and the NSTableCells are a subclass I made. > Now I want to change the backgorund color of the table row when mouse over. > In my SubClass of NSTextFieldCell I tried ove

Re: Improving speed of NSCollectionView scrolling

2009-12-08 Thread Corbin Dunn
On Dec 8, 2009, at 3:40 PM, PCWiz wrote: > Hi, > > I am using NSCollectionView for a project in which the collection view is > populated with about 200 items, each containing about 4 subviews (image view, > and a few text fields). You may want to consider using a different view. NSCollectionV

Re: NSSavePanel crash!

2009-12-11 Thread Corbin Dunn
On Dec 11, 2009, at 8:49 AM, Half Activist wrote: > Hello All, > > I'm developping a document-based application that up to today could > read two document types and write one of the two. > So one type was set as an editor the other one as viewer in the > Info.plist. > All the

Re: ImageAndTextCell still the way to go for icons in outline views?

2009-12-16 Thread Corbin Dunn
Use the ImageAndTextCell as an example, or some of the later updated ones: http://developer.apple.com/Mac/library/samplecode/AnimatedTableView/index.html particularly: http://developer.apple.com/Mac/library/samplecode/AnimatedTableView/listing22.html Don't use an NSButtonCell or an NSBrowserCel

Re: ImageAndTextCell still the way to go for icons in outline views?

2009-12-16 Thread Corbin Dunn
On Dec 16, 2009, at 10:49 AM, Jens Alfke wrote: > > On Dec 16, 2009, at 10:05 AM, Corbin Dunn wrote: > >> Use the ImageAndTextCell as an example, or some of the later updated ones: > > Thanks! > > Is there a bug filed to add such a cell to AppKit? It's such

Re: ImageAndTextCell still the way to go for icons in outline views?

2009-12-16 Thread Corbin Dunn
On Dec 16, 2009, at 10:51 AM, Lee Ann Rucker wrote: > >> Don't use an NSButtonCell or an NSBrowserCell. > > Just curious - why shouldn't we use an NSBrowserCell? Aside from it not being > in an NSBrowser?___ I think you answered your own question. B

Re: NSTableView Cell edit values.

2009-02-25 Thread Corbin Dunn
Le Feb 25, 2009 à 10:44 AM, Totte Alm a écrit : Hello cocoa experts, I've stumbled on a problem with a GUI, where the user can edit values using a NSTableView, but if the user types something in a cell, then click the "do stuff" button while the cell is still in editmode, the current cha

Re: NSTableView Cell edit values.

2009-02-25 Thread Corbin Dunn
tValue delegate for the NSTableView (which get the newly edited value) is called after the method called from the NSTimer is called, which does the save. There must be a way to trigger "setObjectValue" directly so it is handled "now" and not "later". cheers,

Re: NSTableView Cell edit values.

2009-02-25 Thread Corbin Dunn
On Feb 25, 2009, at 12:14 PM, Totte Alm wrote: Hello, 25 feb 2009 kl. 19.58 skrev Corbin Dunn: Make the field editor resign first responder status; if it did successfully do that, then the change was committed. If not, a validation error happened. IE: [self.window

Re: NSTableView && Custom Background ...

2009-02-25 Thread Corbin Dunn
On Feb 25, 2009, at 2:58 PM, Mic Pringle wrote: Hi, I've a subclass of NSTableView that draws a custom gradient background. What I'd like to do now is to draw a slightly different background when the window containing the custom NSTableView loses focus. Is this possible ? If so, could someon

Re: Select tablecell on creation through arrayController

2009-02-25 Thread Corbin Dunn
On Feb 25, 2009, at 2:11 PM, Walker Argendeli wrote: I have a table with one column, that's bound to an array controller. It calls add: on the array controller when I hit a plus button. Problem is, I want the textFieldCell to be selected on creation. I rewired the plus button to call a

Re: NSTableView && Custom Background ...

2009-02-26 Thread Corbin Dunn
On Feb 26, 2009, at 1:09 AM, Mic Pringle wrote: 2009/2/25 Corbin Dunn : On Feb 25, 2009, at 2:58 PM, Mic Pringle wrote: Hi, I've a subclass of NSTableView that draws a custom gradient background. What I'd like to do now is to draw a slightly different background when the window

Re: OutlineView with custom TableColumn cell doesn't redisplay when losing focus

2009-02-26 Thread Corbin Dunn
Mic Pringle asked the same question yesterday; see the thread about it "Re: NSTableView && Custom Background ..." Short answer: watch window key notifications and redisplay the table. corbin On Feb 26, 2009, at 12:22 PM, Stuart Malin wrote: I have a custom cell attached to a TableColumn of an

Re: NSOutlineView - a way to adjust column widths without a header?

2009-02-26 Thread Corbin Dunn
Short answer: automatically, no. Manually, probably. All the logic is implemented in NSTableHeaderView. You'd have to subclass NSTableView and do the hit testing and work yourself in -mouseDown: and not call super when you do that logic. Just call setWidth: on the header when you want it to

Re: NSOutlineView - a way to adjust column widths without a header?

2009-02-27 Thread Corbin Dunn
On Feb 26, 2009, at 5:19 PM, Graham Cox wrote: On 27/02/2009, at 12:13 PM, Corbin Dunn wrote: Short answer: automatically, no. Manually, probably. All the logic is implemented in NSTableHeaderView. You'd have to subclass NSTableView and do the hit testing and work yourself in -mous

Re: OutlineView with custom TableColumn cell doesn't redisplay when losing focus

2009-02-27 Thread Corbin Dunn
On Feb 27, 2009, at 9:18 AM, Jerry Krinock wrote: On 2009 Feb 26, at 23:39, Stuart Malin wrote: BOOL isViewInFocus = self controlView] window] firstResponder] isEqual:[self controlView]]; Is there perhaps a better way to determine if a view is "key" ? No, but I believe you should al

Re: Live resizing NSTableView causes ghosting/nastiness in custom drawn NSTextFieldCell

2009-03-02 Thread Corbin Dunn
On Feb 27, 2009, at 4:02 PM, Andrew Yeaton wrote: I have a custom subclass of an NSTextFieldCell that draws a right- aligned "badge" (like Mail.app's unread count). The column that uses the custom cell autoresizes with the width of the NSTableView (which resizes with the window). The prob

Re: Changing NSTableView cell immediately before editing

2009-03-03 Thread Corbin Dunn
On Mar 3, 2009, at 7:32 AM, K. Darcy Otto wrote: Well, I've tried just about everything I can think of at this point, but can't change the NSTableView cell successfully. To give some more detail, the cell text is red when there is an error, but when the user goes to edit the cell, I want

Re: binding to number of selected rows in a table

2009-03-04 Thread Corbin Dunn
On Mar 3, 2009, at 6:38 PM, James Walker wrote: I want to use bindings to set certain control attributes (enabled state, tool tip) depending on the number of selected rows in an outline table. I have a controller object that owns an NSOutlineView, and I gave it an accessor - (NSOutlineV

Re: NSTextFieldCell text color issue in NSTableView with source list highlighting

2009-03-12 Thread Corbin Dunn
On Mar 12, 2009, at 3:51 AM, jonat...@mugginsoft.com wrote: The recommended way to override the text color in an NSTableView NSTextFieldCell is detailed here: http://www.cocoabuilder.com/archive/message/cocoa/2008/11/5/222008. However, there seems to be a problem setting the text color of a

Re: NSTableView live resizing glitch

2009-03-12 Thread Corbin Dunn
On Mar 12, 2009, at 3:33 PM, Ulai Beekam wrote: Hi, I'm having an NSTableView live resizing glitch that is driving me nuts. Please see this image: http://img15.imageshack.us/img15/2012/picture1tcz.png Howdy! Do you have a test case for this? If so, please log a bugreporter.apple.com

Re: NSTableView live resizing glitch

2009-03-12 Thread Corbin Dunn
On Mar 12, 2009, at 3:50 PM, Chris Suter wrote: Hi Ulai, On Fri, Mar 13, 2009 at 9:33 AM, Ulai Beekam wrote: I'm having an NSTableView live resizing glitch that is driving me nuts. Please see this image: http://img15.imageshack.us/img15/2012/picture1tcz.png I really need to have th

Re: NSTableView live resizing glitch

2009-03-13 Thread Corbin Dunn
Please do log bugs when you run into these issues. I did back in August 2005: rdar://problem/4226145. It's still open but I haven't seen it recently so it might have been fixed in Leopard. Thanks! I had looked at your bug quite a few times (I promptly replied replies to the bug logged back o

Re: NSTextFieldCell text color issue in NSTableView with source list highlighting

2009-03-13 Thread Corbin Dunn
A quick side note on this problem (which I have confirmed is a bug): - (void)tableView:(NSTableView *)aTableView willDisplayCell:(id) aCell forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger) rowIndex { // note that when the NSTableView Highlight mode is set to source list

Re: NSTextFieldCell text color issue in NSTableView with source list highlighting

2009-03-13 Thread Corbin Dunn
A followup on this particular problem that Jonathan reported for people to reference: On Mar 12, 2009, at 3:51 AM, jonat...@mugginsoft.com wrote: NSTableViewSelectionHighlightStyleSourceList. The source list style attempts to add auto-formatting to the cell by setting the attributed stri

Re: NSTextFieldCell text color issue in NSTableView with source list highlighting

2009-03-13 Thread Corbin Dunn
On Mar 13, 2009, at 10:43 AM, Kyle Sluder wrote: On Fri, Mar 13, 2009 at 1:34 PM, Corbin Dunn wrote: Either solution is perfectly acceptable, and we'll increase our documentation to help developers understand the process of displaying cells. How about instead of changing the o

Re: setDataSource

2009-03-13 Thread Corbin Dunn
On Mar 13, 2009, at 3:14 PM, David Blanton wrote: Is it true that reloadData is synchronous while setDataSource (which makes a reload happen) is asynchronous ? What class are you referring to? NSTableView? All are synchronous, none are asynchronous. Tiling/redrawing is all lazily done.

Re: Changing a custom field editor's position

2009-03-16 Thread Corbin Dunn
On Mar 15, 2009, at 9:45 AM, Ulai Beekam wrote: Hi, Let's say I want to have the field editor for a table view appear 2 pixel below where it usually is, i.e. shifted 2 pixels down. How can I do this? Consider the following hypothetical situation: If I subclass NSTextView and override th

Re: [NSTableView] How should a grid be drawn?

2009-03-16 Thread Corbin Dunn
On Mar 16, 2009, at 4:06 PM, Iceberg-Dev wrote: I'm trying to draw a custom grid for a table view. I' using the code at the end of this post. The problem is that when I scroll the tableview, some of the horizontal lines are not drawn. I looked at different sample code on the net including

Re: NSTableView Drag and Drop doesn't work

2009-03-17 Thread Corbin Dunn
On Mar 17, 2009, at 8:41 AM, Jushin wrote: I did further investigation and found the reason. It was because the problem of "regsterForDraggedTypes" I just wanted to filter out images, so I used following to define types: NSArray* types = (NSArray*)CGImageSourceCopyTypeIdentifiers(); and th

Re: Weird NSTableView with checkboxes issue

2009-03-19 Thread Corbin Dunn
my datasource/tableview is copied from another project that does exactly the same thing and it scrolls just fine. The console/ debugger etc. show nothing is amiss. Ashley posted what is most likely the problem. FWIW, to solve issues like this, use 'sample' and Shark. Include the sample a

Re: Pointing OutlineView to a folder on the Desktop

2009-03-19 Thread Corbin Dunn
Modify the rootItem method in FileSystemItem to be the root path that you are interested in. That's the model object, which you need to change. The code below is the controller object, and is simply controlling the view. .corbin On Mar 18, 2009, at 4:19 AM, David Yamartino wrote: Below i

Re: Stop NSScrollView from catching scroll events.

2009-03-23 Thread Corbin Dunn
On Mar 23, 2009, at 2:35 PM, Ben Lachman wrote: On Mar 23, 2009, at 10:54 AM, Michael Ash wrote: On Mon, Mar 23, 2009 at 3:46 AM, Ben Lachman wrote: I have a tableview that's neatly wrapped in a scroll view by IB. I manually resize the scrollview whenever a row is added to the tableview

Re: De-Mystifying NSCell

2009-03-24 Thread Corbin Dunn
I should mention that it is very beneficial to log bug requests at bugreporter.apple.com requesting clarification on any point with NSTableView/NSCell that is difficult to figure out from the existing documentation. Thank you for creating this great video. If you are looking for another sub

Re: De-Mystifying NSCell

2009-03-24 Thread Corbin Dunn
Good question! On Mar 24, 2009, at 3:46 PM, I. Savant wrote: Corbin: On Mar 24, 2009, at 6:40 PM, Corbin Dunn wrote: I should mention that it is very beneficial to log bug requests at bugreporter.apple.com requesting clarification on any point with NSTableView/NSCell that is difficult to

Re: Custom NSCell issues

2009-03-25 Thread Corbin Dunn
On Mar 25, 2009, at 2:47 PM, malcom wrote: hello I'm using a custom NSCell in order to draw some elements in an NSTableView. I've created a simple tableview with 2 row. However my draws is always put on first row while the second one is empty. This my code for NSOutlineView delegate http://past

Re: Preventing highlight of RowSelection in NSTableView

2009-03-27 Thread Corbin Dunn
On Mar 27, 2009, at 10:53 AM, Jerry Krinock wrote: On 2009 Mar 27, at 04:40, Sourabh Sahu wrote: How can we prevent the highlight feature , when we select row in NSTableView. I also want to shouldSelectRow return YES. I believe this will do what you want: If you're building for Leopard

Re: NSTableColumn's sort key in Interface Builder

2009-03-30 Thread Corbin Dunn
On Mar 30, 2009, at 12:16 PM, Mike Manzano wrote: Hello, I have a table view whose delegate's - tableView:objectValueForTableColumn:row: returns an NSDictionary with key value pairs that look like this for each of its columns (the columns' cells are responsible for extracting some subset

Re: [Q] doubleAction on a NSTableView misbehaving?

2009-04-02 Thread Corbin Dunn
Hi Eric, The documentation for setDoubleAction on a NSTableView states: If the double-clicked cell is editable, this message isn’t sent and the cell is edited instead. Oops! Can you please use the "documentation feedback" to log some feedback and say that is incorrect. Actually, wh

Re: Disabling Highlighting of Row Selection in NSTableView

2009-04-02 Thread Corbin Dunn
Hi Sourabh, It sounds like you missed my prior reply to your original email. Here it is again: This should work on tiger too. You also should subclass your cells and make sure they don't draw any highlighting by overriding this and returning nil: - (NSColor *)highlightColorWithFrame:(N

Re: NSDocument reference held by NSSavePanel?

2009-04-13 Thread Corbin Dunn
On Apr 12, 2009, at 8:33 PM, Quincey Morris wrote: (gdb) info gc-roots 0x1225400 Number of roots: 1 Root: 0 Kind: global rc: 0 Address: 0xa03f1214 Symbol: shared.176062 warning: can't find class named `NSToolTipManager' given by ObjC class object 1 Kind: object rc: 0 Address: 0x0

Re: mouseDragged: with NSTableView

2009-04-17 Thread Corbin Dunn
On Apr 17, 2009, at 1:56 PM, Ben Lachman wrote: Does anyone know of a way to get a mouseDragged event for a tableview? I've sub-classed NSTableView and it's enclosing scrollview to no effect (doesn't even hit -mouseDragged:). My guess is that it is being eaten by the clip view, but there

Re: canBeVisibleOnAllSpaces added in 10.5 and deprecated in 10.5?

2009-04-21 Thread Corbin Dunn
On Apr 21, 2009, at 2:34 PM, Sean McBride wrote: Hi, Can someone explain how a method added in 10.5 can be deprecated in 10.5? [sic] That metho

Re: canBeVisibleOnAllSpaces added in 10.5 and deprecated in 10.5?

2009-04-21 Thread Corbin Dunn
On Apr 21, 2009, at 2:34 PM, Sean McBride wrote: Hi, Can someone explain how a method added in 10.5 can be deprecated in 10.5? [sic] I also for

Re: [NSOutlineView] _outlineCell and _trackingOutlineCell vs 64-bit

2009-04-22 Thread Corbin Dunn
Howdy, On Apr 22, 2009, at 4:37 AM, Iceberg-Dev wrote: What's the official way to replace _outlineCell and _trackingOutlineCell in Cocoa 64-bit? I do this for 32-bit: @implementation NSOutlineView (PrivateCells) - (NSButtonCell *) outlineCell { return _outlineCell; } Note that wh

Re: [NSOutlineView] _outlineCell and _trackingOutlineCell vs 64-bit

2009-04-22 Thread Corbin Dunn
On Apr 22, 2009, at 10:29 AM, Iceberg-Dev wrote: On Apr 22, 2009, at 5:50 PM, Corbin Dunn wrote: Howdy, On Apr 22, 2009, at 4:37 AM, Iceberg-Dev wrote: What's the official way to replace _outlineCell and _trackingOutlineCell in Cocoa 64-bit? I do this for 32-bit: @implement

Re: NSOpenPanel listing .app's and Mac OS X executables

2009-04-23 Thread Corbin Dunn
On Apr 23, 2009, at 12:40 AM, Arun wrote: I have used [NSArray arrayWithObjects:@"public.executable",@"app",nil] . This will allow me to choose only executables and applications (.app's). But If i create an executable from command line using gcc - a.out, it is not allowing me to select the

Re: ESC while editing NSOutlineView subclass

2009-04-23 Thread Corbin Dunn
The easiest way to do this is to just subclass tableview and override keyDown:. IE: - (void)keyDown:(NSEvent *)theEvent { NSString *keyString = [theEvent charactersIgnoringModifiers]; unichar keyChar = ([keyString length]) > 0 ? [keyString characterAtIndex:0] : 0; BOOL handledKey

Re: NSTableView variable row height and noteHeightOfRowsWithIndexesChanged during live resize

2009-04-23 Thread Corbin Dunn
On Apr 23, 2009, at 2:55 PM, Stuart Malin wrote: I have an NSTableView with a single column that has a custom cell. During a live resize, I recalculate the row height in the delegate method -tableView:heightForRow: and return the result. However, some rows don't grow larger. I presume I ne

Re: NSTableView variable row height and noteHeightOfRowsWithIndexesChanged during live resize

2009-04-23 Thread Corbin Dunn
On Apr 23, 2009, at 3:37 PM, Stuart Malin wrote: On Apr 23, 2009, at 12:33 PM, Corbin Dunn wrote: On Apr 23, 2009, at 2:55 PM, Stuart Malin wrote: I have an NSTableView with a single column that has a custom cell. During a live resize, I recalculate the row height in the delegate

Re: NSTableView variable row height and noteHeightOfRowsWithIndexesChanged during live resize

2009-04-24 Thread Corbin Dunn
On Apr 23, 2009, at 5:44 PM, Stuart Malin wrote: On Apr 23, 2009, at 1:18 PM, Corbin Dunn wrote: On Apr 23, 2009, at 3:37 PM, Stuart Malin wrote: On Apr 23, 2009, at 12:33 PM, Corbin Dunn wrote: On Apr 23, 2009, at 2:55 PM, Stuart Malin wrote: I have an NSTableView with a single

Re: NSTableViews Load Progressively.

2009-04-27 Thread Corbin Dunn
On Apr 27, 2009, at 7:10 AM, Philip Juel Borges wrote: Hi, I have an application that contains 2 nstableviews populated by a property list file. A selection in one changes what is displayed in the next, which in turn loads an html-file in my webview. How do I load the tableviews progress

Re: click in NSButtonCell in NSTableView without selecting table row?

2009-04-27 Thread Corbin Dunn
On Apr 27, 2009, at 1:43 PM, Dan Rowley wrote: Hello - I've done multiple searches and seen this topic discussed, but none with a solution that doesn't feel like a hack. I have an NSTableView, and one column that contains an NSButtonCell. I would like the user to be able to interact with

Re: click in NSButtonCell in NSTableView without selecting table row? [SOLVED]

2009-04-28 Thread Corbin Dunn
is using -clickedColumn and -clickedRow to determine the location of the click, and not selecting the row (returning NO) if the cell in that location is an enabled NSButtonCell. I had originally discarded this approach because of this line in the documentation for -clickedColumn: " The ret

Re: NSButtonCell visibility binding in NSOutlineView [SOLVED]

2009-04-29 Thread Corbin Dunn
On Apr 29, 2009, at 9:31 AM, Chris Tracewell wrote: Kyle, Thanks for the reply. Yes I know and agree on the issue of the usability. I struggled with this but ultimately felt it was essential as other options disassociated the property from the object too much or made it appear that a giv

Re: NSSavePanel runModalForDirectory, set name selection?

2009-05-04 Thread Corbin Dunn
On Apr 30, 2009, at 1:28 PM, Henrietta Read wrote: Question, I'm passing a file name such as 'MyTextFile.txt' to NSSavePanel runModalForDirectory. When the panel appears the entire string is selected, but I would rather that just 'MyTextFile' is selected. Is it possible to set the selectio

Re: NSOutlineView with NSImage and NSStrings

2009-05-04 Thread Corbin Dunn
On May 1, 2009, at 2:59 PM, iseecolors wrote: I would like to have an image and a string together in my NSOutlineView, but it is not clear to me how to do this. Basically I want to do what iTunes appears to do (icons in front of the text descriptors). My initial thought was to return an

Re: NSTableView, 2mln rows, looks bad.

2009-05-04 Thread Corbin Dunn
On May 4, 2009, at 1:46 PM, Тимофей Даньшин wrote: Hello. I need to have a tableView with about 2 million rows, and that figure may actually be bigger. But the table looks awfully bad in that case: you get artifacts when scrolling, the text in the rows does not coincide with the alternate

Re: Custom tableView cell by subclassing NSCell

2009-05-06 Thread Corbin Dunn
On May 6, 2009, at 3:50 PM, Malayil George wrote: Thanks Joar. Turns out you were right...it wasn't really because of the retain/copy semantics in my property declaration. Changing the variable name to myImage and the setter/getters accordingly has taken care of the issue and it works fi

Re: Text color in NSOutlineView's selected row

2009-05-07 Thread Corbin Dunn
On May 7, 2009, at 6:52 AM, Kevin Gessner wrote: On May 7, 2009, at 3:39 PM, develo...@mugginsoft.com wrote: Try reviewing this thread - it might help http://www.cocoabuilder.com/archive/message/cocoa/2009/3/12/232149 Thanks for the pointer - that's what I get for not Googling for th

Re: Custom NSImageView

2009-05-07 Thread Corbin Dunn
On May 7, 2009, at 8:16 AM, Livio Isaia wrote: I create MyImageView (from NSImageView) which must use MyImageCell (from NSImageCell). I put MyImageView in MyWindow with Interface Builder, creating an NSImageView and setting its class to MyImageView. The cell is encoded in the nib. You ca

Re: Text color in NSOutlineView's selected row

2009-05-07 Thread Corbin Dunn
On May 7, 2009, at 2:28 PM, Kevin Gessner wrote: On May 7, 2009, at 6:11 PM, Corbin Dunn wrote: On May 7, 2009, at 6:52 AM, Kevin Gessner wrote: On May 7, 2009, at 3:39 PM, develo...@mugginsoft.com wrote: Try reviewing this thread - it might help http

Re: Updating NSTableView

2009-05-14 Thread Corbin Dunn
On May 14, 2009, at 7:49 AM, I. Savant wrote: On Thu, May 14, 2009 at 10:41 AM, Scott Ribe > wrote: First a fast way to read the data off disk to begin with, for start up time. Then caching of row heights when they are calculated. Finally binary search of row heights/positions whe

Re: Updating NSTableView

2009-05-14 Thread Corbin Dunn
You are welcome to log a bug report requesting a sample. Please detail the things you would like to see in it. These are also the types of things we could cover at a WWDC event. I will be giving an advanced table view talk: "Presenting User Data with Table Views and Browsers" http://develop

Re: NSOpenPanel listing .app's and Mac OS X executables

2009-05-15 Thread Corbin Dunn
On May 15, 2009, at 4:52 AM, Arun wrote: Hi.. If i use type: [NSArray arrayWithObjects:@"public.executable",@"app",nil], i am able to select unix-executables and .app's in Leopard. But if i try the same thing in tiger, it is not allowing me to select unix-executable files. Is there any

Re: NSOpenPanel listing .app's and Mac OS X executables

2009-05-15 Thread Corbin Dunn
2009, at 9:06 AM, Arun wrote: ok.. what is the option in Tiger? any suggestions? -Arun On Fri, May 15, 2009 at 9:04 PM, Corbin Dunn wrote: On May 15, 2009, at 4:52 AM, Arun wrote: Hi.. If i use type: [NSArray arrayWithObjects:@"public.executable",@"app",nil], i

Re: Memory management in QuickLook plugin

2009-05-20 Thread Corbin Dunn
On May 20, 2009, at 6:34 AM, Georg Seifert wrote: Hi, I’m developing a QuickLook plugin for a custom binary file format. As long as I did not cared about memory leaks everything was fine. Then I fixed the leak with the help of Instruments. Everything runs fine from xCode and Instrume

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Corbin Dunn
But the scrolling is not smooth and the CPU usage was 60 % - 80%. I think application is taking time to convert NSString into a CGImage. Do you know that is the case? If you have any performance issue, you should use sample and Shark. Then you can try to figure out what is wrong. -corb

Re: performSelectorOnMainThread problem

2009-05-28 Thread Corbin Dunn
On May 28, 2009, at 9:46 AM, Ben Einstein wrote: On May 28, 2009, at 12:36 PM, Jeff Johnson wrote: Three general possibilities: (1) aControllerObject is nil. Definitely not the problem because it works when calling performSelector: without the mainThread part. (2) The main run loop i

Re: Table column resizing overlaps the text with other column contents

2009-05-29 Thread Corbin Dunn
On May 29, 2009, at 10:00 AM, Arun wrote: Hi All, I have a application in which i display application names along with an image in a table column. Also i display their versions in another column. I have used custom ImageAndText cell for the first column and NSTextFieldCell fro the second

Re: NSTableView - setting row heights

2009-06-01 Thread Corbin Dunn
On Jun 1, 2009, at 2:50 AM, Peter Hudson wrote: The problem appears when I try to select a row. Rows are not selectable. When I try to select a row I get the error message NSConcreteMutableAttributedString addAttribute:value:range:: nil value Break on objc_exception_throw and look at the b

Re: NSTableView - setting row heights

2009-06-01 Thread Corbin Dunn
derlying code has clearly used the attributed strings to draw the contents in the first place. Is the mechanism of rendering different when I try to select a row ? Peter On 1 Jun 2009, at 16:37, Corbin Dunn wrote: On Jun 1, 2009, at 2:50 AM, Peter Hudson wrote: The problem appears w

Re: Replacing a tableView Cell with null

2009-06-05 Thread Corbin Dunn
On Jun 5, 2009, at 4:01 PM, Steven Hamilton wrote: Hi, I have an NSTableview populated by bindings to Core Data. In one column I have a popupbutton (bad idea as its slow, I know) and in another I have a checkbox. I only want the checkbox to be available when certain items from the popupbu

Re: nsoutlineview crashes

2008-02-22 Thread Corbin Dunn
On Feb 22, 2008, at 6:51 AM, Julius Eckert wrote: Hi, i am implementing a datasource for an nsoutlineview to represent the contents of a simple tree-structure defined by the following class (simplified): @interface TBCatalogNode : NSObject { NSMutableArray* children; } @property (readonly,

Re: Private Methods

2008-02-22 Thread Corbin Dunn
Please do log this as a bug/feature request for obj-c. (To make @private, etc work on methods). -corbin On Feb 22, 2008, at 3:00 AM, Philip Bridson wrote: How do I make a method private? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pl

Re: -outlineView:heightOfRowByItem: gets an item of NULL??

2008-02-22 Thread Corbin Dunn
It shouldn't ask you for the height of a NULL item. This is either: 1. a bug in nsoutlineview 2. your code may be reloading the nsoutlineview in one of the delegate methods, putting it into a "strange" state. If you see this happening consistently, you may want to break on NSOutlineView reloa

Re: -outlineView:heightOfRowByItem: gets an item of NULL??

2008-02-22 Thread Corbin Dunn
ld itself from scratch. If that's not kosher, I need to seriously reevaluate a lot of code. Corbin Dunn wrote: > It shouldn't ask you for the height of a NULL item. > > This is either: > 1. a bug in nsoutlineview > 2. your code may be reloading the nsoutlineview in one

Re: -outlineView:heightOfRowByItem: gets an item of NULL??

2008-02-22 Thread Corbin Dunn
et me know. I would like to see it. Also, would you like a call stack of my NULL-item bug? Would that help for diagnosing it? Corbin Dunn wrote: On Feb 22, 2008, at 11:53 AM, John Stiles wrote: Is it illegal to call -reloadData from inside a delegate method? It depends where. I

Re: Resizable Text Cell in NSTableView

2008-02-26 Thread Corbin Dunn
The general approach is to create a custom NSTextView subclass for the field editor, and to return it from an NSWindow subclass via - (NSText *)fieldEditor:(BOOL)createFlag forObject:(id)anObject. However, it isn't easy to get all the details right. Please do log bugs requesting this abilit

Re: Table column index

2008-02-26 Thread Corbin Dunn
On Feb 25, 2008, at 4:41 PM, Quincey Morris wrote: On Feb 25, 2008, at 15:12, glenn andreas wrote: And it actually hints to the contrary, since -tableColumns is document to include the hidden columns as well (and doesn't say if they are at the end or in the middle) I just tried it, and

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-28 Thread Corbin Dunn
On Feb 26, 2008, at 10:21 PM, Seth Willits wrote: On Feb 26, 2008, at 3:13 PM, John Stiles wrote: Trying to simulate the drawing behavior of NSCell seems error-prone to me. Since I don't have access to the original code, it would be hard to match its behavior. I'd much rather inherit as muc

Re: Drag and drop single cell in a table/matrix

2008-02-28 Thread Corbin Dunn
Override: - (NSImage *)dragImageForRowsWithIndexes:(NSIndexSet *)dragRows tableColumns:(NSArray *)tableColumns event:(NSEvent*)dragEvent offset: (NSPointPointer)dragImageOffset limit the columns passed based on the column at the event's location. The rest is up to your delegate/datasource

Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView

2008-03-03 Thread Corbin Dunn
On Mar 2, 2008, at 4:58 PM, Rosyna wrote: Have you tried overriding - (BOOL)canFocusCell:(NSCell *)cell atTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row; to return NO in an outline view subclass? Please don't override this method. It is a private, internal AppKit method, wh

Re: displaying image and multiple rows of text in NSTableView row

2008-03-03 Thread Corbin Dunn
On Mar 3, 2008, at 6:34 AM, Nick Rogers wrote: Hi, I'm using NSTableView for displaying. Now I need to show an icon in every row and also have to display 2 rows of text in one row of tableView. Is it possible, if yes then how and can i incresse a row's width to accomodate two rows of text?

Re: two table view selection problem

2008-03-04 Thread Corbin Dunn
On Mar 4, 2008, at 8:09 AM, Andy Lee wrote: Try changing the -isEqual: calls to == instead, e.g.: if ([notification object] == tableView1) I suspect -isEqual: is always returning YES. No, this is not the problem. Using == is okay (and faster), since NSView's are always unique. -c

Re: two table view selection problem

2008-03-04 Thread Corbin Dunn
On Mar 4, 2008, at 6:49 AM, Stéphane wrote: On Mar 4, 2008, at 3:35 PM, Nick Rogers wrote: Hi, I have two NSTableView in my app (tableView1 and tableView2). If I select a row in tableView1 and then if I select a row in tableView2, I want the row in tableView1 to be deselected. For this I'm

Re: two table view selection problem

2008-03-04 Thread Corbin Dunn
On Mar 4, 2008, at 8:28 AM, Stephane Sudre wrote: On 4 mars 08, at 17:14, Corbin Dunn wrote: On Mar 4, 2008, at 6:49 AM, Stéphane wrote: On Mar 4, 2008, at 3:35 PM, Nick Rogers wrote: Hi, I have two NSTableView in my app (tableView1 and tableView2). If I select a row in tableView1 and

<    1   2   3   4   5   6