FLTK logo

Re: [fltk.general] Focus

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Focus Millan Mar 28, 2007  
 
28.03.2007 "MacArthur, Ian \(SELEX\) \(UK\)" <ian.macarthur-xmadGBvRevyakBO8gow8eQ@public.gmane.org>
wrote:

> Pardon?
> I thought I was being constructive and helpful - perhaps you have
> mis-read my intent?

Yes, slightly. In that case, please take my apology for that, and let us then
finish here this unnecessary, and time consuming conversation :)

> That may be so - but it was incomplete as of itself, and could not
> therefore be compiled and tested by anyone else, making it unnecessarily
> difficult for us to offer you any help.
> Please try and help us to help you.

Yes, but Ian, I've already sent converted simple Michael's code to this
mailing list.  

> Yes, the omissions you have made are probably trivial to fix, but it
> simply places an obstacle in the way of those who would offer help,
> making it less likely that someone will jump in and sort your problems
> for you.

I perfectly understand that I can't expect people to fill in the gaps in my
program, but those omissions are not so trivial to fix, that is the whole
point, because it would require a lot explaining of some external classes
which do not have relations to this issue, involve more complication and so
on, and so on... anyway, once more, there was already converted (to FLTK 2.x)
Michael's code, for which I've reported to behave as same as my program.

> Anyway. I couldn't build your example, but the Michael Sephton example
> does build, so I have tweaked that do what I think you want - I have
> used a number of different techniques to cover the issues with
> hiding/exposing the browser window when the main window is max/minimised
> - either by sub classing the handle method of the main window, or via
> timeouts. 
> One or other of these techniques should work for you.
> This example also works around the focus passing issue in a pragmatic
> (albeit not very pretty) way.
> It works correctly.
> Hope this is of some help to you:

Thanks a lot, for the time you've spend on this!

I think that call to "fltk::add_timeout(0.05, cb_grab_focus, wordInput);" is
crucial, without it this doesn't work, that is I don't have to use
overloading of (hadle()) method.

For now I'll stick to the solution which uses resizing subwindow to mimic
showing and hiding and possibly tweak it a little bit more, I'm beginner with
FLTK generally so even with documentation about "fltk::add_timeout(float time,
TimeoutHandler cb, void *arg)" which frankly isn't much I didn't know how this
function works, that is, it is called only once, so overloading of "handle()"
and/or maintaining another timeout function will probably complicate the
program (for me) even more, since current solution already works.
I just hope that resizing window isn't (much) slower than hiding/showing :) 

BTW I've noticed something strange which has not relation to current issue.
In all the cited programs so far (this is also reproducible in this program)
if one types something in input box, and then holds "backspace" key to delete
that strng and holds it a little longer after the string is deleted, and then
releases "backspace" key and presses "escape" key, then the first character of
previous (deleted) string will appear, and program wont quit on subsequent
"escape" key presses. Is this a bug in FLTK 2.x?
 
> With any luck, that might give you some clues as to how to get what you
> want from your program. Good luck with your code.

Thank you.

> And your attitude.
> Way to go.

Unnecessary, but ok, if you say so :)

Excuse my english if there were some misspelled words.
Best regards,
Millan.


Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.