home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / hp48 / 5793 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.9 KB

  1. Path: sparky!uunet!comp.vuw.ac.nz!waikato.ac.nz!fee
  2. From: fee@waikato.ac.nz
  3. Newsgroups: comp.sys.hp48
  4. Subject: Re: Emulating a keypress in sys_RPL???
  5. Message-ID: <1992Nov18.151124.12278@waikato.ac.nz>
  6. Date: 18 Nov 92 15:11:24 +1300
  7. References: <1992Nov16.090229.12183@waikato.ac.nz> <721942676detlef.detlef@dmhh.hanse.de>
  8. Distribution: world
  9. Organization: University of Waikato, Hamilton, New Zealand
  10. Lines: 71
  11.  
  12. In article <721942676detlef.detlef@dmhh.hanse.de>, detlef@dmhh.hanse.de (Detlef Mueller) writes:
  13. > In article <1992Nov16.090229.12183@waikato.ac.nz> fee@waikato.ac.nz writes:
  14. >>How do I emulate a key-press in sys_RPL?
  15. >>
  16. >>That is, if I have a keycode in level 2 and a key plane in level 1,
  17. > As BINTs ?!
  18.  
  19. Yes as BINTs, as far as I know - I've checked these on the stack with the
  20. TYPE command - both are type 20.
  21.  
  22. > I didn't have any trouble when running the following program with menu 13.01
  23. > being active; pressing the [A] key returns PICT into the stack (I also
  24. > checked it with Key>StdKeyOb - same result):
  25. > %%HP: T(3);
  26. > "::
  27. >  CK0NOLASTWD
  28. >  BlankDA2
  29. >  $ "Perform a keystroce\031"
  30. >  DISPROW5
  31. >  WaitForKey ( \-> #kc #pl )
  32. >  PTR 3F9FD  ( \-> keyOb )
  33. >  DoKeyOb
  34. > ;"
  35. > Hope that helps,
  36. >     8-Detlef
  37.  
  38.  
  39. Mmmh. Nope. That doesn't work - if anything it's worse, as the 48 hangs
  40. on the 3F9FD pointer, so I can't even get the key object on the stack.
  41. This happens even if I put in the BINTs as commands ie: #1 #1 PTR 3F9FD
  42. still hangs the machine. 
  43.  
  44. I'm SURE I have two BINTs on the stack when I try to call the key object.
  45. However, the problem may arise earlier. In fact prior to calling the
  46. Key>StdKeyOb, I muck about with the current menu, using GetMenu% to get 
  47. the current menu number, then I change the number on the stack and use 
  48. InitMenu% followed by DispMenu to change to and display a new menu.
  49.  
  50. THEN I have the BINTs left on the stack and try to emulate the particular 
  51. keypress. Is it just that the current menu key objects aren't defined when 
  52. I try to call them? Remember, the routine (using Key>StdKeyOb rather than 
  53. your pointer) works for RAM menu objects but not for built-in menus.
  54.  
  55. I should also mention that if I stop the routine at the Key>StdKeyOb command
  56. I am left with the secondary on the stack and when I press EVAL, the key
  57. object is evaluated for both RAM and Built-in objects. If I get tricky and
  58. put the sys_RPL routine in a programme with (user) EVAL called afterwards, 
  59.  
  60.     ie: << sysroutine EVAL >>
  61.  
  62. I am back to the start in that RAM objects work, while built-in objects hang.
  63.  
  64. Any further thoughts? I appreciate your help very much!
  65.  
  66. Regards,
  67. Conan.
  68.  
  69. -----------------------------------------------------------------
  70. Conan J. Fee                _      fee@waikato.ac.nz
  71. Centre for Technology              (_)o    
  72. University of Waikato, Hamilton    /\  \   Phone: +(64)(7)8384206
  73. Private Bag 3105, New Zealand              Fax:   +(64)(7)8384218
  74. -----------------------------------------------------------------
  75.  
  76.