home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!comp.vuw.ac.nz!waikato.ac.nz!fee
- From: fee@waikato.ac.nz
- Newsgroups: comp.sys.hp48
- Subject: Re: Emulating a keypress in sys_RPL???
- Message-ID: <1992Nov18.151124.12278@waikato.ac.nz>
- Date: 18 Nov 92 15:11:24 +1300
- References: <1992Nov16.090229.12183@waikato.ac.nz> <721942676detlef.detlef@dmhh.hanse.de>
- Distribution: world
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 71
-
- In article <721942676detlef.detlef@dmhh.hanse.de>, detlef@dmhh.hanse.de (Detlef Mueller) writes:
- > In article <1992Nov16.090229.12183@waikato.ac.nz> fee@waikato.ac.nz writes:
- >
- >>How do I emulate a key-press in sys_RPL?
- >>
- >>That is, if I have a keycode in level 2 and a key plane in level 1,
- >
- > As BINTs ?!
- >
-
- Yes as BINTs, as far as I know - I've checked these on the stack with the
- TYPE command - both are type 20.
-
- >
- > I didn't have any trouble when running the following program with menu 13.01
- > being active; pressing the [A] key returns PICT into the stack (I also
- > checked it with Key>StdKeyOb - same result):
- >
- >
- > %%HP: T(3);
- > "::
- > CK0NOLASTWD
- > BlankDA2
- > $ "Perform a keystroce\031"
- > DISPROW5
- > WaitForKey ( \-> #kc #pl )
- > PTR 3F9FD ( \-> keyOb )
- > DoKeyOb
- > ;"
- >
- > Hope that helps,
- > 8-Detlef
-
-
- Mmmh. Nope. That doesn't work - if anything it's worse, as the 48 hangs
- on the 3F9FD pointer, so I can't even get the key object on the stack.
- This happens even if I put in the BINTs as commands ie: #1 #1 PTR 3F9FD
- still hangs the machine.
-
- I'm SURE I have two BINTs on the stack when I try to call the key object.
- However, the problem may arise earlier. In fact prior to calling the
- Key>StdKeyOb, I muck about with the current menu, using GetMenu% to get
- the current menu number, then I change the number on the stack and use
- InitMenu% followed by DispMenu to change to and display a new menu.
-
- THEN I have the BINTs left on the stack and try to emulate the particular
- keypress. Is it just that the current menu key objects aren't defined when
- I try to call them? Remember, the routine (using Key>StdKeyOb rather than
- your pointer) works for RAM menu objects but not for built-in menus.
-
- I should also mention that if I stop the routine at the Key>StdKeyOb command
- I am left with the secondary on the stack and when I press EVAL, the key
- object is evaluated for both RAM and Built-in objects. If I get tricky and
- put the sys_RPL routine in a programme with (user) EVAL called afterwards,
-
- ie: << sysroutine EVAL >>
-
- I am back to the start in that RAM objects work, while built-in objects hang.
-
- Any further thoughts? I appreciate your help very much!
-
- Regards,
- Conan.
-
- -----------------------------------------------------------------
- Conan J. Fee _ fee@waikato.ac.nz
- Centre for Technology (_)o
- University of Waikato, Hamilton /\ \ Phone: +(64)(7)8384206
- Private Bag 3105, New Zealand Fax: +(64)(7)8384218
- -----------------------------------------------------------------
-
-