Re: NSImageView vs IKImageView
Re: NSImageView vs IKImageView
- Subject: Re: NSImageView vs IKImageView
- From: Graham Cox <email@hidden>
- Date: Sun, 07 Aug 2011 22:17:01 +1000
On 07/08/2011, at 4:56 PM, James Merkel wrote:
> updating of some text boxes in the same window.
> But I have fixed that. I just needed an update method for the window
No you don't. Updating a text box is also automatic. There's almost never a reason to "update a window", views that come from Cocoa handle that for you when their content changes. Views you write yourself just needs to invoke [NSView setNeedsDisplay:YES], and you're done.
Your implementation seems to be built on faulty assumptions about how views/windows work, which in turn suggests you haven't read the documentation:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaViewsGuide/Introduction/Introduction.html
One thing that does seem odd however with Apple's docs is that it's really hard to find a simple two-line explanation anywhere of how views get drawn (i.e. how windows are updated). The Views Programming Guide above already seems to assume you know that, and the Cocoa Fundamentals Guide doesn't get that far, as far as I could tell. I'm sure I've seen it written down somewhere, but as I say, it's hard to find. If that's true then this is a glaring hole in the documentation, which might go some way to explain why so many on this list don't seem to have these concepts very clear.
--Graham
_______________________________________________
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