Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help with some cocoa

Help with some cocoa
Thread Tools
Dedicated MacNNer
Join Date: Apr 2004
Status: Offline
Reply With Quote
Nov 30, 2004, 11:33 PM
 
Code:
[matrixInstance addColumnWithCells:arrayInstance];
According to the documentation that i have for NSMatrix, the above method should add the cells in the array to the matrix (and, provided the matrix is empty, it should just make enough rows for the cells in arrayInstance.

Unfortunately, when I try to run the code, it results in this error:
Code:
2004-11-30 22:33:00.611 MyApp[1946] *** Assertion failure in -[NSMatrix insertColumn:withCells:], AppKit.subproj/NSMatrix.m:1321 2004-11-30 22:33:00.620 MyApp[1946] Invalid parameter not satisfying: !newCells || ([newCells count] == _numRows)
anyone know what's going on?
     
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status: Offline
Reply With Quote
Dec 1, 2004, 08:30 AM
 
It sounds like you have a column in there already. It may be an empty column, but it still might be there.

Call numberOfRows or numberOfColumns before your statement to check.
     
Dedicated MacNNer
Join Date: Apr 2004
Status: Offline
Reply With Quote
Dec 1, 2004, 09:00 PM
 
both those methods returned null... hm...

anyway, I used
Code:
[matrixinstance renewRows: columns:];
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2