Re: Leak in NSSavePanel

2008-06-25 Thread Corbin Dunn
On Jun 24, 2008, at 3:55 PM, Jelle Vandebeeck wrote: When I try to call the NSSavePanel, I always receive some memory leaks on it. I have no idea if they are bad or not so bad... I just can't find a decent tutorial on the Instruments tool. Have you tried using the "leaks" tool in instruments

Re: Sourcelist background colors

2008-06-25 Thread Corbin Dunn
On Jun 25, 2008, at 3:52 PM, Markus Spoettl wrote: On Jun 25, 2008, at 3:33 PM, Keith Duncan wrote: Be sure to redisplay your view when the window looses key-ness. How would this be achieved? I've been trying to figure it out, I'm sure there's something simple eluding me. It appears to

Re: Leak in NSSavePanel

2008-06-27 Thread Corbin Dunn
On Jun 26, 2008, at 3:23 PM, Jelle Vandebeeck wrote: Hi Corbin, You should check out this link: http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSSavePanel_Class/Reference/Reference.html The word singleton is used :-) Thank you -- I logged a bug against our

Re: trackmouse problems in Leopard

2008-06-30 Thread Corbin Dunn
On Jun 30, 2008, at 7:24 AM, Moray Taylor wrote: Yes! it did! Thanks a lot, I'm not sure if I'd ever have figured hat one out. I highly recommend reading the AppKit release notes, which covers things like this problem. http://developer.apple.com/releasenotes/Cocoa/AppKit.html --corbin

Re: Disabling column selection NSTableView

2008-07-02 Thread Corbin Dunn
I've disabled column sorting. When I click on the header it seems to select the entire row. You mean, 'column', not row, right? try setAllowsColumnSelection:NO ..corbin I want to disable this functionality, partly because it is meaningless for my app, and partly because I would like to mak

Re: NSOutlineView assertion failure on redraw .. ?

