home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi.graphics
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!ra!hobbes.nrl.navy.mil!neri
- From: neri@hobbes.nrl.navy.mil (jesse neri)
- Subject: Re: Fortran, mixed GL and Keyboard input
- Message-ID: <C0EILu.DnD@ra.nrl.navy.mil>
- Sender: usenet@ra.nrl.navy.mil
- Organization: Pulsed Power Physics Branch; Plasma Physics Division; NRL; Washington, DC;
- References: <C0E97A.9Cu@ra.nrl.navy.mil>
- Distribution: comp.sys.sgi.graphics
- Date: Tue, 5 Jan 1993 22:03:29 GMT
- Lines: 46
-
- In article <C0E97A.9Cu@ra.nrl.navy.mil> neri@hobbes.nrl.navy.mil (jesse neri) writes:
- >I am using a Indigo R4000, IRIX 4.0.5F and IDO. I am programming
- >in Fortan (what can I say, I'm a relic) and want to to keyboard and mouse
- >input. I open a GL window, draw a configuration in it, then call
- >qreset, the qdevic(LEFTMO) to queue up the left mouse button. I then do
- >qreads until the left mouse button is pushed, then grab the mouse positions
- >using getval(MOUSEX) and getval(MOUSEY). All this works as advertised
- >in the GL programming guide. I now want to get keyboard information about
- >the data point that has been selected (i.e. user types a letter, then a
- >numerical value). That's when the wheels come off. I try the standard
- >Fortran input of
- >
- > read (5,101) x
- > 101 format(1A1)
- >
- >to read the letter value (worked before the mouse stuff) and I get
- >
- >fmt: I/O error
- >apparent state: unit 5 named
- >last format (1a1)
- >lately reading (null) formatted external IO
- >
- >The error occurs instantly, before any thing is typed, before
- >the mouse is moved back into the progrmas window.
- >HOW DO I CONVINCE THE PROGRAM TO GO AND READ FROM THE KEYBOARD?
- >The error occurs despite all attempts to unque the mouse, reset the queue,
- >etc. I would rather not have to go to mixed mode programming and use X and
- >pop-up windows to drive the user interaction, but if that is the only answer,
- >so be it.
- >
-
- And the answer is to call foregr before the winope. The winning
- suggestion cam courtesy of Kian-Tat Lim (ktl@wag.caltech.edu). I also make
- sure that the queue is cleared before going on, but that may superfluous.
-
- Thanks again to all. The quality of the SGI support on USENET, from
- SGI personnel and others, was one of the factors in my choosing SGI systems,
- and you all have come through for me again.
-
-
-
- --
- Jess Neri neri@hobbes.nrl.navy.mil (202) 404-7567 # # ## #
- Pulsed Power Physics Branch, Plasma Physics Division ## # # # #
- Naval Research Laboratory, Washington DC 20375 # ## ## #
- ######### Nuts Running Loose ################# # # # # ###
-