[Gambas-user] Program not starting

Tony Morehen tmorehen at ajm-software.com
Sat Dec 12 20:56:59 CET 2020


Plz see below.

On 2020-12-12 2:17 p.m., Bruce Steers wrote:
>
>
> On Sat, 12 Dec 2020 at 18:52, Tony Morehen <tmorehen at ajm-software.com 
> <mailto:tmorehen at ajm-software.com>> wrote:
>
>     First, the current behaviour is what I expected. If I want a
>     program to
>     start hidden, I use a main.module, form.load approach.
>
>     Perhaps all this needs is a debug message:  "Warning: The Visible
>     property of the startup form of this project is set to False. This
>     could
>     result in undefined behavior."
>
>
> But then you'd have warning messages even if you wanted it hidden.
> Maybe this post will be all that's needed?

This is why I posted in the first place.  The warning should only apply 
to startup forms. A hidden startup form can crash without an error 
message, hence the need for a warning. To get a hidden startup, in a 
startup module Main.module:

Sub Main()

     fMain.Load()

End

This works in all circumstances and has known behavior: fMain's _new(), 
Form_Load() routines run, Form_Show() does not. etc.  We don't know what 
happens with hidden startup form.  Mine crashed. Will other, perhaps 
simpler, forms?

>
> I assume (as you said you discovered the problem when rebuilding the 
> form) that this
> is not the sort of error you will make when building a form from new now?
> it's a problem with a way it used to work compared to how it is now. 
> So it will only effect a few with existing apps with the same "mistake".
You could set the startup form's Visible  property false by accident 
anytime.  I'm pretty sure that's what happened to my project.  I changed 
the forms property when I thought I was editing a control on the form.
>
> They may search the mailing list for a solution for "Program wont start" ?
>
> :)
> BruceS
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201212/e77c11d3/attachment.htm>


More information about the User mailing list