Re: bind imageView data to NSArrayController objectAtIndex:
Re: bind imageView data to NSArrayController objectAtIndex:
- Subject: Re: bind imageView data to NSArrayController objectAtIndex:
- From: "ad veloper" <email@hidden>
- Date: Tue, 14 Aug 2007 20:22:04 +0100
> It's not clear what this means. How does the image view set the
> selection index?
>
- (IBAction)textureImageDropped:(id)sender;
{
int index;
NSImageView *imageView;
index = 0;
imageView = (NSImageView *)sender;
if (imageView == imageView0)
index = 0;
else if (imageView == imageView1)
index = 1;
etc.
I then use this as the objectAtIndex:index so we know which
employee's imageAsData to set:
[[[employeesController arrangedObjects] objectAtIndex:index]
setValue:[image TIFFRepresentation] forKey:@"imageAsData"];
> Yes, but it doesn't explain why you need to use objectAtIndex:.
>
> Is it the case that you have a fixed number of image views and you
> want the first one to display the image associated with the first
> selected employee, the second with the second selected employee etc?
>
That's correct.
_______________________________________________
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