From: Gurveer on
Hello all

I recently ran into a problem where I had to update the choose field
in an inputform. I'm using the ^IfMain engine on my HP 50g. Say I have
four values namely, "a", "b", "c" and "d', any two of which I need to
know.

I'm using four fields, two choose and two corresponding text fields.
At the beginning of inputform, first field contains all the values and
displays "a" initially whereas the second field contains the last
three values viz., "b", "c" & "d" and displays "b" as the default
value.

Is it possible to update the second field to contain just "c" & "d" if
the value in the first field is changed to say "b"?

I used message handler 5 (IfMsgSetFieldValue) to update the value of
another field based on the change in the current field. This solves a
part of the problem by updating the display to a different field value
as I need the initial choose field data to be overwritten by the
updated one.

Although I understand that some code can be written to check that the
fields are unique after the inputform has been terminated by the user,
but I was just wondering if updating the choose field data was a
possibility.

Thanks for your time!

Regards,

Gurveer
From: Andreas Möller on
Hello,

> Is it possible to update the second field to contain just "c" & "d"
if
> the value in the first field is changed to say "b"?
Yes, this is possible. Just extend your message handling.
Almost all messages are documented in informbox.h which comes with
debug4x.

You can have a message handler for the whole from and a message
handler for each field and you can handle as much message in each as
you like and mix them. Naturally your form/field will get slower the
more messages you handle.

HTH,
Andreas
http://www.software49g.gmxhome.de/
From: Gurveer on
On Feb 24, 4:00 am, Andreas Möller <andreas_moellerNOS...(a)gmx.de>
wrote:
> Hello,
>
>  > Is it possible to update the second field to contain just "c" & "d"
> if
>  > the value in the first field is changed to say "b"?
> Yes, this is possible. Just extend your message handling.
> Almost all messages are documented in informbox.h which comes with
> debug4x.
>
> You can have a message handler for the whole from and a message
> handler for each field and you can handle as much message in each as
> you like and mix them. Naturally your form/field will get slower the
> more messages you handle.
>
> HTH,
> Andreashttp://www.software49g.gmxhome.de/

Yeah, you are right, did it by manipulating the virtual stack.

But something which I was wondering upon reading the informbox.h from
Debug4x that it suggests to see RPLman for more information on that
^IfMain flash pointer. I pulled it out from:

http://www.hpcalc.org/details.php?id=1745

Upon searching the document, didn't really find anything about
^IfMain.


Moreover, informbox.h also talks about entries like
IfSetFieldInternalValue, IfRefreshField, etc. which are needed to be
called by Flash Pointers. I compile my programs using Emacs on HP 50g.
I used the basic symbology as FPTR2 ^IfSetFieldInternalValue, but it
wouldn't accept it. Surprising!

Thanks anyways for your help.

Regards,

Gurveer
From: Andreas Möller on
Hello,

* Main entry point, see RPLMan for more informations
I understand, that this is meant for the POL at which IfMain resides.

> Moreover, informbox.h also talks about entries like
> IfSetFieldInternalValue, IfRefreshField, etc. which are needed to be
> called by Flash Pointers. I compile my programs using Emacs on HP 50g.
> I used the basic symbology as FPTR2 ^IfSetFieldInternalValue, but it
> wouldn't accept it. Surprising!
Like I said informbox.h contains some minor errors and some of the
FLASHPTRs described there did not get exported. In this case you have
to reprogram them yourself or find the correct PTR and pull them out
of the ROM.

If you want to study step-by-step how IfMain works you have to do it
with debug4x as with it you can single step through it (with some
minor code modifcations to a given halt point).

Regards,
Andreas
http://www.software49g.gmxhome.de/

From: John H Meyers on
On 2/24/2010 11:21 PM, Gurveer wrote:

> Something which I was wondering upon reading the informbox.h from
> Debug4x that it suggests to see RPLman for more information on that
> ^IfMain flash pointer. I pulled it out from:
> http://www.hpcalc.org/details.php?id=1745

The original source of the above is:
http://www.hpcalc.org/details.php?id=1743

Each of the above links says "RPL Programming Guide from Goodies Disk 4":

http://www.hpcalc.org/details.php?id=235 (Goodies Disk 4, compiled by Joe Horn)
http://www.hpcalc.org/search.php?query=rplman

"RPLman" is actually a plain text document, by HP (Wickes?), published in 1991
(later converted verbatim to a PDF file -- why bother?),
at which time the HP48SX was the latest model,
and there were not only no such things as "flash pointers,"
but not even such a thing as an "input form"!

[r->] [OFF]