Re: Swift NSOutlineView "Illegal NSOutlineView data source"

2015-07-31 Thread Rick Mann
> On Jul 31, 2015, at 15:33 , Quincey Morris > wrote: > > Incidentally, they’re optional because a bindings-based table doesn’t use > them, but still might have a data source because the methods that support > drag-and-drop are data source methods, not delegate methods.

Re: Swift NSOutlineView "Illegal NSOutlineView data source"

2015-07-31 Thread Quincey Morris
On Jul 31, 2015, at 15:17 , Rick Mann wrote: > > I'm not sure why those methods are optional if they must be implemented, but > whatever. Incidentally, they’re optional because a bindings-based table doesn’t use them, but still might have a data source because the methods that

Re: Swift NSOutlineView "Illegal NSOutlineView data source"

2015-07-31 Thread Rick Mann
know where to look for those > or the delegate is set to the wrong object > > -rags > > > >> On Jul 31, 2015, at 4:17 PM, Rick Mann wrote: >> >> But I still get this at run time: >> >> *** Illegal NSOutlineView data source (). >> M

Re: Swift NSOutlineView "Illegal NSOutlineView data source"

2015-07-31 Thread Raglan T. Tiger
sounds like the delegate isn't set so it don't know where to look for those or the delegate is set to the wrong object -rags > On Jul 31, 2015, at 4:17 PM, Rick Mann wrote: > > But I still get this at run time: > > *** Illegal NSOutlineView data sour

Swift NSOutlineView "Illegal NSOutlineView data source"

2015-07-31 Thread Rick Mann
ift 2. I've implemented …numberOfChildrenOfItem:, …child:ofItem:, …isItemExpandable:, and …viewForTableColumn:item:. I've even tried adding …objectValueForTableColumn:byItem:, which docs say is not necessary for view-based views. But I still get this at run time: *** Illegal NSO

NSOutlineView subclass not firing data source drag and drop methods

2013-10-29 Thread Michael LaMorte
I'm using the excellent NSOutlineView subclass PXSourceList in one of my applications. I'm trying to implement drag and drop to my PXSourceList instance. I have: connected both delegate and data source outlets in IB to my controller in awakeFromNib in the controller, set self as the de

Re: Best data source for table view in document window

2012-09-06 Thread Graham Cox
On 07/09/2012, at 4:36 AM, Jerry Krinock wrote: > But I'm still using my other triggers because sometimes my document opens > with no windows Don't forget also that Cocoa will be creating instances of your document at all sorts of odd times with Autosave and Versions in play. This can play h

Re: Best data source for table view in document window

2012-09-06 Thread Jerry Krinock
On 2012 Sep 05, at 21:13, Martin Hewitson wrote: > I already had a -cleanUp method being called from -windowWillClose: within > the NSDocument I just checked my code again and found that I am already using -windowWillClose: as suggested by Graham, for the stuff in the window, and a quick tes

Re: Best data source for table view in document window

2012-09-05 Thread Martin Hewitson
Thanks for the advice, gentlemen. I already had a -cleanUp method being called from -windowWillClose: within the NSDocument (NSPersistentDocument, actually), so I looked more carefully at how that particular view controller is torn down. I made some changes such that now, in the document's clea

Re: Best data source for table view in document window

2012-09-05 Thread Graham Cox
On 06/09/2012, at 10:44 AM, Jerry Krinock wrote: > Regarding the indication, I've yet to find a single hook in Cocoa which gives > me a reliable early warning that a document is closing. If your document only has a single window, you could use: - (void) windowWillClose:(NSNotification*) not

Re: Best data source for table view in document window

2012-09-05 Thread Jerry Krinock
I'm still digesting all the fine advice in this thread. But since it seems like I'm going to keep my standalone data source in some form, here is a quick answer to Martin's question regarding crashes. On 2012 Sep 05, at 10:16, Martin Hewitson wrote: > occasional crashes t

Re: Best data source for table view in document window

2012-09-05 Thread Andy Lee
On Sep 5, 2012, at 11:24 AM, Kyle Sluder wrote: > On Sep 5, 2012, at 5:39 AM, Jerry Krinock wrote: > >> What is the best the data source for a table view in a document window? The >> candidates are… >> >> (1) Category of the document. This is the way it is d

Re: Best data source for table view in document window

2012-09-05 Thread Chris Hanson
write, retain) NSArray * results; > > @end > > The view controller is the delegate and data source for the table view and > manages a bunch of little things related to the table. To go into a little more detail, I’d write the above like this, using Xcode 4.4 or later:

Re: Best data source for table view in document window

2012-09-05 Thread Chris Hanson
rty to store a model key path to use. If you have the option, I’d recommend just using NSArrayController for this. It does a lot of what you’ll need already, and you can still also implement a table view delegate and data source (possibly in your own subclass of NSArrayController) for addi

