Re: trouble with txt.h



On 8 Sep 2006 Mr John FO Evans <mijas@xxxxxxxxxxxxxxxxx> wrote:
I am having no luck with txt.h from RISC_OSLIB and stubsg

The code is virtually identical to that used in another program

Does it work with either the 26bit or 32bit stubs? The StubsG library is
differnt again.

[Snip code]

This code fails to display anything when run through under Acorn/Castle
Debug. No txt window appears and the program hangs with "Input Focus Not
Found" at the first instance of the line
"txt_insertstring(...............)"

Are you saying it does run when not under DDT?

Query 1) Is the code valid?

Well looking at my !ComndCtrl app (from 1990) which uses the txt windows,
I've got all the same calls in roughly the same order.

Do I need the event handler?

To handle inoput, scrolling, mouse clicks and closing the window.

2) Would I need to exit from Acorn debug before a txt window is seen?

Its possible, DDT has a lot of problems, I've only every rarely used it
sucessfully. There is now an alternative multi-tasking desktop debugger
http://buyit.spellings.net/products.php?cat=4 which may work better.

3) Can I read from stdin in this way?

Definately not, thats for command line programs. Input from characters typed
in the txt window is delivered to you via the handler.

---druck

--
The ARM Club Free Software - http://www.armclub.org.uk/free/
The 32bit Conversions Page - http://www.quantumsoft.co.uk/druck/
.



Relevant Pages

  • Re: Focus
    ... > Requests that this Component gets the input focus. ... > Component's top-level ancestor become the focused Window. ... Notice that if you have a textbox in a window, ...
    (comp.lang.java.gui)
  • Re: ExifEdit et al released
    ... The themes provide new icons for the window tools and new background ... indication of input focus unless you're using RO 5.14 or RO 6.14 (both ...
    (comp.sys.acorn.apps)
  • Re: Focus
    ... > Requests that this Component gets the input focus. ... >Component's top-level ancestor become the focused Window. ... the window is the focused WINDOW. ...
    (comp.lang.java.gui)
  • Re: How to bring a dialog itself to top?
    ... How is the thread notifying the window that it needs to be activated? ... then I need the user to input something in the textbox. ... want to bring the dialog to top and put input focus to the textbox. ... previous top window's title bar is still blue. ...
    (microsoft.public.vc.mfc)
  • Re: RiscCAD Professional v10 at London RISC OS user group, Monday 17th October 2005
    ... >> You cannot configure grabbing the input focus. ... > Please may I vote for the option which requires a click in the window ... >> I will look at changing it to standard RISC OS behaviour. ... cursor, where the cursor replaces the mouse pointer. ...
    (comp.sys.acorn.misc)