[Lazarus] lazarus ccr and it's svn

2011-03-20 Thread ik
Hello List, I have the full svn tree of Lazarus-ccr on my machine. I went today to the sourceforge project page to discover that VirtualTreeView For example is newer on the download page then the svn version. How exactly are things updated in the svn ? I know that lnet does not belong to the

Re: [Lazarus] lazarus ccr and it's svn

2011-03-20 Thread ik
My bad, I was using the old tvt version, and not the new part. Ido On Sun, Mar 20, 2011 at 13:07, ik ido...@gmail.com wrote: Hello List, I have the full svn tree of Lazarus-ccr on my machine. I went today to the sourceforge project page to discover that VirtualTreeView For example is

[Lazarus] Accessing USB HID from Lazarus programs?

2011-03-20 Thread Bo Berglund
I need to create a program using Lazarus/FPC to access a data collection device built using a PIC24F series microprocessor with built-in USB support. The firmware makes the PIC processor register as a Human Interface Device (HID) class USB device. I understand that for the HID class one does not

[Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Leonardo M . Ramé
Hi, I would like to know how can I let a CGI app return a JPeg image from a TChart. Here's what I'm doing: procedure TFPWebModule1.getchartRequest(Sender: TObject; ARequest: TRequest; AResponse: TResponse; var Handled: Boolean); var lRect: TRect; lChart: TChart; lJPegImage:

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
On Mon, Mar 21, 2011 at 03:22, Leonardo M. Ramé l.r...@griensu.com wrote:    lCanvas.CopyRect(0,0,TFPCustomCanvas(lChart.Canvas),lRect); After executing the method I'm getting Control '' has no parent window' at the CopyRect line. I'm sure there is another method to copy a TCanvas to a

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Leonardo M . Ramé
On 2011-03-21 03:58:12 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 03:22, Leonardo M. Ramé l.r...@griensu.com wrote:    lCanvas.CopyRect(0,0,TFPCustomCanvas(lChart.Canvas),lRect); After executing the method I'm getting Control '' has no parent window' at the CopyRect line.

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Michael Van Canneyt
On Sun, 20 Mar 2011, Leonardo M. Ramé wrote: On 2011-03-21 03:58:12 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 03:22, Leonardo M. Ramé l.r...@griensu.com wrote:    lCanvas.CopyRect(0,0,TFPCustomCanvas(lChart.Canvas),lRect); After executing the method I'm getting Control ''

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
2011/3/21 Michael Van Canneyt mich...@freepascal.org: Yes, but, how can I use a TCanvas in a CGI app? If I write: Chart.PaintOnCanvas(TCanvas(lCanvas), Rect(0, 0, 100, 100)); I get an Access Violation. Of course, since you are converting an object to the type it does not belong to. You

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Leonardo M . Ramé
On 2011-03-21 04:38:46 +1000, Alexander Klenin wrote: 2011/3/21 Michael Van Canneyt mich...@freepascal.org: Yes, but, how can I use a TCanvas in a CGI app? If I write: Chart.PaintOnCanvas(TCanvas(lCanvas), Rect(0, 0, 100, 100)); I get an Access Violation. Of course, since you are

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Michael Van Canneyt
On Mon, 21 Mar 2011, Alexander Klenin wrote: 2011/3/21 Michael Van Canneyt mich...@freepascal.org: Yes, but, how can I use a TCanvas in a CGI app? If I write: Chart.PaintOnCanvas(TCanvas(lCanvas), Rect(0, 0, 100, 100)); I get an Access Violation. Of course, since you are converting an

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
On Mon, Mar 21, 2011 at 04:44, Leonardo M. Ramé l.r...@griensu.com wrote: Of course, since you are converting an object to the type it does not belong to. You should create a TBitmap or another similar object. Did you look at the savedemo as I proposed in a previous mail? Yes, if I try to

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
On Mon, Mar 21, 2011 at 04:46, Michael Van Canneyt mich...@freepascal.org wrote: Why do you think so? TAChart should be prefectly capable of rendering on bitmap-based canvas. Because both TCanvas and TBitmap suppose a GUI. TFPCustomCanvas does not. Yes, I know about the 'nogui' widgetset,

[Lazarus] FW: Accessing USB HID from Lazarus programs?

2011-03-20 Thread Peter Williams
Hi Bo, I found these 2 links with google. They discuss the unit libusb which seems to work (I have NOT tried it myself). http://laurensdelangeelectronics.blogspot.com/2011/01/interfacing-with-usb-parallel-port.html It appears from the article that it only works as a linux superuser. I suggest

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Leonardo M . Ramé
On 2011-03-21 04:54:45 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 04:44, Leonardo M. Ramé l.r...@griensu.com wrote: Of course, since you are converting an object to the type it does not belong to. You should create a TBitmap or another similar object. Did you look at the

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
On Mon, Mar 21, 2011 at 05:14, Leonardo M. Ramé l.r...@griensu.com wrote: On 2011-03-21 04:54:45 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 04:44, Leonardo M. Ramé l.r...@griensu.com wrote: Of course, since you are converting an object to the type it does not belong to. You

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Leonardo M . Ramé
On 2011-03-21 05:27:49 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 05:14, Leonardo M. Ramé l.r...@griensu.com wrote: On 2011-03-21 04:54:45 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 04:44, Leonardo M. Ramé l.r...@griensu.com wrote: Of course, since you are

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
On Mon, Mar 21, 2011 at 05:30, Leonardo M. Ramé l.r...@griensu.com wrote: You have to link you CGI app with some graphic widgetset, which will unfortunately bloat an executable, but should otherwise work. Well, I tested that, but I get Internal Server Error from my Apache. What does the log

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
On Mon, Mar 21, 2011 at 05:42, Leonardo M. Ramé l.r...@griensu.com wrote: [Sun Mar 20 16:30:09 2011] [error] [client ::1] (cgicharts:16246): Gtk-WARNING **: cannot open display: [Sun Mar 20 16:30:09 2011] [error] [client ::1] Premature end of script headers: cgicharts Unfortunately, I am not

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Leonardo M . Ramé
On 2011-03-21 06:00:20 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 05:42, Leonardo M. Ramé l.r...@griensu.com wrote: [Sun Mar 20 16:30:09 2011] [error] [client ::1] (cgicharts:16246): Gtk-WARNING **: cannot open display: [Sun Mar 20 16:30:09 2011] [error] [client ::1] Premature

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Henry Vermaak
On 20 March 2011 19:42, Leonardo M. Ramé l.r...@griensu.com wrote: On 2011-03-21 05:39:01 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 05:30, Leonardo M. Ramé l.r...@griensu.com wrote: You have to link you CGI app with some graphic widgetset, which will unfortunately bloat an

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
On Mon, Mar 21, 2011 at 06:14, Leonardo M. Ramé l.r...@griensu.com wrote: Thanks for the explanation Alexander. Looking at the TChart.PaintOnCanvas method, I see you use a TCanvasDrawer class to draw over a TCanvas. I think it shouldn't be too difficult to use a TFPImageCanvas when using

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Sven Barth
On 20.03.2011 21:21, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 06:14, Leonardo M. Ramél.r...@griensu.com wrote: Thanks for the explanation Alexander. Looking at the TChart.PaintOnCanvas method, I see you use a TCanvasDrawer class to draw over a TCanvas. I think it shouldn't be too

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Leonardo M . Ramé
On 2011-03-20 20:16:19 +, Henry Vermaak wrote: On 20 March 2011 19:42, Leonardo M. Ramé l.r...@griensu.com wrote: On 2011-03-21 05:39:01 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 05:30, Leonardo M. Ramé l.r...@griensu.com wrote: You have to link you CGI app with some

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Leonardo M . Ramé
On 2011-03-20 18:16:00 -0300, Leonardo M. Ramé wrote: On 2011-03-20 20:16:19 +, Henry Vermaak wrote: On 20 March 2011 19:42, Leonardo M. Ramé l.r...@griensu.com wrote: On 2011-03-21 05:39:01 +1000, Alexander Klenin wrote: On Mon, Mar 21, 2011 at 05:30, Leonardo M. Ramé

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Mattias Gaertner
On Mon, 21 Mar 2011 04:58:18 +1000 Alexander Klenin kle...@gmail.com wrote: On Mon, Mar 21, 2011 at 04:46, Michael Van Canneyt mich...@freepascal.org wrote: Why do you think so? TAChart should be prefectly capable of rendering on bitmap-based canvas. Because both TCanvas and TBitmap

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Alexander Klenin
On Mon, Mar 21, 2011 at 08:41, Mattias Gaertner nc-gaert...@netcologne.de wrote: On Mon, 21 Mar 2011 04:58:18 +1000 Alexander Klenin kle...@gmail.com wrote: Hm. For me GUI means graphical user interface -- that is, windows (aka forms), interacting with mouse, etc. I have just committed a

Re: [Lazarus] Get JPEG from TAChart in CGI app

2011-03-20 Thread Mattias Gaertner
On Mon, 21 Mar 2011 11:53:52 +1000 Alexander Klenin kle...@gmail.com wrote: On Mon, Mar 21, 2011 at 08:41, Mattias Gaertner nc-gaert...@netcologne.de wrote: On Mon, 21 Mar 2011 04:58:18 +1000 Alexander Klenin kle...@gmail.com wrote: Hm. For me GUI means graphical user interface -- that