Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Peter
Hi, I’d be very happy if somebody could point me to an example of an editable NSTableView set up programmatically. I searched the web, looked into TableViewPlayground etc. but could not come up with anything. I’d actually prefer to use bindings, but my first column should simply display the r

Letting an instance know its own index within a container array - how to?

2014-01-07 Thread Peter
Rethinking the problem of how to display row numbers in a view based NSTableView from a different perspective: I could use bindings if I could manage to make my row entities know their index within the table view content array. As a solution I could device a delegate for my entities and make th

UINavigationBar.tintColor life on own?

2014-01-07 Thread Hado Hein
I have an app where the navigation bar tint color starts to have an life on its own. Basic setup is that the app loads a document and in this document there is a key/value for the navigation bar tint color. In my basic “make up the content view” i also set the navigation bar color with self.na

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Jens Alfke
On Jan 7, 2014, at 7:52 AM, Peter wrote: > I’d be very happy if somebody could point me to an example of an editable > NSTableView set up programmatically. It sounds like you just mean using a custom data source rather than relying on bindings to provide the data? That’s very easy to do. Just

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Peter
Am 07.01.2014 um 17:32 schrieb Jens Alfke : > > On Jan 7, 2014, at 7:52 AM, Peter wrote: > >> I’d be very happy if somebody could point me to an example of an editable >> NSTableView set up programmatically. > > It sounds like you just mean using a custom data source rather than relying > o

Letting an instance know its own index within a container

2014-01-07 Thread Gordon Apple
If all you are trying to do is display row numbers, the only reasonable way I know is to use the table¹s delegates, then find and insert the row number for your table¹s number column. Doing it the way you stated would preclude display elsewhere if you needed that later. IMHO, it¹s preferable to us

Re: Letting an instance know its own index within a container array - how to?

2014-01-07 Thread Keary Suska
On Jan 7, 2014, at 9:09 AM, Peter wrote: > Rethinking the problem of how to display row numbers in a view based > NSTableView from a different perspective: > > I could use bindings if I could manage to make my row entities know their > index within the table view content array. > > As a soluti

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Keary Suska
On Jan 7, 2014, at 9:40 AM, Peter wrote: > > Am 07.01.2014 um 17:32 schrieb Jens Alfke : > >> >> On Jan 7, 2014, at 7:52 AM, Peter wrote: >> >>> I’d be very happy if somebody could point me to an example of an editable >>> NSTableView set up programmatically. >> >> It sounds like you just

BT data (NSData *) question

2014-01-07 Thread Eric E. Dolecki
I am receiving data from an RFduino board to my iOS application. In Arduino land it's being sent like so: RFduinoBLE.send(1); //button pressed RFduinoBLE.send(0); //button released In my didReceive:(NSData *)data I have this: const uint8_t *value = [data bytes]; I would like to evaluate that va

Re: BT data (NSData *) question

2014-01-07 Thread Jens Alfke
On Jan 7, 2014, at 10:22 AM, Eric E. Dolecki wrote: > How can I adjust that if else statement properly to evaluate the data sent > to the iOS application over BLE? > > I'm in unchartered territory here. Is it something like the below? I'm > thinking no... The code you put below looks fine, tho

Re: BT data (NSData *) question

2014-01-07 Thread Eric E. Dolecki
I wasn't sure about evaluating like that (value[0] = 2) or if I'd need to convert it to something first. I've never used uint8_t before. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki On Tue, Jan 7, 2014 at 1:54 PM, Jens Alfke wrote: > >

Re: BT data (NSData *) question

2014-01-07 Thread Jens Alfke
On Jan 7, 2014, at 12:00 PM, Eric E. Dolecki wrote: > I wasn't sure about evaluating like that (value[0] = 2) or if I'd need to > convert it to something first. I've never used uint8_t before. It’s just a typedef for ‘unsigned char’. Nothing magic. —Jens _

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Peter
Thank you for your comment. Did you really manage to create *editable* view-based table views with data sources? Then I am curious to know how you managed to make them editable. A data source method channeling data from the table view to the data source is nowhere to be seen. - (void)tableView

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Keary Suska
On Jan 7, 2014, at 1:38 PM, Peter wrote: > Thank you for your comment. > > Did you really manage to create *editable* view-based table views with data > sources? Yes. > Then I am curious to know how you managed to make them editable. The issue here is simply how to communicate edits to your m

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Peter
Am 07.01.2014 um 23:16 schrieb Keary Suska : > On Jan 7, 2014, at 1:38 PM, Peter wrote: > >> Thank you for your comment. >> >> Did you really manage to create *editable* view-based table views with data >> sources? > > Yes. > >> Then I am curious to know how you managed to make them editable

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Quincey Morris
On Jan 7, 2014, at 14:27 , Peter wrote: > OK, thanks for the pointers. This confirms my suspicion that (a) there is no > simple way to do it (as in cell based tables) and (b) that view based tables, > despite some obvious advantages, are not to be considered to be the Holy > Grail of Table Mak

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Willeke
Op 7 jan 2014, om 16:52 heeft Peter het volgende geschreven: > I’d actually prefer to use bindings, but my first column should simply > display the row numbers After some experimenting I managed to create a simple editable view based table view with row numbers, using bindings except for the r

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Peter
Great! Yes, this helps immensely. Thank you very much! It didn’t occur to me that it is possible to mix the bindings and data source approaches. In order not to waste more time and get my job done, I took resort to a double click method copying the data to be edited to an NSTextField, whose act

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread Seth Willits
To clarify: this isn't mixing approaches. Willeke isn't using any datasource methods at all. tableView:viewForTableColumn:row: is a delegate method. The *only* datasource method view-based table views support is the objectValue getter, which simply sets the objectValue property on the view retu

NSScrollView problem

2014-01-07 Thread James Pengra
Folks, I'm using Xcode 5.0.2 with OSX10.8.5. When I build a simple OS Application (nonDocument type) and I move an NSScrollView onto a window and then run the program, it builds normally, but it flags a problem that there is a "Misplaced View" and that "Frame for 'Clip View' will be diff

Help to debug NSPerformService..

2014-01-07 Thread Peter Teeson
OS X 10.8.5, Xcode 5.0.2, Document app In my app I have this: @interface Guess : NSTextField // populated programmatically … -(void)check; // method to programatically use the Service "Look Up In Dictionary" @end @implementation Guess ... -(void)check { // Lookup word in dictionary [self sel

Re: NSScrollView problem

2014-01-07 Thread Quincey Morris
On Jan 7, 2014, at 17:14 , James Pengra wrote: > I'm using Xcode 5.0.2 with OSX10.8.5. When I build a simple OS > Application (nonDocument type) and I move an NSScrollView onto a window and > then run the program, it builds normally, but it flags a problem that there > is a "Misplaced Vi

Re: Help to debug NSPerformService..

2014-01-07 Thread Ken Thomases
On Jan 7, 2014, at 9:57 PM, Peter Teeson wrote: > OS X 10.8.5, Xcode 5.0.2, Document app > > In my app I have this: > @interface Guess : NSTextField // populated programmatically > … > -(void)check; // method to programatically use the Service "Look Up In > Dictionary" > @end > > @implementatio