realbasic-nug
[Top] [All Lists]

Re: Folder items/files

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Folder items/files
From: Charles Yeomans <yeomans at desuetude dot com>
Date: Sun, 30 Dec 2001 16:34:12 -0500

On Sunday, December 30, 2001, at 04:23  PM, Beanhead wrote:

Hi all. I'm a newbie to RealBasic, so please forgive me if this is something really simple. I've researched the manual and developer's guide with no (obvious?) luck.

Objective: Open a folder containing a bunch of images and display them in the order they appear in the folder.

Problem: I haven't figured out how to access the contents of a folder in a way that lets me access it's contents in a sequential order. Psuedo code of intent is as follows:

Open folder
For i = 1 to NumOfPicsInFolder
  DisplayPic
Next

Any advice would be appreciated.  Thanks!


1. Buy "REALbasic: The Definitive Guide"; make sure you get the second edition.

2. Here's something approximating RB code. In short, given a FolderItem which is a folder, use the function Item to access
items contained therein by index.

For i = 1 to folder.Count
 picItem = folder.Item(1)
 If NOT picItem.Directory then
  picture = picItem.OpenasPicture
 End if
 Next


Charles Yeomans




<Prev in Thread] Current Thread [Next in Thread>