Re: Finding the directory of current Form

From: <bdg_at_hotmail.com>
Date: Thu, 25 Feb 1999 19:57:32 GMT
Message-ID: <7b49v6$ero$1_at_nnrp1.dejanews.com>


This function seems to only work for the first form opened. Subsequent forms seem to have no path in their "current_form" application property.

The test that I'm using is:
Module1
  When-New-Form-Instance:

      :Block1:Item1 := get_application_property(current_form);   Block1
    Item1 (text item)
    Button1

        When-Button-Pressed: CALL_FORM('MODULE2.FMX'); Module2
  When-New-Form-Instance:

      :Block2:Item2 := get_application_property(current_form);   Block2
    Item2 (text item)

When Module2 is ran directly, Item2 contains the "path and form". But when Module2 is started from the button in Module1, Item2 contains the form name only (MODULE2.FMX).

I tried a similar test using the get_form_property function with similar results.

Many thanks for the assistance,
Brian

In article <36D5847E.38211CE3_at_web.de>,   guenter-huerkamp_at_t-online.de (Guenter Huerkamp) wrote:
> You can get the path with this function
> :
> FUNCTION workdir RETURN varchar2 IS
> formname varchar2(12);
> path_and_formname varchar2(200);
>
> begin
> path_and_formname := Get_application_property(current_form);
>
> /* liefert leider nur den Modulnamen !!!!!!, nicht den Formnamen */
> /* formname := Get_application_property(current_form_name)||'.FMX'; */
> /* return( substr(path_und_formname, 1,
> length(path_und_formname)-length(formname)) );*/
>
> /* z.b. path_and_formname = p:\forms\invekos.fmx or
> path_and_formname = p:\forms\invekos
> workdir = p:\forms\ */
>
> return(substr(path_and_formname,1,instr(path_and_formname, '\',-1,1)));
> end;
>
> bdg_at_hotmail.com schrieb:
>
> > Can Developer/2000 identify the source directory of the currently running
> > Form?
> >
> > I have multiple versions of the Forms executables (development, unit test,
> > system test, production) installed in different directories and shortcuts
> > set up to (hopefully) pull in from the correct directory. It's a little more
> > complicated because if the Form executable doesn't exist in the
> > non-production directories, the FORMS45_PATH is set to pull in the production
> > version. I would like to add the directory in the title bar to help verify
> > that the correct Form executable is being used.
> >
> > I'm using Developer/2000 v1.2, but input on any more recent version would
> > also be appreciated.
> >
> > Thanks,
> > Brian Gastineau
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Feb 25 1999 - 20:57:32 CET

Original text of this message