FROM : Jerry Krinock
DATE : Mon May 29 22:04:49 2006
I just discovered the wonders of using -objectValue to read an NSControl.
Very cool. No matter what kind of control it is, I get an object which I can
just slam into my database using one generic method.
Except for NSMatrix. According to NSControl documentation, "If the control
contains many cells (for example, NSMatrix), then the value of the currently
selected cell is returned."
Well in, say, a matrix of radio buttons, the "selected cell" always has a
value ot NSNumber 1, because, duh, it is selected. So I always get 1, which
is useless.
Is there any way to make -objectValue give me what I need from an NSMatrix:
The index or tag of the selected cell?
Jerry Krinock
DATE : Mon May 29 22:04:49 2006
I just discovered the wonders of using -objectValue to read an NSControl.
Very cool. No matter what kind of control it is, I get an object which I can
just slam into my database using one generic method.
Except for NSMatrix. According to NSControl documentation, "If the control
contains many cells (for example, NSMatrix), then the value of the currently
selected cell is returned."
Well in, say, a matrix of radio buttons, the "selected cell" always has a
value ot NSNumber 1, because, duh, it is selected. So I always get 1, which
is useless.
Is there any way to make -objectValue give me what I need from an NSMatrix:
The index or tag of the selected cell?
Jerry Krinock
| Related mails | Author | Date |
|---|---|---|
| Jerry Krinock | May 29, 22:04 | |
| Greg Herlihy | May 29, 22:40 | |
| Jerry Krinock | May 30, 01:01 | |
| Michael Ash | May 30, 01:09 | |
| Lon Giese | May 30, 02:19 | |
| Jerry Krinock | May 30, 04:05 | |
| John C. Randolph | May 30, 08:26 |






Cocoa mail archive