Re: Best data source for table view in document window

2012-09-05 Thread Seth Willits
{ NSTableView * resultListTableView; NSArrayController * resultListArrayController; } @property (readwrite, retain) NSArray * results; @end The view controller is the delegate and data source for the table view and manages a bunch of little things related to the table

Re: Best data source for table view in document window

2012-09-05 Thread Martin Hewitson
t; > Consider making this object an NSViewController subclass. > This is a very interesting thread for me. I have a similar case. I have a view controller which acts as a data source for an outline view. I have another class which builds the model objects that are to be viewed in the outline vie

Re: Best data source for table view in document window

2012-09-05 Thread Kyle Sluder
On Sep 5, 2012, at 5:39 AM, Jerry Krinock wrote: > What is the best the data source for a table view in a document window? The > candidates are… > > (1) Category of the document. This is the way it is done in the > WithoutBindings ("With and Without Bindings") A

Re: Best data source for table view in document window

2012-09-05 Thread Gary L. Wade
-- Gary L. Wade http://www.garywade.com/ On 9/5/2012 5:39 AM, "Jerry Krinock" wrote: >What is the best the data source for a table view in a document window? >The >candidates are? > >(1) Category of the document. This is the way it is done >in the WithoutBindings (&

Re: Best data source for table view in document window

2012-09-05 Thread Alex Zavatone
I use a standalone singleton object in Matt Galloway style. Never ran into the crash you're mentioning. On Sep 5, 2012, at 8:39 AM, Jerry Krinock wrote: > What is the best the data source for a table view in a document window? The > candidates are… > > (1) Category of th

Best data source for table view in document window

2012-09-05 Thread Jerry Krinock
What is the best the data source for a table view in a document window? The candidates are… (1) Category of the document. This is the way it is done in the WithoutBindings ("With and Without Bindings") Apple sample code. But it seems like too much "view-ish" co

Custom View for hierarchy -- NSTreeController or Data Source?

2011-12-10 Thread John Velman
r some reason I can't find (or find with google)). So so far, it appears that NSTreeController is little help in coordinating my two views. (By the way, I've always had my add, delete functions work directly on the model in the past.) It seems to me now it would be better and simpler to g

Re: NSTableView data source issue - code moving from xcode 3 to xcode 4

2011-10-09 Thread Fritz Anderson
On 9 Oct 2011, at 11:41 AM, Peter Hudson wrote: > I have found a solution in overriding the dataSource method in my table view > subclass and simply returning [self dataSource] cast to the class which I > know the datasource to be. Why override the method, when all you can just cast the re

Re: NSTableView data source issue - code moving from xcode 3 to xcode 4

2011-10-09 Thread Jens Alfke
On Oct 9, 2011, at 9:41 AM, Peter Hudson wrote: > For a long time ( in xcode 3 ) when I want to access a table view data > source ( in the sub class code for the table view ) I simply called [self > dataSource] > I would then call methods declared and implemented on the class

NSTableView data source issue - code moving from xcode 3 to xcode 4

2011-10-09 Thread Peter Hudson
Hi There For a long time ( in xcode 3 ) when I want to access a table view data source ( in the sub class code for the table view ) I simply called [self dataSource] I would then call methods declared and implemented on the class which I new to be the datasource. This worked fine. In xcode

Re: Data source

2010-08-17 Thread Jack Nutting
On Tue, Aug 17, 2010 at 3:15 AM, wrote: > Please point me to a resource for Cocoa questions in addition to this.  I am > having real difficulty with a problem and hitting dead ends. > > Thanks! Have you tried picking up a book on Cocoa programming? There are a number of books in print that help

Data source

2010-08-16 Thread koko
Please point me to a resource for Cocoa questions in addition to this. I am having real difficulty with a problem and hitting dead ends. Thanks! -koko PS I have looked at CocoaDev as well, so any resource other than those mentioned would be most helpful. __

Re: NSTableView sort with a data source (silly question ?)

2010-05-03 Thread vincent habchi
Le 3 mai 2010 à 17:08, Graham Cox a écrit : >> this might be a silly question but, before doing any further implementation, >> and having found no definite answer, I dare ask it. Is there a way to sort >> the contents of a NSTableView whose data is provided by a data source,

Re: NSTableView sort with a data source (silly question ?)

2010-05-03 Thread Graham Cox
On 04/05/2010, at 1:00 AM, vincent habchi wrote: > Hi, > > this might be a silly question but, before doing any further implementation, > and having found no definite answer, I dare ask it. Is there a way to sort > the contents of a NSTableView whose data is provided b

NSTableView sort with a data source (silly question ?)

