PDA

View Full Version : WARNING: Initializing AEEPromptInfo


Morgan
03-31-2002, 04:32 PM
Goal: write a simple softkey menu for a multiselection prompt.

Being new to BREW, I turned to the example programs, and found what I was looking for in "idialogusage.c". The solution, use the ISHELL_Prompt" method. This was going to be easy, so, using a time-honored programming technique, I "borrowed" some code, part of which included the following line:

uint16 wButtonIDs[] = {IDS_YES, IDS_NO, IDS_MAYBE};

which was used to initialize the "AEEPromptInfo.pBtnIDs" field.

Unfortunately, this is wrong. It leads to a condition in which the prompt's title "bleeds" into the set of selections. I figured I had done something wrong, but wasn't sure quite what. In my best debugging style, I tried a bunch of random things, but none of them made a difference. At that point, I decided to fire up the BREW supplied example. Surprise, surprise, it had the same problem. Sigh.

Next up, the BREW archives. Fortunately, the answer was in a post by Minh (thank you, thank you, thank you) in the September 2001 archives, entitled "Multiple [incorrect] buttons in AEEPrompts" with the the answer being that the button array needs to end with a 0, like so

uint16 wButtonIDs[] = {IDS_YES, IDS_NO, 0};


I apologize for rambling on, but I wanted someone else to feel my pain.

Pete