• 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
Question regarding NSView's drawRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question regarding NSView's drawRect


  • Subject: Question regarding NSView's drawRect
  • From: "David Chan" <email@hidden>
  • Date: Mon, 30 Oct 2006 15:28:45 +0800

Hi all, I have a question regarding NSView. I have an application that
keep many subclassed NSView objects. Users shall be able to navigate
around and depending on their  action, certain NSView objects will be
shown and other will be hidden or moved to other window

Now.. I actually only need to use drawRect once for every object -
when I first created the objects. I will neither need to scroll nor do
anything that will require redrawing of the NSView objects. By right,
it should be safe to release all the image data objects I use after
the drawRect returns; and that is my intention in order to minimize
the memory usage. But it seems that there are certain occasions where
the Application would call drawRect on its own. This will be a problem
because all the image data will no longer be there.

So my question is.. Is it possible for me to intercept this so that
the drawRect will not be called? Or maybe there can be other
workaround so that my App will not need to redraw the NSView
unnecessarily?

Thanks a lot for your attention.

Regards,
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Question regarding NSView's drawRect
      • From: Dominik Pich <email@hidden>
  • Prev by Date: Re: Object allocation question
  • Next by Date: Re: Question regarding NSView's drawRect
  • Previous by thread: Export resolution of an Image
  • Next by thread: Re: Question regarding NSView's drawRect
  • Index(es):
    • Date
    • Thread