Get rid of 'BLitzmax Application'

BlitzMax Forums/BlitzMax Module Tweaks/Get rid of 'BLitzmax Application'

GW(Posted 2005) [#1]
How the hell can i get rid of this title for messagebox' that pops up from an exception?
If i use notify(), that messagebox will use what was specified by the apptitle statement, but messageboxes from a throw() command are stuck with "Blitzmax Application" in the title.
I've replaced every instance of that text in the modules and rebuilt them, but it still wont go away.

Any ideas?


Koriolis(Posted 2005) [#2]
What you see is the default exception handler of BlitzMax applications.
Just don't let exception slip through until the very bottom of the app. What I mean is wrap all the code of your main app (or at least what can throw) with a try catch, and handle the message box yourself (get the caught exception text and use that as the message box's text).


kfprimm(Posted 2005) [#3]
AppTitle$="Whatever your title is"



kfprimm(Posted 2005) [#4]
[edit]double post[/edit]


Koriolis(Posted 2005) [#5]
Or that :)

But relying on the default exception handler is not a good idea anyway. Either your code is faulty in the first place (in which case you should fix it and the message displayed is the least of your worries), either the exception is expected to possibly be raised (in the normal course of the program run), in which case you should handle it yourself.


Perturbatio(Posted 2005) [#6]
AppTitle doesn't get rid of it. He's talking about the title on the dialogue, not the main window.


tonyg(Posted 2005) [#7]
Do you mean like this...
AppTitle$="Test"
Try
	Repeat
		a:+1
		Print a
		If a>20 Throw "chunks"
	Forever
Catch a$
	Notify "caught exception "+a$
EndTry

as this has a title of 'Test'.
How is throw() producing the messagebox in your case?


Perturbatio(Posted 2005) [#8]
hmmmm... I swear this wasn't working before.


GW(Posted 2005) [#9]
Thanks Koriolis, That should be a functional workaround.


Dreamora(Posted 2005) [#10]
Wasn't there a problem that changing app title means debugger does not work anymore?


Perturbatio(Posted 2005) [#11]
Wasn't there a problem that changing app title means debugger does not work anymore?


I've never heard that one before.


Dreamora(Posted 2005) [#12]
hmm ok.
thought I read this in a thread, that the debugger hooks to the predefined app title for debugging (its a stand alone) and if this one is changed, the debugger can't find it anymore ...
But might have changed.


GW(Posted 2005) [#13]
In 1.09 i think the C function to create the window with its hardcoded title was accessable. you could change that title and maybe it messed up the debugger (I never did that though)
Now the "Blitzmax Application" title is locked away somewhere and the window is created with whatever you set as the apptitle. but there is no way to alter the default title for messageboxes that appear from a throw command.
The method Koriolis suggested seems to work well. But im a bit wary of not having that control in the first place.
It would be rather emberrasing for your game to start throwing around "Blitzmax" this and "Blitzmax" that when you least expect it.


Perturbatio(Posted 2005) [#14]
It would be rather emberrasing for your game to start throwing around "Blitzmax" this and "Blitzmax" that when you least expect it.

Surely no less embarrassing than your game throwing errors around?


tonyg(Posted 2005) [#15]

but there is no way to alter the default title for messageboxes that appear from a throw command.


What messageboxes?


Hotcakes(Posted 2005) [#16]
You know, boxes with messages in them.


tonyg(Posted 2005) [#17]
Very clever.
I don't get messages produced from just using the 'Throw' command. So, for the pedantic, what
'messageboxes that appear from a throw command'.


Hotcakes(Posted 2005) [#18]
That's better. =]


Koriolis(Posted 2005) [#19]
tonyg, compile that.
Throw "bla"
What do you see?

Hotcakes, if you keep changing your nick so quick you'll soon become schyzophrenic, make plan to dominate the world and worst of all try to program in DarkBasic.
Don't come and say I didn't warn you.


xlsior(Posted 2005) [#20]
I don't get messages produced from just using the 'Throw' command. So, for the pedantic, what
'messageboxes that appear from a throw command'.


Looks like they pop up in debug mode, not release mode?


tonyg(Posted 2005) [#21]
Ok, so what Koriolis (err..... you) said.


drnmr(Posted 2005) [#22]
this doesn't work for me. is apptitle$supposed to turn yellow like a command?


Perturbatio(Posted 2005) [#23]
this doesn't work for me. is apptitle$supposed to turn yellow like a command?


AppTitle is indeed supposed to be syntax highlighted.


Hotcakes(Posted 2005) [#24]
It is? But it's just a Global variable!

Don't come and say I didn't warn you.

Releasing BVM2 might bring me back to my senses ;]

Looks like they pop up in debug mode, not release mode?

Correct. Same as the Assert command I think.


Koriolis(Posted 2005) [#25]
Releasing BVM2 might bring me back to my senses ;]
You know the beast, it's not tamed yet, uh uh ^^


Perturbatio(Posted 2005) [#26]
It is? But it's just a Global variable!

Maybe so, but if it's in the index list then it's highlighted.


drnmr(Posted 2006) [#27]
which release do i need to use apptitle$?


kfprimm(Posted 2006) [#28]
if by release you mean blitzmax verision, they all have apptitle$.


Perturbatio(Posted 2006) [#29]
The apptile$ global needs to be set before your graphics call.