[Gambas-user] Application.Name
Jussi Lahtinen
jussi.lahtinen at gmail.com
Tue Sep 4 01:33:18 CEST 2018
You might want to use Application.Title, but I agree that the documentation
is misleading. There isn't editable application name property, because it
comes from the directory name. Also the executable name is not in the
properties dialog.
Jussi
On Mon, Sep 3, 2018 at 3:58 PM Hans Lehmann <hans at gambas-buch.de> wrote:
> Hello.
>
> (1)
> I create a project with the project name ´GetAppName´.
>
> Code:
>
> Public Sub Form_Open()
> Label1.Text = "Application.Name = " & Application.Name
> End
>
> (2)
> Create executable file. The default name `GetAppName.gambas` is taken over
> with `OK`.
> Close IDE.
>
> (3)
> Starting the executable file `GetAppName.gambas` results in the following
> name for the application:
>
>
>
> (4)
> Reopen the project with the project name ´GetAppName´ in the IDE.
> Create executable file. The default name `GetAppName.gambas` will be
> overwritten with ´get.app.name.gambas` and accepted with `OK`.
> Close IDE.
>
> (5)
> Starting the executable file ´get.app.name.gambas` results in the
> following name for the application:
>
>
>
> I had expected from the definition
>
> *Application.Name (gb)*
> *Static Property Read Name As String*
> *Return the application name, as defined in the IDE project properties
> dialog.*
>
> that the name of the application is `GetAppName` - as in the first
> picture, because I hadn't changed the name in the properties dialog in the
> IDE.
>
> I noticed this strange, unexpected result when I used the value of the
> Application.Name property to create a directory ($sDataDirPath =
> Desktop.DataDir &/"gambas3" &/ Application.Name &/"data") in my home
> directory to export a database file. With the default executable name, the
> program worked as expected. After renaming the executable by changing all
> uppercase letters to lowercase and restarting the program from the project
> directory, a new directory was created and there was an empty database
> file. Great!
>
> Is there an error in Gambas or is the error on my side?
>
> With kind regards
>
> Honsek
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180904/e82af824/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a1.png
Type: image/png
Size: 10608 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180904/e82af824/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a2.png
Type: image/png
Size: 10268 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180904/e82af824/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a1.png
Type: image/png
Size: 10608 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180904/e82af824/attachment-0005.png>
More information about the User
mailing list