[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Popmenus...




Dear MacPerl people,

hello. My name is Luca and I have a big favour to ask...
Although I have been programming in Perl for a while, I have had no
experience with MacPerl whatsoever (so far). Too bad, because I was asked
to port a Perl program I wrote to the Mac, and with a decent GUI. I have 
bought the "MacPerl; Power and Ease" book (btw, great job!), and I am now 
going through it, but unfortunately I have to finish this port rather 
quickly and it'll probably be much easier if some of you points me straight 
to the right direction.

There are two things I would like to know how to implement, a serious one 
(1) and a not-so-crucial one (2):

(1) I would like to build a window which includes several popup menus
    (each including the same list of items) and, next to each of them,
    a text edit box where the user can enter a numerical value that has
    to be associated to the item picked from the corresponding popup
    menu.
    
    For example, each popup menu might display:	chemical A
						chemical B
						chemical C
						chemical D
						...
						etc.

   If the user chooses "chemical C" in the first popup menu and enters 
   a value of "0.5" in the corresponding text edit box, and then chooses
   "chemical A" in the second popup menu and enters a value of "1.2" in 
   the corresponding text edit box, this window should return (after
   clicking OK, of course):
   
   @array = ("chemical C", 0.5, "chemical A", 1.2);
   
   In the MacPerl book, page 209, there is a footnote saying that popup
   menus must be defined in a resource file, but I am not sure what this
   means... help!
   
(2) How do I create a window which automatically disappears after 3 
    seconds, or after the user clicks anywhere in it (that is, a typical
    "About" window of a Mac program)?
    
Thank you very much in advance for the help, and my best regards,

Luca.

--------------------------------------------------------------------------------
 Luca Jovine
 Structural Studies Division, MRC Laboratory of Molecular Biology
 Hills Road, Cambridge CB2 2QH, ENGLAND.
 Voice: +44.1223.402443. FAX: +44.1223.213556. Telex: 81532.
 E-Mail: lj1@mrc-lmb.cam.ac.uk
--------------------------------------------------------------------------------

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch