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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to