2008-07-03 Thread Corbin Dunn
Hi Michael, The assertion is definitely bad. Can you please log a bug for this? Ideally, if you have a test case for it, please include that in the bug report. To get you moving on the problem, please run it under the debugger and break on objc_exception_throw (I think that is hit with NSA

Re: NSProgressIndicator thread safe?

2008-07-03 Thread Corbin Dunn
On Jul 3, 2008, at 5:10 AM, Abernathy, Joshua wrote: None of the AppKit is thread-safe. Check out -performSelectorOnMainThread. While generally true, this isn't the case. The heart beat thread is run by appkit. Micha: what does thread 1's bt look like? corbin -Original Message---

Re: NSSavePanel bug with -setNameFieldLabel: workaround?

2008-07-10 Thread Corbin Dunn
Can you please log a bug for this? thank you, corbin On Jul 10, 2008, at 6:08 AM, Graham Cox wrote: Hmm, finding them thick and fast today... Using NSSavePanel's -setNameFieldLabel:, this method doesn't make more space available for a longer string (say by shifting the text field over or

Re: NSOutlineView hiding a column while editing a row in another column

2008-07-11 Thread Corbin Dunn
On Jul 10, 2008, at 4:17 PM, Joan Lluch (casa) wrote: I have a NSOutlineView which I want to make several columns hidden in response to a user action. I have set up the outlineColumn to resize with table and the rest have fixed size, so that when one or more columns are hidden, the outline

Re: Problem on reload data source of a table view

2008-07-15 Thread Corbin Dunn
As Jens said, it sounds like you may have a nil dataTable. Check that first. Second, break on: - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView; and make sure you aren't returning 0, which would cause the other method to not be called at all. corbin On Jul 15, 2008, at 9:32

Re: NSOutlineView force expansion/refresh?

2008-07-17 Thread Corbin Dunn
On Jul 16, 2008, at 3:22 PM, Michael Hanna wrote: I'm using observeValueForKeyPath:ofObject:change:context: to detect when a change occurs in my data model. When a non-leaf node gets added, the outline view draws the new item, but in an unexpanded state. I try this code: [m_rulesOutlineView

Re: How to get a table column header with an image instead of text?

2008-07-21 Thread Corbin Dunn
On Jul 20, 2008, at 12:48 PM, Marc Respass wrote: On Jul 20, 2008, at 2:05 PM, Adam R. Maxwell wrote: On Jul 20, 2008, at 10:57 AM, Jean-Daniel Dupas wrote: Le 20 juil. 08 à 19:54, Marc Respass a écrit : Hi again, I hate answering my own question but I did figure it out. I sub- class

Re: PropertyList -> NSBrowser / NSOutlineView?

2008-07-23 Thread Corbin Dunn
On Jul 22, 2008, at 4:48 PM, Joeles Baker wrote: Hi Ken, Any other hints for a really basic NSBrowser or NSOutlineView sample (not /Developer/Examples/AppKit/OutlineView) ? I can't personally vouch for these, but a full-text search of all doc sets yields: http://developer.apple.com/sam

Re: Issue sorting an NSTableView

2008-07-24 Thread Corbin Dunn
On Jul 24, 2008, at 8:48 AM, Timothy Reaves wrote: The documentation for NSTableView setSortDescriptors: starts off with "A table column is considered sortable if it has a sort descriptor that specifies the sorting ". I find this a bit puzzling as this is the documentation for NSTableVie

Re: NSTableView NSTrackingArea and mouse clicks

2008-07-25 Thread Corbin Dunn
On Jul 24, 2008, at 6:16 PM, [EMAIL PROTECTED] wrote: i have an NSTableView that uses a data source (no bindings, but i don't think this is relevant). one column uses a custom cell that is actually a subclass of NSTokenFieldCell (but i don't think this is relevant either). i draw this cell

Re: NSTableView NSTrackingArea and mouse clicks

2008-07-25 Thread Corbin Dunn
ee? if you think this is a bug in PhotoSearch, can you suggest a solution? if this is in fact a toolbox bug, let me know and i'll report in radar; and also, could you suggest a work-around? thanx, ken At 7:44 AM -0700 7/25/08, Corbin Dunn wrote: On Jul 24, 2008, at 6:16 PM, [EMAI

Re: bug in PhotoSearch

2008-07-25 Thread Corbin Dunn
On Jul 25, 2008, at 3:52 PM, [EMAIL PROTECTED] wrote: corbin, i think there is another bug in PhotoSearch. in TrackableOutlineView mouseEntered, the call to [iMouseCell mouseEntered:] should be outside the if block that sets iMouseCell if needed. If you have multiple tracking areas per ce

Re: bug in PhotoSearch

2008-07-29 Thread Corbin Dunn
howdy ken, it seems to me that all drawing of table cells will go first thru preparedCellAtColumn:row:, next to the delegate method tableView:willDisplayCell:forTableColumn:row:, then thru the table's drawRect: and finally to the appropriate cell's drawing methods (altho i may have the

Re: outlineView:dataCellForTableColumn:item: and bindings don't mix? Editing doesn't stick.

2008-07-30 Thread Corbin Dunn
Anyone using NSOutlineView's outlineView:dataCellForTableColumn:item: delegate message? Yes -- I have used it in a few places. I'm trying to use it exactly as used in the DragNDropOutlineView example: to use a cell that will be used for the entire row (ie a full width cell). It works in the

Re: outlineView:dataCellForTableColumn:item: and bindings don't mix? Editing doesn't stick.

2008-07-30 Thread Corbin Dunn
I'm trying to use it exactly as used in the DragNDropOutlineView example: to use a cell that will be used for the entire row (ie a full width cell). It works in the test app (which doesn't use bindings), but doesn't work in my app that uses bindings. I'm able to get the full width cell look,

Re: Automatic population of NSTableView with custom columns at launch time

2008-08-04 Thread Corbin Dunn
If you add all the columns (and remove old ones) before calling setAutosaveName:, or setAutosaveTableColumns:, then it should work out okay; it will restore all of the widths, positions, etc. corbin On Aug 4, 2008, at 2:03 PM, Rick Hoge wrote: I'm working on an application that will allow

Re: Automatic population of NSTableView with custom columns at launch time

2008-08-04 Thread Corbin Dunn
setAutosaveTableColumns: after adding a column from code, but on next launch it only showed the columns that are defined in the nib with IB. Rick On 4-Aug-08, at 5:39 PM, Corbin Dunn wrote: If you add all the columns (and remove old ones) before calling setAutosaveName:, or setAutosaveTableColumns:, then

Re: Automatic population of NSTableView with custom columns at launch time

2008-08-04 Thread Corbin Dunn
'remembered' even if the user does not resize any... thanks for the suggestions, though! Rick On 4-Aug-08, at 7:05 PM, Corbin Dunn wrote: Are you calling setAutosaveName: yourself? Set it to nil in the nib. Then, call it yourself. Before you call it, print out all the t

Re: Automatic population of NSTableView with custom columns at launch time

2008-08-04 Thread Corbin Dunn
an autosave 4) quit app On next launch, the column I added in step 1 is not there. Changes to width of columns defined in the nib are preserved though. Also is step 3 really needed to force an autosave? Ideally the added columns would have to be 'remembered' even if the user do

Re: Protocol for Table View Trouble

2008-08-06 Thread Corbin Dunn
In addition to what the others said: On Aug 5, 2008, at 10:43 PM, Eric Lee wrote: I've been having trouble implementing some protocols for table view. I just copied and pasted from my other code into this .m file, changed the variables so that it matched the variables in the .h file, but i

Re: Saving Outline View Column Widths

2008-08-07 Thread Corbin Dunn
On Aug 7, 2008, at 10:06 AM, Gerriet M. Denkmann wrote: I have an OutlineView, which has an Autosave Name set in IB. Works fine. I change a column width, close the document, open another document: the columns are just as they should be. Let's say, I want the first column to be 2 cm wide. No

Re: Table column header not highlighted at first

2008-08-15 Thread Corbin Dunn
On Aug 14, 2008, at 9:28 PM, Graham Cox wrote: I have a table view with a column + column header with a sort descriptor. In use, it works fine, I can click the column header and it sorts the list as it should, and the little arrow points up or down and it's blue. When I first show the wi

Re: Table column header not highlighted at first

2008-08-15 Thread Corbin Dunn
On Aug 15, 2008, at 8:36 AM, Graham Cox wrote: On 16 Aug 2008, at 1:27 am, Corbin Dunn wrote: Howdy! call setSortDescriptors: on the tableview -- pass it the [tableColumn sortDescriptorPrototype] in an array. [] Ah, never mind my first answer. Exactly how are you doing this (code

Re: Expanding outline view item ancestry

2008-08-15 Thread Corbin Dunn
Hey António On Aug 15, 2008, at 2:37 PM, Antonio Nunes wrote: Hi, Although there is a fair number of posts referencing "expandItem" I couldn't quite find this in the archives, although I had expected it to be a fairly common scenario: I search for an item that belongs to a tree that is s

Re: Expanding outline view item ancestry

2008-08-15 Thread Corbin Dunn
On Aug 15, 2008, at 2:56 PM, Antonio Nunes wrote: On 15 Aug 2008, at 22:37, Antonio Nunes wrote: I search for an item that belongs to a tree that is shown in an NSOutlineView. When I find the item, I want the outline view to show the it (if it is currently collapsed) and select its row. Fo

Re: Table column header not highlighted at first

2008-08-18 Thread Corbin Dunn
On Aug 16, 2008, at 6:26 AM, Graham Cox wrote: On 16 Aug 2008, at 1:36 am, Graham Cox wrote: I need to figure out why the second table works even though I'm not doing anything special (and none of the autosave stuff you mentioned either). OK, very simple: it was set in the nib. I didn'

Re: Hiding NSTableColumn causes other columns to shrink

2008-08-18 Thread Corbin Dunn
On Aug 16, 2008, at 6:59 PM, Markus Spoettl wrote: Hi List, it appears it's time for a stupid question again. I'm experiencing some odd behavior of NSOutlineView (probably NSTableView as well) when hiding and showing table columns dynamically. I have an outline with a number of columns,

Re: NSTableColumn not usable with binder of class NSTextValueBinder?

2008-08-19 Thread Corbin Dunn
On Aug 19, 2008, at 2:20 PM, Dave Dribin wrote: On Aug 19, 2008, at 3:27 PM, Dave Dribin wrote: Hello, When I hit the "Delete" key in one of my table views, I get the following error logged to the console: Object is not usable with binder of class NSTextValueBinder Further informatio

Re: NSTableColumn not usable with binder of class NSTextValueBinder?

2008-08-19 Thread Corbin Dunn
On Aug 19, 2008, at 3:47 PM, Dave Dribin wrote: On Aug 19, 2008, at 5:19 PM, Corbin Dunn wrote: You can in IB3; just double click on the cell...then set the class. It's not letting me set it to my custom cell. It just beeps (IB version 3.1, build 670). I think this is because the c

Re: NSTableColumn not usable with binder of class NSTextValueBinder?

2008-08-20 Thread Corbin Dunn
Yup, Ken hits the target dead on; it sounds like it is simply due to the cell not having the binding. But please do log a bug requesting this for bindings. Also, thank you for logging the other bug -- I routed it to IB. corbin On Aug 20, 2008, at 1:35 AM, Ken Ferry wrote: On Tue, Aug 19,

Re: Embed some NSControl in the NSTableView field?

2008-08-20 Thread Corbin Dunn
On Aug 20, 2008, at 3:33 PM, Leopard x86 wrote: Hi everyone. Maybe this idea is rather crazy, I do want to know whether it is practicable or not. The NSTableView is essentially a table to the end user. For example, your application may seem like the following: Tableheader1Tabl

Re: Control-Click vs Right-Click in NSTableView

2008-08-20 Thread Corbin Dunn
On Aug 20, 2008, at 4:25 PM, Sean McBride wrote: On 8/20/08 6:02 PM, Matthew Mashyna said: This works nicely but I have found that it does not work for control clicks. For a another view item I overrode mouseDown to check for the control key and call [self rightMouseDown] if needed. Have yo

Re: Source List groups shifted down in NSOutlineView

2008-08-21 Thread Corbin Dunn
On Aug 20, 2008, at 9:16 PM, Jeff Wilcox wrote: I generally am pretty good at web mining or hacking solutions to weird cocoa things, but this one has me a bit puzzled. I want to use groups in an NSOutlineView that is set up with Source List highlighting. However, I am also using horizonta

Re: What's the right way to make the last (or only) table column fill the width of an NSTableView?

2010-01-12 Thread Corbin Dunn
On Jan 12, 2010, at 8:00 AM, Charles Jenkins wrote: No, I wasn't aware of that, and I certainly don't find mention of it in the documentation for NSTableView or NSTableColumn. But tonight when I get home, I will try it! Please log documentation bugs (or use the documentation feedback for

Re: Confused about setting selection in NSBrowser

2010-01-15 Thread Corbin Dunn
On Jan 15, 2010, at 8:07 AM, Keary Suska wrote: > On Jan 14, 2010, at 9:56 PM, Chris Idou wrote: > >> I'm trying to set the selected item in an NSBrowser. >> >> I don't want to use setPath: because the items I'm storing in the browser >> are not unique, so therefore paths are not unique. >> >

Re: NSColorPanel question

2010-01-18 Thread Corbin Dunn
On Jan 18, 2010, at 5:39 AM, Matthias Schmidt wrote: > Hello, > I'm a bit stuck with NSColorPanel, while trying to write a plugin for > another app, which should open the color picker, select a color, close > it and return the color. > > I use this code here, but as soon as I click in the panel

Re: Problem with changes to NSArrayControllers array causing crash

2010-01-18 Thread Corbin Dunn
> ... > 20 VATSpy 0x00014912 -[BBSDataMgr > loadDataFile:] + 3851 > 21 Foundation 0x7fff8166de99 > __NSThread__main__ + 1429 > 22 libSystem.B.dylib 0x7fff814c2f8e > _pthread_start + 331 >

Re: Docs by Contradiction: -isDocumentEdited vs. -updateChangeCount:

2010-01-19 Thread Corbin Dunn
On Jan 18, 2010, at 9:14 AM, Jerry Krinock wrote: > In documentation, > > updateChangeCount: "if the change count is 0, the document has no changes to > save, and if the change count is greater than 0, the document has been edited > and is unsaved" > > isDocumentEdited "Returns YES if the r

Re: NSTableView Column Header Restrictions?

2010-01-19 Thread Corbin Dunn
On Jan 19, 2010, at 3:30 PM, Daniel Wambold wrote: > I have an NSTableView that I populate with columns programmatically. I use > the following to establish the header titles: > > NSTableHeaderCell *myGenericHeaderCell = [[[NSTableHeaderCell alloc] > initTextCell:myTableColumnTitle] autoreleas

Re: KVO and object release timing (for a NSCollectionView)

2010-01-22 Thread Corbin Dunn
On Jan 22, 2010, at 7:01 AM, vincent habchi wrote: > > I have a NSButton in C to remove from the array controller the A object it > represents. However, each time I click on that button, I first get a warning > telling me that I remove an observed object before releasing the observer, > and t

Re: rightMouseDown not working as documented?

2010-01-22 Thread Corbin Dunn
Howdy, NSView doesn't call up the responder chain for rightMouseDown:. It calls -menuForEvent:, and if non nil, presents the contextual menu. Please log a bug requesting our documentation to clarify this, or asking us to change the behavior if you were expecting something else. corbin On Jan

Re: rightMouseDown not working as documented?

2010-01-22 Thread Corbin Dunn
On Jan 22, 2010, at 4:57 PM, Jens Alfke wrote: > > On Jan 22, 2010, at 4:20 PM, Corbin Dunn wrote: > >> NSView doesn't call up the responder chain for rightMouseDown:. It calls >> -menuForEvent:, and if non nil, presents the contextual menu. >> Please log a bug

Re: simple file browser

2010-01-25 Thread Corbin Dunn
On Jan 25, 2010, at 2:22 PM, Jens Alfke wrote: > > On Jan 25, 2010, at 2:12 PM, Ariel Feinerman wrote: > >> I want to implement file browser in my app to allow to see hidden >> files / other. Can you suggest me code examples of cocoa file browser? > > Use an NSOpenPanel, set an instance of you

Re: simple file browser

2010-01-26 Thread Corbin Dunn
>> On Jan 25, 2010, at 3:17 PM, Corbin Dunn wrote: >> >>> Instead, just call: [savePanel setShowsHiddenFiles:YES]. >> >> There's no such method in the 10.5 SDK; was it added in 10.6? >> >> —Jens___ >

Re: 10.6 Clips Tooltip if you return NSTextFieldCell in -dataCellForRow:

2010-01-26 Thread Corbin Dunn
Jerry, http://developer.apple.com/mac/library/documentation/cocoa/reference/ApplicationKit/Classes/NSCell_Class/Reference/NSCell.html Look up "expansion tool tips". Managing Expansion Frames • – expansionFrameWithFrame:inView: • – drawWithExpansionFrame:inView: For what it is wo

Re: simple file browser

2010-01-26 Thread Corbin Dunn
On Jan 26, 2010, at 10:10 AM, Jens Alfke wrote: > > On Jan 26, 2010, at 10:03 AM, Corbin Dunn wrote: > >> Jens/Andrew --- the SnowLeopard documentation is incorrect; it was added in >> 10.6, but "retro-published" to 10.4. So, it is available in 10.4 and higher.

Re: Context menu on NSOutlineView, which row is active/selected?

2010-01-27 Thread Corbin Dunn
On Jan 26, 2010, at 9:09 PM, David Melgar wrote: > I have a menu set as the Menu outlet of an NSOutlineView to use as a context > menu (right click) on a row. > > When the menu is chosen on a row, the chosen action on my target (my > OutlineView controller) is invoked as expected. > > In my v

Re: Ellipsis + Proper Expansion Frame + HScroll-Edit in 10.6 NSTableView (was "Clipped Tooltip")

2010-01-27 Thread Corbin Dunn
> > > However, I know there is a magic formula somewhere, because when I use the > default cell returned by -[NSTableColumn dataCell], all three requirements > are satisfied. Statically, I see that it sets all three attributes to NO. > But when I try this with a raw NSTextFieldCell, only req

Re: Hyperlinks in Table Views

2010-01-27 Thread Corbin Dunn
> I think I may have got this to work, so here goes: > > The data cell for the table column displaying the hyperlink is now a custom > NSTextFieldCell with the following implementation over-ridden: > > - (NSUInteger)hitTestForEvent: (NSEvent *)event > i

Re: Apparent NSTableView Bug

2010-01-28 Thread Corbin Dunn
It's definitely a bug in AppKit; thank you for logging it, and including a test case. Try setting -setAllowsColumnSelection:NO. That work? corbin On Jan 28, 2010, at 2:00 PM, Daniel Wambold wrote: > I have run up against an apparent 10.6.2 bug in the NSTableView object. > Specifically, if NST

Re: Fuzzy Focus Ring

2010-01-28 Thread Corbin Dunn
> Oh, it looks like you can eliminated most of the code below if you're > targetting Mac OS 10.5+. > > #import > > @interface NSView (FocusRing) Ah -- a quick side note on this code sample. Adding a category to NSView with generic names (like drawFocusRing) is quite dangerous. The issue is th

Re: __weak references in non-GC

2010-02-01 Thread Corbin Dunn
On Feb 1, 2010, at 6:08 AM, Roland King wrote: > I read the following passage (reproduced verbatim) in a book .. > > "Weak references were added in Mac OS X Leopard and effectively zero out the > reference if the referenced object is released. This is primarily used when > the garbage collecto

Re: updating NSView on separate thread

2010-02-01 Thread Corbin Dunn
On Feb 1, 2010, at 8:57 AM, Jens Alfke wrote: > > On Feb 1, 2010, at 7:20 AM, Kyle Sluder wrote: > >> So in your override of -writeToURL:…, spin off the background thread like I >> suggested, then set up your UI, and then start running the runloop in a >> special modal mode until your backgro

Re: NSTableView questions (take 2)

2010-02-02 Thread Corbin Dunn
On Feb 2, 2010, at 8:32 AM, Matthew Weinstein wrote: > Still trying to find a way to turn off setAllowsMultipleSelection just as the > table becomes the responder. Is there some way of anticipating this, a > "willbecomefirstresponder" kind of a notification? What are you really trying to do? O

Re: NSTableView questions (take 2)

2010-02-02 Thread Corbin Dunn
any relationship. If I click > on table A I want multiple values of table B to be selected; but I click on > table B I want to make sure I can't select multiple values > > On Feb 2, 2010, at 8:53 AM, Corbin Dunn wrote: > >> >> On Feb 2, 2010, at 8:32 AM, Matthew Weins

Re: NSTableView questions (take 2)

2010-02-02 Thread Corbin Dunn
pture > the mouse down when the user clicks in table B to forbid multiple selections > (back to its default state). > > On Feb 2, 2010, at 9:08 AM, Corbin Dunn wrote: > >> Table b should be set to setAllowsMultipleSelection:NO. However, despite >> that, you can progra

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Corbin Dunn
Oleg, I think you are misinterpreting an exception being raised as a crash of your application. The bt's below are not crashes; they are exceptions being raised (and caught) by appkit's accessibility. I understand that you have a problem with your app crashing -- do you have some actual crash

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Corbin Dunn
must confess I have never >>> even read the accessibility section of the docs and don't know what it >>> is. >>> >>>> From the stack trace it appears that the exception occurs even before >>> any of my own code is entered, somewhere in system framework

Re: HELP! My app crashes on startup, with a very weird stack trace.

2010-02-02 Thread Corbin Dunn
On Feb 2, 2010, at 12:41 PM, Oleg Krupnov wrote: > Good point, Jesper. > > But in this case, how should I catch real unhandled exceptions and > send bug reports? What is the recommended best practice? > NSSetUncaughtExceptionHandler possibly. I haven't had to use it myself... --corbin _

Re: Custom Field Editor Problem

2010-02-02 Thread Corbin Dunn
John, I suggest reading: http://www.corbinstreehouse.com/blog/2007/10/instruments-on-leopard-how-to-debug-those-random-crashes-in-your-cocoa-app/ --corbin On Feb 2, 2010, at 11:02 AM, John Nairn wrote: > I copied code from Cocoa documentation to create a custom field editor. It > gets created

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Corbin Dunn
On Feb 17, 2010, at 12:16 PM, Gustavo Pizano wrote: > Hello all. > > in My Core Data application I have a custom NSTableView with Custom NSCells > inside because Im displaying the name of the user with the image of the user > (the picture), its displaying fine, when selecting its selecting ok.

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Corbin Dunn
On Feb 17, 2010, at 2:14 PM, Gustavo Pizano wrote: > > On Feb 17, 2010, at 11:03 PM, Jim Correia wrote: > >> On Feb 17, 2010, at 4:41 PM, Gustavo Pizano wrote: >> >>> Maybe I misunderstood I must conform NSCopying protocol also even when >>> using core data? >> >> If you have an NSCell subc

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-18 Thread Corbin Dunn
drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView{ > > NSDictionary * cellValues = [self objectValue]; > NSString * firstName = [cellValues valueForKey:@"firstName"]; > NSString * lastName = [cellValues valueForKey:@"lastName"];

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-18 Thread Corbin Dunn
have to retain or copy it in the cell's implementation of -copyWithZone: corbin > > Thanks for the help and the blog link.. I learned a something else I wished > to know but didn't know where to find it. > > Gustavo > > On Feb 18, 2010, at 5:06 PM, Corbin Dunn wro

Re: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?

2010-02-26 Thread Corbin Dunn
On Feb 26, 2010, at 11:07 AM, Sean McBride wrote: > Hi all, > > So for some days now I've been trying to make a custom NSActionCell that > works in an NSTableView that in turn uses Cocoa Bindings. > > Starting from mmalc's ClockControl example, I now have it working for > simple cases. > > Bas

Re: NSOutlineView: items can't be referenced with path?

2010-03-04 Thread Corbin Dunn
On Mar 4, 2010, at 1:20 PM, Laurent Daudelin wrote: > I've been using NSOutlineView in the past and know the need to provide a > unique identifier for "items" used by the outline view. > > I'm working on a WebDAV client and thought it would be a good idea to use the > full url of an item to id

Re: [NSTableview] can't make selected text stay black

2010-03-08 Thread Corbin Dunn
On Mar 5, 2010, at 2:25 PM, Kent Hauser wrote: > Hi, > > I'm trying to make a NSTableView selected row not look selected. I > subclassed NSTableView & added the following class & delegate methods: > > // remove selection indication > - (void)highlightSelectionInClipRect:(NSRect)clipRect > { >

Re: NSTableViewDropAbove visual remnant

2010-03-09 Thread Corbin Dunn
On Mar 8, 2010, at 10:20 PM, Steve Cronin wrote: > Folks; > > I have a tableView which is working pretty handily. > > I support a form of import by dropping a text file on it. > The backing arrayController returns an NSTableViewDropAbove for UI > feedback purposes. > (the row the f

Re: [NSTableview] can't make selected text stay black

2010-03-09 Thread Corbin Dunn
On Mar 8, 2010, at 3:15 PM, Kent Hauser wrote: > > > On Mon, Mar 8, 2010 at 12:20 PM, Corbin Dunn wrote: > > On Mar 5, 2010, at 2:25 PM, Kent Hauser wrote: > > > Hi, > > > > I'm trying to make a NSTableView selected row not look selected. I > &g

Re: [NSTableview] can't make selected text stay black

2010-03-09 Thread Corbin Dunn
settings are! corbin > > > On Mar 8, 2010, at 3:15 PM, Kent Hauser wrote: > >> On Mon, Mar 8, 2010 at 12:20 PM, Corbin Dunn wrote: >> >>> >>> On Mar 5, 2010, at 2:25 PM, Kent Hauser wrote: >>> >>>> Hi, >>>>

Re: NSTableView _dataSourceValueForColumn:row: failure

2010-03-11 Thread Corbin Dunn
On Mar 11, 2010, at 7:38 AM, Alexander Bokovikov wrote: > Hi, All. > > I have a table view in the "main" window, where it works fine. And have yet > another very similar table view in a popup modal panel. where it fails > immediately after panel is closed. Debugger shows subj, as the failure p

Re: NSTableView _dataSourceValueForColumn:row: failure

2010-03-11 Thread Corbin Dunn
On Mar 11, 2010, at 9:48 AM, Alexander Bokovikov wrote: > > On Thursday, March 11, 2010 at 10:29 PM Corbin Dunn wrote: > >> Break on objc_exception_throw. > > Could you explain it? What does it mean? http://www.corbinstreehouse.com/blog/2008/08/your-most-importan

Re: NSTableView _dataSourceValueForColumn:row: failure

2010-03-11 Thread Corbin Dunn
On Mar 11, 2010, at 9:44 AM, Alexander Bokovikov wrote: > On Thursday, March 11, 2010 at 10:11 PM Fritz Anderson wrote: > >> 1. You don't say what "fail" means. A crash? >> What error code? What stack trace? > > EXC_BAD_ACCESS. Assembler call stack view shows line next to the subj call. > > OS

Re: Clicking on an NSColorWell

2010-03-12 Thread Corbin Dunn
Try the "AnimatedTableView" example. Feel free to post questions after you run it. It has a custom mini color picker thingy. corbin On Mar 12, 2010, at 2:17 PM, Jonathon Kuo wrote: > I need to generate an ad-hoc number of color swatches in a floating window so > that when a user clicks on one

Re: NSTableView _dataSourceValueForColumn:row: failure

2010-03-12 Thread Corbin Dunn
On Mar 11, 2010, at 7:55 PM, Alexander Bokovikov wrote: > > On 11.03.2010, at 23:25, Corbin Dunn wrote: > >> http://www.corbinstreehouse.com/blog/2008/08/your-most-important-breakpoint-in-cocoa/ > > I've done what was told there. No difference. I just get EXC_BAD

Re: [NSTableview] can't make selected text stay black

2010-03-12 Thread Corbin Dunn
Please don't override the private method. Your app is likely to break if you do so. > > Your solution was perfect. (It didn't work at first, but that's because I had > somehow left HighlightStyle as source list in IB while I was trying > everything. Per your note, the first thing I checked & th

Re: [NSTableview] can't make selected text stay black

2010-03-12 Thread Corbin Dunn
> > P.S. I'm hesitant about mentioning private methods here, but I don't think > there's another way of doing it - I filed an enhancement request for this > method to be made public back in April '06, ID#4521167, so please do the same > if you think it would be useful. I'm CC'ing Corbin so he c

Re: [NSTableview] can't make selected text stay black

2010-03-15 Thread Corbin Dunn
that the private method isn't necessary there, but I believe you have > just obviated my need for the private method altogether, which is great as > resorting to private methods is never good - thanks! It seems you have > definitely found the best way of doing this. > > All the

Re: Directory to save file in NSSavePanel

2010-03-17 Thread Corbin Dunn
On Mar 17, 2010, at 9:39 AM, Matt Neuburg wrote: > On Wed, 17 Mar 2010 13:40:35 +0530, Nikhil Khandelwal > said: > >> I am using NSSavePanel in my application. I am using "runModal" on this to >> show the save panel. The default location it shows to save the file is >> "Desktop" which I want to

Re: NSBrowser and tab order

2010-03-18 Thread Corbin Dunn
Aj -- I believe this was a bug fixed in 10.6; maybe 10.5. What OS are you on? The work around is to set it up in awakeFromNib. corbin On Mar 18, 2010, at 1:15 AM, Andrew James wrote: > I have a nib file set up in Interface Builder with a window containing a > single NSBrowser. > > I have set

Re: Directory to save file in NSSavePanel

2010-03-18 Thread Corbin Dunn
esting. corbin > Thanks once again. > ---Nikhil > > > -Original Message- > From: Corbin Dunn [mailto:corb...@apple.com] > Sent: Wednesday, March 17, 2010 10:43 PM > To: Matt Neuburg > Cc: Nikhil Khandelwal; cocoa-dev@lists.apple.com > Subject: Re: Directory to save

Re: NSBrowser and tab order

2010-03-19 Thread Corbin Dunn
On Mar 18, 2010, at 9:48 AM, Keary Suska wrote: > On Mar 18, 2010, at 8:40 AM, Corbin Dunn wrote: > >> Aj -- I believe this was a bug fixed in 10.6; maybe 10.5. What OS are you on? >> >> The work around is to set it up in awakeFromNib. > > Is there any way to tab

Re: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?

2010-03-29 Thread Corbin Dunn
On Mar 29, 2010, at 2:05 PM, Sean McBride wrote: > On Fri, 26 Feb 2010 13:20:08 -0800, Corbin Dunn said: > >> Take a look at the "AnimatedTableView" demo app. I added a custom color >> well cell type of thing, and demonstrate how to update values outside >>

Re: Single-click words in NSTableView / NSTextFieldCell

2010-04-08 Thread Corbin Dunn
On Apr 8, 2010, at 8:17 AM, Tony P wrote: > Hi Folks, > > I'm trying to implement single-clicking for multiple words/phrases within an > NSTableView / NSTextFieldCell, which seems surprisingly tricky. I've tried > using NSAttributedString (in the hope I can use a special NSURLProtocol to > in

Re: How to find all clipping siblings for a view?

2010-04-16 Thread Corbin Dunn
On Apr 16, 2010, at 8:38 AM, Joar Wingfors wrote: > > > On 15 apr 2010, at 13.06, Alexander Bokovikov wrote: > >> This is because my view uses QuickDraw to redraw itself, but those functions >> draw on screen directly (AFAIU) and don't take into account other views, >> located above current

Re: Avoid drawing in half pixel

2010-05-05 Thread Corbin Dunn
On May 5, 2010, at 8:18 AM, Gustavo Pizano wrote: > Hello all. > > I have a split view and inside I have custom views, in one subview Im drawing > lines with a NSBezierPath, and when I move the divider I see sometimes the > lines very thin some others no, so I know this last behavior its bec

Re: Custom NSPathControl

2010-05-05 Thread Corbin Dunn
On May 5, 2010, at 4:20 AM, Graham Cox wrote: > I have a UI that is designed to break down a huge collection of items into a > manageable subset that the user can work with at a time. Each item > effectively has a sort of "path", that describes its hierarchy, not in terms > of its location on

Re: Custom NSPathControl

2010-05-05 Thread Corbin Dunn
On May 5, 2010, at 10:20 AM, Quincey Morris wrote: > On May 5, 2010, at 04:20, Graham Cox wrote: > >> So is using NSPathControl even possible for this, or would I just be better >> off writing a complete new control from scratch? NSPathControl does some >> neat things like fading overlong text

Re: NSBrowser dragging

2010-05-07 Thread Corbin Dunn
On May 7, 2010, at 1:01 AM, Micha Fuhrmann wrote: > Hi everyone, > > I've ran out of ideas, I just don't now what's wrong. > > I have an NSBrowser Object. > > I've set the delegate to another class which implements: > > - (BOOL)browser:(NSBrowser *)browser canDragRowsWithIndexes:(NSIndexSet

Re: Handling bindings of an NSControl which forward everything to an NSCell?

2010-05-12 Thread Corbin Dunn
> - (void) setCornerSize:(NSSize) _size > { > [self willChangeValueForKey:@"cornerSize"]; > [[self cell] setCornerSize:_size]; > [self didChangeValueForKey:@"cornerSize"]; > } Just as a quick tip -- you might want to use a different formal parameter name. Using the underscore prefix is typica

Re: Selecting rows in NSOutlineView from menuForEvent:?

2010-05-17 Thread Corbin Dunn
On May 15, 2010, at 12:31 AM, Ryan C. Payne wrote: > On Apr 9, 2010, at 15:17, Nick Zitzmann wrote: > >> >> On Apr 9, 2010, at 3:42 PM, Laurent Daudelin wrote: >> >>> However, the selection is the standard highlight, not the outline I see in >>> any other table views in other Apple applicatio

Re: NSTableView, bindings and datasource

2008-08-25 Thread Corbin Dunn
On Aug 24, 2008, at 11:55 PM, Pierre Chatelier wrote: Hello, I was wondering something... I have an NSTableView which is automatically filled by binding. So, I did not set any dataSource. But I want to implement "tableView:writeRowsWithIndexes:toPasteboard:", which is a dataSource method

Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50

2008-08-25 Thread Corbin Dunn
On Aug 24, 2008, at 10:50 PM, Graham Cox wrote: On 25 Aug 2008, at 11:09 am, Kyle Sluder wrote: On Sun, Aug 24, 2008 at 6:03 PM, Cate Tony <[EMAIL PROTECTED]> wrote: If I put a retain on the panel, the error stops, but isn't it now leaking? No. You took ownership of the NSSavePanel when

Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50

2008-08-25 Thread Corbin Dunn
On Aug 24, 2008, at 3:03 PM, Cate Tony wrote: This was a surprise. Here's the relevant code: - (void)saveDocumentAs:(id)sender { NSSavePanel *panel = [NSSavePanel savePanel]; [panel setRequiredFileType:@"abcd"]; [panel beginSheetForDirectory: [documentPath stringByD

Re: using OpenPanel to select volumes?

2008-08-25 Thread Corbin Dunn
On Aug 23, 2008, at 11:07 PM, Angelo Chen wrote: Hi, I use following code to select a volume, it works, but it also give the user chance to select directory as well, how to disable selection of directories, only allow volumes? thanks, NSOpenPanel *oPanel = [OpenPanel openPanel]; [oPanel

<    1   2   3   4   5   6   >