[CONNECT C++] Dialog Items Access String

An MDL dialog item usually has an access string that connects it to a published global variable.  Here's an example taken from the delivered DialogBoxDemo...

DItem_TextRsc TEXTID_DialogDemoColor =
    {
    NOCMD, LCMD, SYNONYMID_DialogDemoColor, NOHELP, LHELPCMD,
    NOHOOK, NOARG,
    3, "%-ld", "%ld", "0", "253", NOMASK, NOCONCAT,
    TXT_Color,
    "dlogdemo_colorNumber"
    };

Where dlogdemo_colorNumber is the item's access string.  The item is placed in a dialog box resource like this...

{{X6, Y45, W2, 0},  Text,  TEXTID_DialogDemoColor, ON, 0, "", ""},

In some circumstances, you may want to connect the dialog item to a different published variable.  Rather than define a new item resource, one can override the access string like this...

{{X6, Y45, W2, 0},  Text, TEXTID_DialogDemoColor, ON, 0, "", "access=\"another_global_published_variable\""},

However, I'm having a problem overriding the access string for a ComboBox item...

{ { 13 * XC, GENY(2), 21 * XC, 0}, ComboBox, COMBOBOXID_Purpose, ON, ItemArgInterrogator, TXT_Purpose, "access=\"g_interrogatorVars.purpose\""},

In this case, the ComboBox continues to modify the access string defined in the item resource.  The override has no effect.

Have I done something wrong, or is it impossible to override the access string of a ComboBox?

Parents Reply
  • Unknown said:
    Can you provide a very simplified test case to review? 

    I added a couple of overridden ComboBoxes to the delivered CST Example.  It occurred to me that my problem might have been caused by using a Unicode access string, so I overrode the example ComboBox twice, once with a multibyte string and once with a Unicode string...

    Unfortunately (for me) both overridden ComboBoxes work fine.  Now I'm stumped as to why my ComboBox in my app. doesn't work.

    But thanks for your suggestion.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: Jon Summers 

Children
No Data