• 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
Re: Adding rows and cols to an NSMatrix programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding rows and cols to an NSMatrix programmatically


  • Subject: Re: Adding rows and cols to an NSMatrix programmatically
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Sat, 8 May 2004 14:46:54 -0700

Hello...

In the descriptions for those methods in the ApplicationKit docs, it mentions that you need to make sure that there are the correct number of cells in the array to fill the new row or column that you are creating.

So, if your matrix is currently 4 rows and 3 columns, if you want to add a row the array would need to contain 3 cells (one for each of the columns in the matrix). If your matrix is currently 4 rows and 3 columns and you want to add a column, the array would need to contain 4 cells (one for each row).

Hope that helps,

Louis


Hi,

I've been trying to add some rows and columns to an NSMatrix but my app
keeps crashing. This is what I'm currently doing:

NSArray *myCells = [NSArray arrayWithObject:[imgView cell]];
[matrix addRowWithCells:myCells];
[matrix addColumnWithCells:myCells];

What am I doing wrong?

Thanks in advance!
_______________________________________________
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.


References: 
 >Adding rows and cols to an NSMatrix programmatically (From: Jesus De Meyer <email@hidden>)

  • Prev by Date: Re: Resize Matrix
  • Next by Date: Pre-defined methods - documentation?
  • Previous by thread: Adding rows and cols to an NSMatrix programmatically
  • Next by thread: [SOLVED]: Can a sheet appear at an arbitrary window position?
  • Index(es):
    • Date
    • Thread