opendir redux

Howie howiewz at beonthenet.com
Wed Apr 6 05:53:08 PDT 2005


My opendir problem - redefined.

I am trying to present the user with a list of filepro files which, thanks
to John, I now know are returned in the @dirlist_name array.
Once they choose a file I want to generate a list of filepro screens in that
file.

My first problem was I didn't know where the list was returned - as I said,
John helped with that.
The second problem was that I had to issue a closedir() before issuing the
second opendir to get the screen names.

Now, after the opendir("SCR_MASK",fn), the @dirlist_name arry contains the
word "screen" over and over again, as many times as there are screens in the
file I have chosen.

Here is the test code that I am having the problem with:

@keyt    If:
       Then: n(3,.0)=opendir()                                 'create
filepro dir list
         If:
       Then: n=listbox(@DIRLIST_NAME,"3")        'allow user to choose a
file - starting at the first valid file name, skipping over the "." and ".."
entries
         If:     n="0"
'allow user to cancel listbox with break
       Then: end
         If:
       Then: n=n+"2"                                                'add two
to the results to skip over the "." and ".." entries
         If:
       Then: show "@"<@DIRLIST_NAME(n){"      'show the file name the user
choose  - Work OK
         If:
       Then: fn=@dirlist_name(n){""                        'set the file
name into "fn"
         If:
       Then: n=closedir()                                         'close the
directory list
         If:
       Then: n=opendir("SCR_MASK",fn)                'ask for the screen
name list
         If:
       Then: n=listbox(@DIRLIST_NAME)               'show the results and
allow a choice
         If:
       Then: show "@"<@DIRLIST_NAME("1")       'show the 1st entry, in case
the listbox was the problem - still just shhows the word "screen"

We are running SCO and filepro 5.0.13D4 and 5.0.13R4

Am I doing something wrong or is this just a bug?

My current thinking is that it is a bug because, if I change the
opendir("SCR_MASK",fn) to opendir("PRC_MASK",fn), it returns the processing
table names correctly.

Howie



More information about the Filepro-list mailing list