[Gambas-devel] Question about GB.CanRaise()

tobi tobias at ...692...
Sat May 26 14:41:09 CEST 2012


On Fri, 25 May 2012, tobi wrote:
> On Fri, 25 May 2012, Benoît Minisini wrote:
> > Le 25/05/2012 22:11, tobi a écrit :
> > >
> > > I found out that using what you mentioned above (that's what I first did, actually), I get an
> > > n_event of 1 which is right. For some reason - those, that I wanted to debug out but fear to
> > > die from starvation before again compile gbx, because compiling LLVM takes aeons in my
> > > machine - GB.CanRaise() still returns false. (I think I need it because I want to determine if
> > > the Window would raise an event and if not, the parent Screen object will raise it)
> > > Can you blindly think of any reasons for GB.CanRaise() returning false?
> > >
> > > Regards,
> > > Tobi
> > >
> > 
> > If GB.CanRaise() returns FALSE, that means that raising the event will 
> > have no effect.
> > 
> > Commit your code so that I can see how you use it!
> > 
> > -- 
> > Benoît Minisini
> > 
> > ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and 
> > threat landscape has changed and how IT managers can respond. Discussions 
> > will include endpoint security, mobile security and the latest in malware 
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > Gambas-devel mailing list
> > Gambas-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-devel
> > 
> 
> Here you are
> 

Hum, I don't want to bother you again but I find my answer even less helpful now than yesterday. Let
me explain the code a bit as I intend to tidy it up afterwards anyway.

All input related stuff is worried about by the INPUT module input.c. It gets initialised by the
main hook and then enters cbreak mode which I personally find the most useful for ncurses programs
(signal generation from, e.g., ctrl-c and character-by-character input). Therefore, stdin becomes
watched. A callback is associated to this watching, which is INPUT_callback(). This simply calls
WINDOW_raise_read() (when entering NoDelay mode things get trickier internally but the event stuff
will remain the same because, if even, only the watched fd changes). Then we are already at the
problem with GB.CanRaise().

Don't stress yourself, I continue gb.ncurses on another frontier happily in the meantime.

Regards,
Tobi





More information about the Devel mailing list