[Gambas-user] Application_Read

Demosthenes Koptsis demosthenesk at ...626...
Mon Jul 18 10:44:26 CEST 2011


On Mon, 2011-07-18 at 01:45 +0200, Benoît Minisini wrote:
> > ok i change some things
> > 
> > the implementation is this
> > 
> > ---------------------
> > Public Sub _new()
> > 
> >   Print "My pid is: " & Application.Handle
> > 
> > End
> > 
> > Static Public Sub Application_Read()
> > 
> >   Print "ok"
> > 
> > End
> > ---------------------
> > 
> > 1) Problem #1, if i do
> > echo 'test' > /proc/32264/fd/0
> > 
> > the program repeat the call of Application_Read() again and again.
> > Am i doing something wrong?
> 
> No: Application_Read is raised when there is something to read on the standard 
> input. If you don't read it, it will be called again and again.
> 
> > 
> > 2) Problem #2, How can i get the stdin data to a TextArea since dynamic
> > symbols are not allowed to Application_Read ?
> > 
> 
> By using a public method in your form (named for example 'SetTextArea').
> 
> Regards,
> 

1) ok, it is called again and again and prints to stdout "ok".

how i put the "test" word of Application_Read method in a variable, and
stop the continuous calling? In other words how do i read the value?

2) if i use PUBLIC SUB SetTextArea it is also a Dynamic Symbol and it
complains.

Thanks, it may be easy but here i am stucked :(




-- 
Regards,
Demosthenes Koptsis.





More information about the User mailing list