• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem with table view and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with table view and bindings


  • Subject: Problem with table view and bindings
  • From: Andreas Mayer <email@hidden>
  • Date: Wed, 23 Jun 2004 13:27:49 +0200

Hi all.

Is it possible to bind each column of a table view to a different array controller?

I can do so in IB but the outcome isn't what I would have expected:

<http://www.furrysoft.de/arraycontroller/screenshots/result.jpg>


What I'm doing is quite simple:

@interface MainController : NSWindowController {
NSArray *testArray;
NSArray *testArray2;
BOOL testNibLoaded;
}

@implementation MainController

- (void)awakeFromNib
{
if (!testNibLoaded) {
testNibLoaded = YES;
[NSBundle loadNibNamed:@"Test" owner:self];
[self setTestArray:[NSArray arrayWithObjects:@"1", @"2", @"3", @"4", @"5", @"6", nil]];
[self setTestArray2:[NSArray arrayWithObjects:@"a", @"b", @"c", @"d", @"e", @"f", nil]];
[self showWindow:self];
}
}


These are the bindings of the two array controllers:

<http://www.furrysoft.de/arraycontroller/screenshots/ arraycontroller1.jpg>

<http://www.furrysoft.de/arraycontroller/screenshots/ arraycontroller2.jpg>


And that's how the table columns are bound:

<http://www.furrysoft.de/arraycontroller/screenshots/tablecolumn1.jpg>

<http://www.furrysoft.de/arraycontroller/screenshots/tablecolumn2.jpg>


The sample project source is here:

<http://www.furrysoft.de/arraycontroller/ArrayControllerTest.zip>



Seems to be basic stuff. What am I missing?


Andreas
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Problem with table view and bindings
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Re: starting an app with execve()
  • Next by Date: Re: Black Background in an imageview?
  • Previous by thread: Re: Toolbar from Panel with side handle and controls
  • Next by thread: Re: Problem with table view and bindings
  • Index(es):
    • Date
    • Thread