• 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: A problem of NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A problem of NSImageView


  • Subject: Re: A problem of NSImageView
  • From: "Bus Mini" <email@hidden>
  • Date: Mon, 10 Jul 2006 00:01:59 +0800

On 7/8/06, Chris Hanson <email@hidden> wrote:



You'll need to come up with a strategy to avoid blocking the main run loop when no image data is available for you to display.

  -- Chris


As your suggestion, I put my code in a thread, then it can work. But another
problem posed.
My thread function like this:


-(void)workThread:(id)param {

  while(1)
   {

     [self getImage];//this method just modify some pixel in "screenImage",
so I can see the change.
     [ImageView setImage:screenImage];
    }
}

This function just set the screenImage to ImageView one time, I can not see
the change.

But if I add *[ImageView setImage:otherImage]* before  *[ImageView
setImage:screenImage];* then I can see screenImage  changed everytimes. So,
I guess, If I just modify some pixel in screenImage, then set it to the
view, ImageView will consider that was the same view, so ImageView do
nothing. But if I set another image to ImageView, the ImageView will konw
that things are changed, it  must do something, so it update its
content.AmI right? How can I solve this problem?

Thanks for reading my question.






-- Yours sincerely Mini Bus. _______________________________________________ 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: A problem of NSImageView
      • From: "Bus Mini" <email@hidden>
References: 
 >Re: A problem of NSImageView (From: "Bus Mini" <email@hidden>)
 >Re: A problem of NSImageView (From: Chris Hanson <email@hidden>)

  • Prev by Date: KVC validation and overriding "Discard Changes" button
  • Next by Date: controlling width of space character
  • Previous by thread: Re: A problem of NSImageView
  • Next by thread: Re: A problem of NSImageView
  • Index(es):
    • Date
    • Thread