On Sun, 05 May 2013, Jesus wrote:
> Hi Tobi and all
> 
> 
> El 05/05/13 09:00, Tobias Boege escribi?:
> > On Sat, 04 May 2013, Jesus wrote:
> >> Recently a friend of mine reported an issue that I'm not sure how to
> >> explain correctly.
> >>
> >> He is making a terminal program that needs to print stuff on a real
> >> printer, so it needs the gb.qt4 component to get access to the Printer
> >> object. But also he needs to use gb.ncurses to do some neat presentation
> >> in a terminal in a kind of interactive mode. Problem arises when the
> >> *Window* class in gb.ncurses collides with the same class name in gb.qt4
> >> (needed to gain access to printer functions) It seems that window class
> >> in gb.qt4 surpasses the one in gb.ncurses.
> >>
> >> So, is it a known problem? Does anyone realized this "incompatibility"
> >> when using both components at the same time?
> >> Is there a way to use the printer without using gb.qt4?
> >>
> 
> >
> > I never thought of using a graphical component together with gb.ncurses. I
> > never intended that :-)
> 
> Yes. The point is, how it is supposed to do printing from within 
> gb.ncurses without using the Printer object (found only inside graphical 
> components)?
> 
> We then should need to do this through CUPS or something, doesn't it?
> 
> The fact is my friend is trying to print a kind of report based in his 
> own classes that uses Draw and Paint to actually draw a report in a 
> drawing area when using the full program version, and the file 
> representing the report itself is interpreted and printed from an 
> stripped out version of the program that only works in console mode 
> (interactive curses interface). The logic of printing is the same for 
> both programs, so qt4 is needed to do all the stuff. Sources here [0].
> 

I don't think printing is something gb.ncurses should implement. In fact,
gb.ncurses has nothing to do with printing (on a printer) as ncurses does
not provide any function for it. It's just two (very) different things.
gb.qt4 just supports printers because QT, for some reason, provides an
interface for them.

If we support CUPS, then it should be in a gb.cups component so that
printing is not bound - again, for whatever reason (OK, there's printer
dialogs) - to a graphical toolkit. However, I'm not the person to do this
component and it should IMO not be located inside gb.ncurses.

Looking at the sources you pointed to, he should rather follow Benoit's
suggestion and make two different programs: one to provide the interface and
a hidden one called internally to print by means of QT. Not too pretty but
the easiest solution.

> >
> > Anyway, good to know that someone can do "neat presentation"s with
> > gb.ncurses :-)
> >
> > Regards,
> > Tobi
> 
> Sorry, but finally he wasn't able to do something usable because of the 
> above reasons.
> 
> Honestly, I've never tried gb.ncurses. But I will do in the future, when 
> this is well documented ;-) My friend was complaining about complexity 
> and lack of documentation, but hey, we are very grateful of your work. 
> Really.
> 

Yeah, I still hope for a kind of interface to the wiki that I can turn into
a scriptable program to eventually document easily (and happily). The
documentation should be deprecated in most parts since I wrote it...

However, I'm the living gb.ncurses documentation. You can contact me or the
entire list if you have questions. I'll do some examples, too.

Regards,
Tobi

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to