• 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
NSTableView and crashes, what am I doing wrong?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView and crashes, what am I doing wrong?


  • Subject: NSTableView and crashes, what am I doing wrong?
  • From: Henrik Eliasson <email@hidden>
  • Date: Tue, 8 Apr 2003 21:50:40 +0200

Dear all,

I'm getting desperate over very strange behavior when trying to
implement an ordinary table uing NSTableView. In Interface Builder, I
have made a window containing an ordinary table view. I have connected
this table view to a controller object as dataSource in which I have
implemented the methods numberOfRowsInTableView: and tableView:
setObjectValue: forTableColumn:. I am using two objects to store the
data to be displayed in the table, a NSMutableArray and a
NSMutableDictionary. I allocate these in the init: method of the
controller object, like so:

- (id)init {

self = [super init];

glassDict = [NSMutableDictionary dictionary];
glassArray = [NSMutableArray array];

return self;
}

Nothing strange with that, I hope. The strange thing happens when the
numberOfRowsInTableView: method gets called, which happens right after
the window in which the table view is located is made visible using the
makeKeyAndOrderFront: message. When the numberOfRowsInTableView: method
gets called, the program crashes with a signal 11 (SIGSEGV). The only
thing this method does is to return the number of elements in the
glassArray according to:

- (int)numberOfRowsInTableView:(NSTableView *)tableView {


return [[self glassArray] count];
}

Could anyone explain what is going on here?

/Henrik
_______________________________________________
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: NSTableView and crashes, what am I doing wrong?
      • From: Greg Casey <email@hidden>
    • Re: NSTableView and crashes, what am I doing wrong?
      • From: j o a r <email@hidden>
    • Re: NSTableView and crashes, what am I doing wrong?
      • From: publiclook <email@hidden>
  • Prev by Date: Re: NSImageView Problem
  • Next by Date: HowTo: server
  • Previous by thread: Re: Inserting Graphics into NSTextView
  • Next by thread: Re: NSTableView and crashes, what am I doing wrong?
  • Index(es):
    • Date
    • Thread