[Gambas-user] who to detect if are running inside IDE

Jussi Lahtinen jussi.lahtinen at ...626...
Tue Jul 4 00:42:07 CEST 2017


I don't understand why you need stop menu to your project. Why can't you
just use the stop button from the IDE?


Jussi

On Mon, Jul 3, 2017 at 11:38 PM, adamnt42 at ...626... <adamnt42 at ...626...>
wrote:

> On Mon, 3 Jul 2017 20:40:46 +0200
> Tobias Boege <taboege at ...626...> wrote:
>
>
> > I'm convinced that no matter how you try to detect if you're run by the
> IDE
> > or not, someone can create an environment where your test gives the wrong
> > answer. I still stand by my statement from two years ago: you shouldn't
> care
> > where your program is run from in the first place. What problem are you
> > trying to solve by knowing that?
> >
> > Regards,
> > Tobi
>
>
> Since you asked :-)
>
> Laziness!
>
> Many times I have a menu item in a form that just "Stop"s the program i.e.
>
> Private Sub mnuDebug()
> Stop
> End
>
> then in the Form_Open()
>
> #If Exec
> mnuDebug.Visible = False
> #Endif
>
> So at development time, or when the customer has a problem, I almost
> always have a way to stop the program when it's running in the IDE.
>
> All this does is "tidy up" the program automatically when run outside the
> IDE. If a user wants to go to the extent of creating a non-x version of the
> program just to see that menu item - which will do nothing anyway since the
> Stop is ignored - then all I can say is "Good luck to them."
>
> There are probably trickier or even "more correct" ways to hide a menu
> item at runtime, but hey! Three lines and "As Far As I Care" - problem
> solved.
>
> b
>
> --
> B Bruen <adamnt42 at ...3379... (sort of)>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list