Hello Fred,

you wrote on Thu, 23 May 2024 00:58:09 +0000:

> I did try your demo TextView.prj but at loading there is a exception
> message: List index (11) out of bounds. After clicking on OK, the
> application crash.

Interesting. I just unpacked the test project into a new directory,
even using the packaged project file, compiled it, and it works without a
problem. I get a file request dialog, can select a file from it, and on
ok the file is loaded and displayed in a newly opened window. Of course, I
_assume_, the newdialogs and their "ancillary" modified units (msestatfile,
at least) are available? But otherwise, the compiler would probabely
complain anyway.
So, sorry, I have no clue here.

> For the demo FileRequester.prj, I did not catch how to use it and with
> what parameters. Could you give a example how to use it?  Thanks.

Did you compile it with the definition "plain_english" enabled? This might
make the help display easier to understand for you. It explains all the
options that it can take, and I tried to also give some clue as to what it
can produce.
The simplest use is to select a file and output its name on stdout. But
you can also use it to execute a program with the selected file, or list of
files, if set that way. You DO need to specify at least one option, except,
of course "--help" or "-h", to display a selection window. If you use "-t"
or "--title", followed by some name, it will show that as its titlle bar
name and use it as the name of its stat file also.
A more complicated example for a use is to select pictures to display is:

$ FileRequest --fmask "bmp,gif,png,jpg,jpeg,svg,BMP,GIF,PNG,JPG,JPEG,SVG"\
 --under-mouse --history --title "Select Pictures" --select <directory>\
 --list --exec qiv

Here "<directory> would have to be set to the directory you want to select
the picture files from, and "qiv" is the name of the display program it
will use. The "--list" option provides a list of all selected files as a
parameter to "qiv", which can cycle through them on its own. And yes, the
"--fmask" option provides the filter for selectable files. As you see, the
order of options is not relevant, as they're parsed within a loop. And no,
there's no non-option additional parameter, as the program's function is
just to supply such parameters for client applications (or scripts).
(But I just found it lacking somewhat on the "--exec" option, in that it
does NOT allow for passing additional information to the called program.
I shall add that...)
If the above explanation attempt isn't sufficient, please ask again.
Otherwise, I hope you may find a few applications for this kludge.

Happy computing, and have a nice time!

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------




_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to