[Gambas-devel] Early auto-instance

tobi tobias at ...692...
Sun May 13 00:07:44 CEST 2012


On Sat, 12 May 2012, Benoît Minisini wrote:
> Le 12/05/2012 23:46, tobi a écrit :
> >
> > I would go like this:
> >
> > - Window not auto-creatable, parent Screen is mandatory for Window constructor
> > - Screen auto-creatable
> >
> > It means that the user will have to create a Window to paint on first in every gb.ncurses program.
> > If I would make the parent parameter optional, I would have to use a default screen and then it
> > would be the same issue as above, I would need the auto-instance of Screen for this...
> >
> 
> You don't need an existing Gambas Screen object to refresh the screen.
> 
> You must make a split between the Screen class (which is an interface) 
> and the real routines doing the job.
> 
> I mean: if Window.Print() needs a screen refreshing, then the 
> Window.Print() implementation method will call an internal helper 
> function that refreshes the screen.
> 
> The Screen.Refresh() method will call the same internal function. But a 
> Window object should not depend on the existence of the Screen Gambas 
> object.
> 
> Am I clear?
> 
> -- 
> 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
> 

All clear, that's all clear, but: routines in the Window object want to refresh the screen. Screen
refresh may be buffered. Buffering is handled via the Screen class that represents the entire
screen. I need a valid Screen object to determine the buffering settings (in this example; I can
spot input stuff that will go through the Screen class, too, as said in another thread recently).

Regards,
Tobi





More information about the Devel mailing list