• 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
Images in folder - simple question?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Images in folder - simple question?


  • Subject: Images in folder - simple question?
  • From: email@hidden (Dominik Gwosdek)
  • Date: Wed, 28 Jan 2004 12:41:34 +0100

Hi,

I'm starting to learn cocoa and objective-c and I'm trying to write a little app that has an NSImageView and only two buttons (back, forward) and a folder with ca. 100 pictures(001.jpg ... 100.jpg). I have set up an outlet to the ImageView and two actions for the buttons.Now I need a little advice to implement the following action:

when the user clicks on for example on the forward button the ImageView should display the next image from the folder(/images) and so on.

I think I need to create an NSArray (with the content of a folder?).


- (IBAction)forwardButton:(id)sender
{

image = [NSImage imageNamed:@"001"];
[showImage setImage: image];

}

Thank you in advance.

Dominik
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Images in folder - simple question?
      • From: Jörn Salewski <email@hidden>
    • Re: Images in folder - simple question?
      • From: Jeremy Dronfield <email@hidden>
    • Re: Images in folder - simple question?
      • From: Stefan Pantke <email@hidden>
  • Prev by Date: Re: Name instance variables, methods and parameters.
  • Next by Date: List of Images like in System Preferences
  • Previous by thread: Re: removing focus rings
  • Next by thread: Re: Images in folder - simple question?
  • Index(es):
    • Date
    • Thread