• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImageView vs IKImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImageView vs IKImageView


  • Subject: Re: NSImageView vs IKImageView
  • From: James Merkel <email@hidden>
  • Date: Sun, 07 Aug 2011 07:47:11 -0700


On Aug 7, 2011, at 5:17 AM, Graham Cox wrote:


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


That document you referenced has some very useful information that I haven't seen before.
I had concluded the view hierarchy was similar to what is shown therein, but I just found that out by trial and error.
It's difficult to get your arms around all of the documentation you need to know in order to do a task. Just reading the class references doesn't get you there.


Possibly what I'm doing in the update is not exactly correct -- I'll review that document in more detail to determine.

Thanks,

Jim Merkel


_______________________________________________

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


References: 
 >NSImageView vs IKImageView (From: James Merkel <email@hidden>)
 >Re: NSImageView vs IKImageView (From: Graham Cox <email@hidden>)
 >Re: NSImageView vs IKImageView (From: James Merkel <email@hidden>)
 >Re: NSImageView vs IKImageView (From: Graham Cox <email@hidden>)
 >Re: NSImageView vs IKImageView (From: James Merkel <email@hidden>)
 >Re: NSImageView vs IKImageView (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Strange NSZombie occurring
  • Next by Date: Re: Strange NSZombie occurring
  • Previous by thread: Re: NSImageView vs IKImageView
  • Next by thread: Re: NSImageView vs IKImageView
  • Index(es):
    • Date
    • Thread