filtered NSCollectionView
filtered NSCollectionView
- Subject: filtered NSCollectionView
- From: Georg Seifert <email@hidden>
- Date: Thu, 5 Nov 2009 22:16:57 -0600
Hi,
I have a problem with my NSCollectionView.
The itemView contains a textfield bound to the name property of the
represented object.
If I filter the content array on represented.name and then use the
textfield to change the name of on of the items I get this (on end
editing):
2009-11-05 21:26:29.192 Glyphs[6872:a0f] Document import time: 1.688923
2009-11-05 21:26:55.353 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.353 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.353 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.353 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.353 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.353 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.354 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.354 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.354 Glyphs[6872:a0f] unlockFocus called too many
time.
2009-11-05 21:26:55.354 Glyphs[6872:a0f] Unlocking Focus on wrong view
(<NSTextField: 0x19300390>), expected <GlyphIconView: 0x19300320>
I did wrapped the drawing code in [NSGraphicsContext saveGraphicsState/
restoreGraphicsState];
Simplified it looks like this:
[NSGraphicsContext saveGraphicsState];
[[NSColor grayColor] set];
NSRectFill([self bounds]);
[NSGraphicsContext restoreGraphicsState];
If I remove drawRect: from my class, everything works fine.
I tried to remove the focus of the textField prior to setting "represented.name
", but I cant get the send action of the textfield to work.
Can anybody pleas help me with this?
Regards
Georg
_______________________________________________
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