Strange error in an input form
|
01-19-2020, 08:00 PM
Post: #1
|
|||
|
|||
Strange error in an input form
Hello all,
In a subroutine I get a strange error with regard to an input form. The subroutine in question asks for a name to be entered via the input form. When this is entered and OK is pressed, I get the error message "Bad Argument Type". When I then press OK again, I see a number of Externals and some strings that appear on the screen from the menu or the message handler. The message handler is responsible for the soft menu in this case. I have enclosed the code below. The local variable "LAM cfgl" is declared in the main program, in which this code can be executed. This variable contains a list. I hope someone can help me solve this problem. Sincerely, Karel. Code:
I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2. |
|||
01-20-2020, 01:48 PM
Post: #2
|
|||
|
|||
RE: Strange error in an input form
You wrote a message handler for message BINT15, also known as IfMsgOK, which (when handled) expects a TRUE or FALSE specifying whether the OK key press should be ignored. You gave it a menu back instead. Whoops. You're probably looking for IfMsgGetMenu, which is message BINT11.
The main piece of code looks fine otherwise, but the menu does not. It appears you copied bits out of ROMPTR2 ~IfMenuRow1 and ROMPTR2 ~IfMenuRow2 (while dropping an important 5GETLAM too, right after the TakeOver for your third menu key), which is the menu for the old input form engine (DoInputForm). You're starting the new input form engine though (FPTR2 ^IfMain); the two are incompatible. Try decompiling the ROM at 4:5A8DC, that's the piece of code that builds the new input form engine's menu, including calling the input form's message handler with messages BINT12 (IfMsgGet3KeysMenu) and BINT11 (IfMsgGetMenu). You'll find all the default menu keys somewhere in there, so you can cobble together a menu just like you did with the old engine's keys. I'm not quite sure why you're altering the menu though, because if you only use default key definitions, you could save some effort and leave it untouched. |
|||
01-20-2020, 10:30 PM
Post: #3
|
|||
|
|||
RE: Strange error in an input form
(01-20-2020 01:48 PM)3298 Wrote: You wrote a message handler for message BINT15, also known as IfMsgOK, which (when handled) expects a TRUE or FALSE specifying whether the OK key press should be ignored. You gave it a menu back instead. Whoops. You're probably looking for IfMsgGetMenu, which is message BINT11. Hi 3298, Apparently I am not using the correct documentation. I used James Donnelly's book as a reference: "An Introduction to HP 48 System RPL and Assembly Language Programming", March 1, 2009. If I cannot use this reference for the HP-50g, which reference should I use? Is there a similar manual especially for the HP-50g? I hope to hear from you. Sincerely, Karel. I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2. |
|||
01-20-2020, 10:47 PM
Post: #4
|
|||
|
|||
RE: Strange error in an input form
Start with this amazing document:
"Programming in System RPL" - for 49G and derived machines (49g+ and 50g) https://www.hpcalc.org/details/5142 There are also other SysRPL documents on hpcalc.org, you can use a search to find many of them, based on what you need. --Bob Prosperi |
|||
01-21-2020, 10:34 PM
Post: #5
|
|||
|
|||
RE: Strange error in an input form
(01-20-2020 10:47 PM)rprosperi Wrote: Start with this amazing document: Thank you! Sincerely, Karel. I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)