[Gambas-user] Application.Name ?

Me adamnt42 at gmail.com
Mon Sep 3 17:14:23 CEST 2018


On Mon, 3 Sep 2018 15:40:43 +0200
Hans Lehmann <hans at gambas-buch.de> wrote:

> Hello.
> 
8< etc

> Is there an error in Gambas or is the error on my side?
> 

Well Hans,

I must admit that your query got me thinking and poking about inside executables etc,

In short, what is wrong is the help text.  Perhaps, instead of ...
	"Return the application name, as defined in the IDE project properties dialog."
 it should say...
	"Returns the name of the application being executed. This will be either the name of the executable if run outside the IDE or, if run from within the IDE, the name of the project directory as defined in the project creation dialog".

The short reason is that Application, as the help says "gives information about the currently running application" that is the executed .gambas archive not the source project information.

That "name" is stored nowhere that I can see, other than as the name of the exectable archive. So consider an installed version of the project, it will have no idea of what the original project name was.

(By the way, being able to create executable archives with different names is quite handy on many occassions. Say I want a project that can run eiher as a stand alone executable or to be used as a library.  Simple. create the standalone, say "MyProg.gambas", change the project type to Library and remake it as "MyLib.gambas". We have several other uses for the feature too.)

hth
-- 
b <adamnt42 at gmail.com>


More information about the User mailing list