CFileDlg:Start


The Start method begins iteration over the list of file names returned by the Open method. Use the Next method to return each of the successive file names.

Syntax

CFileDlg:Start()

Example

The following example uses Start to initialize a loop over files returned by the Open method:

F = CFileDlg:new()

-- create a CFileDlg object, F

 

F.bSetMaxFiles = true

-- set the flag for selecting more than 1 file

F.nMaxFiles = 100

-- allow selecting up to 100 files

sName, bSuccess = F:Open()

-- get a file name

-- create a table to hold the names of the selected files

FileName = {}

-- create the table

n = 1

-- setup an index counter

F:Start()

-- initialize the file name iteration

while true do

-- loop through the selected files:

  FileName[n] = F:Next()

-- put file name into table

  n = n + 1

-- increment the table index

end

 

Related Topics

CFileDlg class

Open

Next