• 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: bind imageView data to NSArrayController objectAtIndex:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >bind imageView data to NSArrayController objectAtIndex: (From: "ad veloper" <email@hidden>)
 >Re: bind imageView data to NSArrayController objectAtIndex: (From: mmalc crawford <email@hidden>)
 >Re: bind imageView data to NSArrayController objectAtIndex: (From: "Cathy Shive" <email@hidden>)
 >Re: bind imageView data to NSArrayController objectAtIndex: (From: mmalc crawford <email@hidden>)
 >Re: bind imageView data to NSArrayController objectAtIndex: (From: "ad veloper" <email@hidden>)
 >Re: bind imageView data to NSArrayController objectAtIndex: (From: mmalc crawford <email@hidden>)
 >Re: bind imageView data to NSArrayController objectAtIndex: (From: "ad veloper" <email@hidden>)
 >Re: bind imageView data to NSArrayController objectAtIndex: (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: bind imageView data to NSArrayController objectAtIndex:
  • Next by Date: Displaying shapes on a second monitor
  • Previous by thread: Re: bind imageView data to NSArrayController objectAtIndex:
  • Next by thread: How to force a control to validate ?
  • Index(es):
    • Date
    • Thread