• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[vJASS] Dialog message doesn't display

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

For the life of me I have no idea what's going on here.

Basically I have a dialog and it it has a title (the dialog message, the text above all the buttons).

But when I click a certain button and re-display the dialog, the message no longer appears. All the buttons still work properly, but the title of the dialog is just gone. I checked to see if somehow the string got nulled, but it didn't. The string still displays.

Here is the relevant code. The first is the code behind the dialog, and the second is the only place where I set the dialog's titles.

If I hit the "QUIT_BTTN", the title doesn't get removed. But if I hit the "REVIVE_BTTN," then all future dialogs won't have the title at all.

Why should the title be getting nulled, when I never ever call DialogSetMessage or reference that dialog again in such a way?
 
Last edited:
Level 15
Joined
Aug 7, 2013
Messages
1,338
Good to know I'm not the only one.

But it's still not relieving that we don't know what's wrong with my code or if its some bug.
 
It is a bug. Happened to someone else this week. And to some other people in the past. It is something about the dialog message disappearing after using DialogDisplay() (along with some other weird mumbo jumbo), so you have to set it again after the display. You might want to write your own wrapper to take care of that (just make a struct that stores the message, and write a custom display method), like in this:
http://www.hiveworkshop.com/forums/submissions-414/snippet-dialog-wrapper-240003/
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
Well the funny thing is before I started re-making the dialogue (adding new buttons), I never had this issue. So it must be something with clearing the dialog perhaps?
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
DialogClear does remove the message as well. Else I would watch out for border events like displaying the dialog right again when a click event triggers.

Yes, but after I called DialogClear() I made sure to reset the dialog's message in the same function call. So that doesn't explain it...
 
Status
Not open for further replies.
Top