Hi Jacques,

No choice + OK makes no sense, so they shouldn't be able to return given that input.

A legal choice + OK or Cancel should be - and is - the only valid responses from the standard file dialogs.

I've used both dialog routines in handlers subs without any problems, e.g. in a handler for a button titled "..." (prompt for a path name).

What are you trying to accomplish ?

Best regards / Med venlig hilsen
Lars Nielsen
GisPro



Jacques Paris wrote:

I am certainly a very late bloomer in the way I am trying finally to do
certain "standard" things and discovering some problems.

I am using version MB6.5 to build a dialog box with lots of controls most of
them having their own handlers. One would be a button launching the
procedure to record the user choice for the table to be treated with lots of
checks, the other symmetrical for saving the output.

I just discovered that in the context of handlers (what does appear to me to
be a mere sub) fileopendlg$() and filesaveasdlg$() cannot close when they
should return an empty string (no choice + OK). An empty string can be
detected with the traditional approach of file_name=file...dlg$()  + if
file_name="" then .... In a handler situation, it is only when <cancel> is
used that the return value would be "analyzed".

I have used the file... functions in many "normal" subs without encountering
this behavior. Can anyone shed any light on that "problem" (confirmation,
corrections to it since 6.5, workarounds ...) ?

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 18505


Reply via email to