Re: Get wrong tag value from NSPopupButtonCell
Re: Get wrong tag value from NSPopupButtonCell
- Subject: Re: Get wrong tag value from NSPopupButtonCell
- From: Reinhard Segeler <email@hidden>
- Date: Sun, 31 Oct 2010 11:46:17 +0100
Created a test project, to isolate the problem with the same results.
Filed a bug report to Apple.
Thanks
-- Reinhard
Am 29.10.2010 um 23:51 schrieb Quincey Morris:
On Oct 29, 2010, at 14:02, Reinhard Segeler wrote:
Can't get the correct tag value in this way. What's wrong?
NSPopUpButtonCell *testCell = [ [ [ NSPopUpButtonCell alloc] init]
autorelease];
// olPopups is an Outlet to an NSMatrix
[ olPopups selectCellAtRow:0 column:0 ];
testCell = [ olPopups selectedCell];
[ testCell setTag:1000];
testTag = [ testCell tag];
results always in tag == 0, even though the tag value is shown
correctly in the debugger.
Most likely, [olPopups selectedCell] is nil.
BTW, it makes no sense, in this code fragment, to create an object
to initialize 'testCell', merely to discard it right away by
replacing the variable value with the result of [olPopups
selectedCell].
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden