Get rid of 'BLitzmax Application'
BlitzMax Forums/BlitzMax Module Tweaks/Get rid of 'BLitzmax Application'
| ||
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? |
| ||
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). |
| ||
AppTitle$="Whatever your title is" |
| ||
[edit]double post[/edit] |
| ||
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. |
| ||
AppTitle doesn't get rid of it. He's talking about the title on the dialogue, not the main window. |
| ||
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? |
| ||
hmmmm... I swear this wasn't working before. |
| ||
Thanks Koriolis, That should be a functional workaround. |
| ||
Wasn't there a problem that changing app title means debugger does not work anymore? |
| ||
Wasn't there a problem that changing app title means debugger does not work anymore? I've never heard that one before. |
| ||
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. |
| ||
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. |
| ||
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? |
| ||
but there is no way to alter the default title for messageboxes that appear from a throw command. What messageboxes? |
| ||
You know, boxes with messages in them. |
| ||
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'. |
| ||
That's better. =] |
| ||
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. |
| ||
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? |
| ||
Ok, so what Koriolis (err..... you) said. |
| ||
this doesn't work for me. is apptitle$supposed to turn yellow like a command? |
| ||
this doesn't work for me. is apptitle$supposed to turn yellow like a command? AppTitle is indeed supposed to be syntax highlighted. |
| ||
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. |
| ||
Releasing BVM2 might bring me back to my senses ;] You know the beast, it's not tamed yet, uh uh ^^ |
| ||
It is? But it's just a Global variable! Maybe so, but if it's in the index list then it's highlighted. |
| ||
which release do i need to use apptitle$? |
| ||
if by release you mean blitzmax verision, they all have apptitle$. |
| ||
The apptile$ global needs to be set before your graphics call. |