On 23/09/2009, at 12:48 PM, Peter Zegelin wrote:

I would like to show some sort of visual feedback. I tried subclassing the content view of the window thinking it would automatically hilite, but I can't get it to. Note I set focus ring to default in IB for this. Also the drag icon doesn't update to show a '+' symbol.

The drag cursor will show a + when you return NSDragOperationCopy.

No visual drop target feedback is shown by default - you have to do that yourself. Typically this involves having a flag set in your view "shows drag highlight" that is set on drag enter and cleared on drag exit, drop, etc. At these times you also call -setNeedsDisplay: on the view. In your -drawRect: method you test the flag and if set draw the appropriate highlight. Focus rings don't come into it - they indicate keyboard focus, and are nothing to do with drag/drop.

After I get the file what should I do to make sure the document is still set up correctly. I currently call my documents readFromURL: ofType: error: method to load the file but I am not sure if that is correct as calling synchronizeWindowTitleWithDocumentName afterwards doesn't change the title of the window to the new file name.


Try calling setFileURL: instead (or maybe as well, before synchronize...)

--Graham
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to