2010-05-03 Thread vincent habchi
Hi, this might be a silly question but, before doing any further implementation, and having found no definite answer, I dare ask it. Is there a way to sort the contents of a NSTableView whose data is provided by a data source, besides sorting at the source itself (via a suitable query

NSOutlineView Data Source setObjectValue not being called

2010-03-26 Thread Venkat
, the setObjectValue function of the data source is not called and hence the edited changes are not saved. How can I troubleshoot the problem? I can send any parts of the code if required. Venkat ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Table view data source methods order?

2009-08-03 Thread Nick Zitzmann
On Aug 3, 2009, at 4:54 PM, Chase Meadors wrote: I thought that was just a preference... come to think of it, why in the world DOES that make difference?? In a pop-up menu, the selected item is the displayed item. In a pull- down menu, the displayed item is always the very first item, but a

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
...What the...?? That fixed it!... I thought that was just a preference... come to think of it, why in the world DOES that make difference?? On Aug 3, 2009, at 5:49 PM, Quincey Morris wrote: On Aug 3, 2009, at 15:16, Chase Meadors wrote: NSPopUpButtonCell *cell = [[NSPopUpButtonCell alloc

Re: Table view data source methods order?

2009-08-03 Thread Quincey Morris
On Aug 3, 2009, at 15:16, Chase Meadors wrote: NSPopUpButtonCell *cell = [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:YES]; You want a popup menu, not a pull-down menu. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
:datCellForTableColumn:row:, the table view obviously has to set the object value of the (shared) cell it knows about for each row, and it would do that by calling the objectValue... data source method *after* it has found the cell to use. My *expectation* would be that it'd do the sa

Re: Table view data source methods order?

2009-08-03 Thread Quincey Morris
View:datCellForTableColumn:row:, the table view obviously has to set the object value of the (shared) cell it knows about for each row, and it would do that by calling the objectValue... data source method *after* it has found the cell to use. My *expectation* would be that it'd do

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
Maybe I'm missing what you mean here, but if I do that, then what should I do in the objectValueFor... method? On Aug 3, 2009, at 2:13 PM, Quincey Morris wrote: On Aug 3, 2009, at 12:01, Chase Meadors wrote: Actually, and I forgot to mention this, I need number 1 because my second column c

Fwd: Table view data source methods order?

2009-08-03 Thread Chase Meadors
From: Chase Meadors Date: August 3, 2009 2:01:57 PM CDT To: Quincey Morris Subject: Re: Table view data source methods order? Actually, and I forgot to mention this, I need number 1 because my second column contains a mix of text cells and popup cells depending on the data type. And

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
From: Chase Meadors Date: August 3, 2009 1:27:26 PM CDT To: Andy Lee Subject: Re: Table view data source methods order? This is beginning to frustrate me. I tried assigning the menu in the -dataCellFor... method and eliminating -willDisplay... altogether. But STILL all of my popups have

Re: Table view data source methods order?

2009-08-03 Thread Quincey Morris
On Aug 3, 2009, at 1:04 AM, Chase Meadors wrote: I'm having a bit of trouble here with table view data source methods. I have implemented. I have these three: 1) - (NSCell *)tableView:(NSTableView *)sender dataCellForTableColumn:(NSTableColumn *)tableColumn row: (NSInteger)row; 2)

Re: Table view data source methods order?

2009-08-03 Thread Andy Lee
On Aug 3, 2009, at 1:04 AM, Chase Meadors wrote: I'm having a bit of trouble here with table view data source methods. I have implemented. I have these three: 1) - (NSCell *)tableView:(NSTableView *)sender dataCellForTableColumn:(NSTableColumn *)tableColumn row: (NSInteger)row; 2)

Re: Table view data source methods order?

2009-08-03 Thread Chase Meadors
No, both delegate and data source are connected, and they are all getting called. This is why I believe the order is the problem. On Aug 3, 2009, at 12:16 AM, Quincey Morris wrote: On Aug 2, 2009, at 22:04, Chase Meadors wrote: I'm having a bit of trouble here with table view data s

Re: Table view data source methods order?

2009-08-02 Thread Quincey Morris
On Aug 2, 2009, at 22:04, Chase Meadors wrote: I'm having a bit of trouble here with table view data source methods. I have implemented. I have these three: 1) - (NSCell *)tableView:(NSTableView *)sender dataCellForTableColumn:(NSTableColumn *)tableColumn row: (NSInteger)row; 2)

Table view data source methods order?

2009-08-02 Thread Chase Meadors
I'm having a bit of trouble here with table view data source methods. I have implemented. I have these three: 1) - (NSCell *)tableView:(NSTableView *)sender dataCellForTableColumn: (NSTableColumn *)tableColumn row:(NSInteger)row; 2) - (id)tableView:(NSTableView *)s

UITableView data source/delegate flow of control

2009-05-27 Thread WT
Hello... So, in order to better understand the flow of control when accessing a UITableView instance, I created a tiny project with a single section, having a single row, and then implemented every one of the 29 data source and delegate methods to do trivial things in addition to

Re: Problem on reload data source of a table view

2008-07-15 Thread JArod Wen
Finally the problem is solved. There is a missing line to set the identifier of each column so -tableView:objectValueForTableColumn:row: always return nil since it cannot retrieve the correct key of column. Thanks for all of your helps, and wish this helpful to any other guys. On Jul 15, 20

Re: Problem on reload data source of a table view

2008-07-15 Thread Andy Lee
On Jul 15, 2008, at 2:45 PM, JArod Wen wrote: After the application was running, I debugged the code and checked the classes of TableController and TableSource. They are all connected in runtime. For table view, I only connected it to TableController -> dataTable, and its dataSource to Tab

Re: Problem on reload data source of a table view

2008-07-15 Thread JArod Wen
After the application was running, I debugged the code and checked the classes of TableController and TableSource. They are all connected in runtime. For table view, I only connected it to TableController -> dataTable, and its dataSource to TableController -> tableSource. All of them are

Re: Problem on reload data source of a table view

2008-07-15 Thread j o a r
On Jul 15, 2008, at 10:36 AM, JArod Wen wrote: The dataSource of TableView is connected to tableSource. There is a TableController containing two IBOutlets to both tableSource and dataTable. Then dataTable.dataSource is connected to tableSource in IB. Anything I lost here? You might wan

Re: Problem on reload data source of a table view

2008-07-15 Thread JArod Wen
The dataSource of TableView is connected to tableSource. There is a TableController containing two IBOutlets to both tableSource and dataTable. Then dataTable.dataSource is connected to tableSource in IB. Anything I lost here? On Jul 15, 2008, at 1:26 PM, j o a r wrote: On Jul 15, 2008,

Re: Problem on reload data source of a table view

2008-07-15 Thread j o a r
On Jul 15, 2008, at 10:17 AM, JArod Wen wrote: Thanks for fast reply! Just as Jens said, I have checked the table and I am sure that it is not nil: Printing description of dataTable: (gdb) continue You should probably also verify that the NSTableView knows where to get data from - Usin

Re: Problem on reload data source of a table view

2008-07-15 Thread JArod Wen
008, at 9:32 AM, JArod Wen wrote: You are right. I found that the - tableView:objectValueForTableColumn:row: has never been called... Any way to fix this problem? On Jul 13, 2008, at 1:43 AM, Jens Alfke wrote: On 12 Jul '08, at 10:35 PM, JArod Wen wrote: The problem is that after I up

Re: Problem on reload data source of a table view

2008-07-15 Thread Corbin Dunn
9:32 AM, JArod Wen wrote: You are right. I found that the - tableView:objectValueForTableColumn:row: has never been called... Any way to fix this problem? On Jul 13, 2008, at 1:43 AM, Jens Alfke wrote: On 12 Jul '08, at 10:35 PM, JArod Wen wrote: The problem is that after I updat

Re: Problem on reload data source of a table view

2008-07-15 Thread JArod Wen
You are right. I found that the - tableView:objectValueForTableColumn:row: has never been called... Any way to fix this problem? On Jul 13, 2008, at 1:43 AM, Jens Alfke wrote: On 12 Jul '08, at 10:35 PM, JArod Wen wrote: The problem is that after I update the data source, whi

Re: Problem on reload data source of a table view

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 10:35 PM, JArod Wen wrote: The problem is that after I update the data source, which is tableSource in tableController, [dataTable reloadData] will not update the table view in the window You're sure that, at runtime, 'dataTable' is not nil? It

Problem on reload data source of a table view

2008-07-12 Thread JArod Wen
[column setWidth:cWidth]; [[[appController tableController] dataTable] addTableColumn:column]; [column release]; The problem is that after I update the data source, which is tableSource in tableController, [dataTable reloadData] will not update the table

Re: Combo Box Problem (when using data source)

2008-05-14 Thread Ronny Reichmann
Hi Adil, when you set your combo-box to use a data-source-object, you have to provide this data source object. At the end your data-source should know exactly the number of items. Your are providing the data-source, so you should know the number of items. Am 14.05.2008 um 08:17 schrieb

Combo Box Problem (when using data source)

2008-05-13 Thread Adil Saleem
Hi, If a combo box is using a Data Source, then how do i programatically get the number of items in that combo box ? If i use [self numberOfItemsInComboBox:myComboBox], it says *** -[NSComboBoxCell objectValueOfSelectedItem] should not be called when usesDataSource is set to YES My question is