WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor version 6.2
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

DEFAULT Text Attributes For MenuItems Cause Assertion Error

 Keywords:  DEFAULT Text Attribute MenuItem  Menu Items Assertion Failed Error

Question:

I am getting a strange 'Assertion Failed' error message when I added some new menu items to my 2012B Dialog:
MyDialogFormat=`WWWDLGED,6.2`

MyDialogCaption=`Blank Menu Causes Assersion Failure`
MyDialogX=642
MyDialogY=061
MyDialogWidth=474
MyDialogHeight=279
MyDialogNumControls=013
MyDialogProcedure=`DEFAULT`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`001,255,094,018,PUSHBUTTON,"PushButton_1",DEFAULT,"OK",58,59,32,DEFAULT,"0|0|0","128|128|255"`
MyDialog002=`000,000,000,000,MENUBAR,"Menu"`
MyDialog003=`000,000,000,000,MENUITEM,"mbi1_MyDialog","Menu",DEFAULT,DEFAULT,0,DEFAULT`
MyDialog004=`000,000,000,000,MENUITEM,"mbi2_MyDialog","Menu","Reports",DEFAULT,0,DEFAULT`
MyDialog005=`000,000,000,000,MENUITEM,"mbi3_MyDialog","Menu","Config",DEFAULT,0,DEFAULT`
MyDialog006=`000,000,000,000,MENUITEM,"mbi4_MyDialog","Menu","Update",DEFAULT,0,DEFAULT`
MyDialog007=`000,000,000,000,MENUITEM,"mbi5_MyDialog","Menu","Logins",DEFAULT,0,DEFAULT`
MyDialog008=`000,000,000,000,MENUITEM,"cmi1_MyDialog",DEFAULT,"Add Text Here",DEFAULT,0,DEFAULT`
MyDialog009=`000,000,000,000,MENUITEM,"mbi6_MyDialog","mbi2_MyDialog","Realtime",DEFAULT,0,DEFAULT`
MyDialog010=`000,000,000,000,MENUITEM,"mbi7_MyDialog","mbi2_MyDialog",DEFAULT,DEFAULT,0,DEFAULT`
MyDialog011=`000,000,000,000,MENUITEM,"mbi10_MyDialog","mbi3_MyDialog","Users",DEFAULT,10,DEFAULT`
MyDialog012=`000,000,000,000,MENUITEM,"mbi9_MyDialog","mbi3_MyDialog","Settings",DEFAULT,20,DEFAULT`
MyDialog013=`000,000,000,000,MENUITEM,"mbi8_MyDialog","mbi3_MyDialog","Menu and Panel",DEFAULT,30,DEFAULT`


ButtonPushed=Dialog("MyDialog")
Exit

Answer:

It would appear that the following incorrectly formatted Menu Items are causing this:
MyDialog003=`000,000,000,000,MENUITEM,"mbi1_MyDialog","Menu",DEFAULT,DEFAULT,0,DEFAULT`
...
MyDialog010=`000,000,000,000,MENUITEM,"mbi7_MyDialog","mbi2_MyDialog",DEFAULT,DEFAULT,0,DEFAULT`
In short you currently cannot specify DEFAULT for the Menu Items Text Attribute.

Here are some revised control statements


MyDialog003=`000,000,000,000,MENUITEM,"mbi1_MyDialog","Menu","Add Text Here",DEFAULT,0,DEFAULT`
...
MyDialog010=`000,000,000,000,MENUITEM,"mbi7_MyDialog","mbi2_MyDialog","Add Text Here",DEFAULT,0,DEFAULT`
The developers have been notified of this behavior, which should be addressed in the next release.
Article ID:   W17714
Filename:   DEFAULT Text Attributes For MenuItems Cause Assertion Error.txt
File Created: 2012:08:15:10:38:16
Last Updated: 2012:08:15:10:38:16