• 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 19:23:12 +0100

>
> It would be useful to know what ad veloper is trying to achieve, what
> objects contain the image data, and how they are managed.
>

This is a coredata app.

The arrayController's contentSet is bound to another arrayController's
selection. Drag and drop into the imageCell performs this action:

- (IBAction)imageDropped:(id)sender {

(assume I have obtained the index of the sender and the
arraycontroller is ascending order sorted to match) then ..

[[[arrayController arrangedObjects] objectAtIndex:indexOfImageCell]
setValue:[image  TIFFRepresentation] forKey:@"imageData"]];

}

This is a convenience at this stage. I intend to follow mmalc's
example regarding the storing of images using CoreData using URL's
instead.

I think if I implement an observer for the other arrayControllers
selectionIndexes and then populate the image cell's in the observer
method using:

	NSImage *image = [[NSImage alloc] initWithData:[[[arrayController
arrangedObjects] objectAtIndex:index] valueForKey:@"imageData"]];

NSImageView *imageView = [imageViewArray objectAtIndex:index]
[imageView setImage:image];

I think this approach covers all the exits, as far as I can see.

Thanks for the help.
_______________________________________________

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

  • Follow-Ups:
    • Re: bind imageView data to NSArrayController objectAtIndex:
      • From: mmalc crawford <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>)

  • Prev by Date: Some architecture questions
  • Next by Date: Re: bind imageView data to NSArrayController objectAtIndex:
  • Previous by thread: Re: bind imageView data to NSArrayController objectAtIndex:
  • Next by thread: Re: bind imageView data to NSArrayController objectAtIndex:
  • Index(es):
    • Date
    • Thread