Re: A problem of NSImageView
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