[Gambas-user] Dialog and relative paths
adamnt42 at ...626...
adamnt42 at ...626...
Thu Oct 29 06:11:26 CET 2015
On Wed, 28 Oct 2015 04:47:53 +0100
Benoît Minisini <gambas at ...1...> wrote:
> Le 28/10/2015 04:40, adamnt42 at ...626... a écrit :
> > On Wed, 28 Oct 2015 03:16:16 +0100
> > Benoît Minisini <gambas at ...1...> wrote:
> >
> >> Le 28/10/2015 01:21, adamnt42 at ...626... a écrit :
> >>> I have an executable archive that contains several text files with
> >>> some metadata in them pertinent to that executable. Suffice to say
> >>> they are text files with a ".def" extension.
> >>>
> >>> At run time the user needs to select one of these files to be
> >>> loaded.
> >>>
> >>> Is there some way I can use the standard Dialog.OpenFile to achieve
> >>> this? i.e. is there some way to make the Dialog.Path a relative path
> >>> so it will show the files contained in the executable?
> >>>
> >>> tia bruce
> >>>
> >>
> >> Files inside archive are not real files anymore, so don't expect to
> >> select them with a standard file dialog.
> >>
> >> --
> >> Benoît Minisini
> >>
> >
> > Mmm, so any "elegant" way to allow user to select a "file" inside the archive.... ?
> > Actually, in fact is there any way to gba and get the "file" list?
> >
> > tia
> > bruce
> >
>
> This is not the problem: you can use the Dir() method to browse the
> archive contents. But you have to write your own selection dialog.
Yep, OK. I didn't think of the DIr() method. That works well. Selection dialog is a matter of minutes...
>
> Why wanting to use a file selector dialog to select something that is
> not a true file?
(You had to ask!)
It's back to my old problem of parsing horse auction online data. We use a set of "maps" now that let us extract the salient information from various sources. These maps are XML files that describe how the source doc is set out. However, sometimes, the provider uses this or that format (depending on whether Doris or Mabel or Gustav sent the source file/page/email). 98% of the time we can get it right automatically but sometimes we need to try a few different maps in order to be able to parse the source document correctly. SO... there are about 30 or so parser programs and over 120 maps. I thought it might be easier to manage the whole mess if the maps were contained within the executable, rather than having a "config" type of directory etc etc etc.
So its just for an internal tool and I thought there may be a way to use the standard Dialog somehow. Doesn't matter.
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
regards
b
--
B Bruen <adamnt42 at ...3379... (sort of)>
More information about the User
mailing list