[lazarus] Polymorphism question
I would like to declare a polymorph class. The class has several properties and it's the read and write specifiers that I want to be virtual abstract. So derived classes override the read and write specifiers. The problem however is that I get an EAbstractError. The property is still considered to be abstract according to the compiler. So what did I wrong? I have added an example below. Is it perhaps not allowed to use this construct? What would then be the best way? Darius example unit MyTest; {$mode objfpc}{$H+} interface uses Classes, ComCtrls, SysUtils; type TCustomClass = class private //virtual mehods function GetMyProperty: string; virtual; abstract; procedure SetMyProperty(Value: string); virtual; abstract; published property MyProperty: string Read GetMyProperty Write SetMyProperty; end; TMyClass = class(TCustomClass) private FMyProperty: string; function GetMyProperty: string; overload; procedure SetMyProperty(Value: string); overload; published property MyProperty; end; implementation function TMyClass .GetMyProperty: string; begin Result := FMyProperty; end; procedure TMyClass .SetMyProperty(Value: string); begin if Value = FMyProperty then exit; FMyProperty := Value; end; end. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Polymorphism question
[EMAIL PROTECTED] wrote: I would like to declare a polymorph class. The class has several properties and it's the read and write specifiers that I want to be virtual abstract. So derived classes override the read and write specifiers. The problem however is that I get an EAbstractError. The property is still considered to be abstract according to the compiler. So what did I wrong? I have added an example below. Is it perhaps not allowed to use this construct? What would then be the best way? Darius example unit MyTest; {$mode objfpc}{$H+} interface uses Classes, ComCtrls, SysUtils; type TCustomClass = class private //virtual mehods function GetMyProperty: string; virtual; abstract; procedure SetMyProperty(Value: string); virtual; abstract; published property MyProperty: string Read GetMyProperty Write SetMyProperty; end; TMyClass = class(TCustomClass) private FMyProperty: string; function GetMyProperty: string; overload; procedure SetMyProperty(Value: string); overload; published property MyProperty; end; implementation function TMyClass .GetMyProperty: string; begin Result := FMyProperty; end; procedure TMyClass .SetMyProperty(Value: string); begin if Value = FMyProperty then exit; FMyProperty := Value; end; end. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives Change overload to override. Ales _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Repository access via the SVN protocol
Hi, Would whoever is running the Free Pascal / Lazarus repository consider enabling the SVN protocol as well. Currently only the HTTP protocol is enabled. (example: GCC has both protocols enabled at svn://gcc.gnu.org/svn/ or via http://gcc.gnu.org/svn/) I have also heard that using the HTTP protocol has a higher server overhead associated with it and is normally slower compared to the SVN protocol, though I know how handy it is via a firewall. The reason I'm asking: It seems that somewhere our ISP in South Africa is blocking or filtering something, which causes us not to be able to access the http://www.freepascal.org/svn repository. It is very frustrating to download huge nightly builds every day (7Mb for Lazarus and 20Mb for FPC). This also make it really difficult to help development on these projects and generate patch files, as the nightly builds do not contain the .svn directories. Every SubVersion server I could find using the SVN protocol seem to work fine, the same cannot be said for the HTTP protocol. I really hope, whoever is in charge of the repositories will consider this request. Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
On Fri, 3 Mar 2006, Graeme Geldenhuys wrote: Hi, Would whoever is running the Free Pascal / Lazarus repository consider enabling the SVN protocol as well. Currently only the HTTP protocol is enabled. (example: GCC has both protocols enabled at svn://gcc.gnu.org/svn/ or via http://gcc.gnu.org/svn/) I have also heard that using the HTTP protocol has a higher server overhead associated with it and is normally slower compared to the SVN protocol, though I know how handy it is via a firewall. The reason I'm asking: It seems that somewhere our ISP in South Africa is blocking or filtering something, which causes us not to be able to access the http://www.freepascal.org/svn repository. It is very frustrating to download huge nightly builds every day (7Mb for Lazarus and 20Mb for FPC). This also make it really difficult to help development on these projects and generate patch files, as the nightly builds do not contain the .svn directories. Every SubVersion server I could find using the SVN protocol seem to work fine, the same cannot be said for the HTTP protocol. I really hope, whoever is in charge of the repositories will consider this request. I am in charge. Is there a problem to use SSH ? SSH is enabled. I could create an account that allows read-only access via svn+ssh. I'd rather not use plain svn, only as a last resort. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
On Fri, 3 Mar 2006, Graeme Geldenhuys wrote: Hi Michael, The only SSH client I have used is Putty (for Windows) to maintain our internal Linux server. What would such a setup involve? I don't know, because I don't know what ssh client you use. What is the security risk connecting via plain SVN with anonymous access? I have only ever had anonymous access to Lazarus and FPC, and always submitted patches via the mailing list. I am fine with continuing to work that way. The risk is that an additional TCP/IP port is open. Our german FTP machine was compromised recently (that is why the wiki is down). The main server has also been compromised some time ago. Since then, I am reluctant to open too much ports. In reality, the problem is with your ISP, namely that they don't seem to support all WebDAV commands in their proxy. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
Michael Van Canneyt wrote: On Fri, 3 Mar 2006, Graeme Geldenhuys wrote: Hi Michael, The only SSH client I have used is Putty (for Windows) to maintain our internal Linux server. What would such a setup involve? I don't know, because I don't know what ssh client you use. What is the security risk connecting via plain SVN with anonymous access? I have only ever had anonymous access to Lazarus and FPC, and always submitted patches via the mailing list. I am fine with continuing to work that way. The risk is that an additional TCP/IP port is open. Our german FTP machine was compromised recently (that is why the wiki is down). The main server has also been compromised some time ago. Since then, I am reluctant to open too much ports. In reality, the problem is with your ISP, namely that they don't seem to support all WebDAV commands in their proxy. What about letting apache listening to a second port ? Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
On Fri, 3 Mar 2006, Micha Nelissen wrote: Michael Van Canneyt wrote: Our german FTP machine was compromised recently (that is why the wiki Let's be fair. The above is not confirmed, it may also have been a DOS attack. True, but the result is the same: the machine is unusable, and a lot of time is being spent on fixing the damage. is down). The main server has also been compromised some time ago. That was simply an easy to guess password mistake, no ? Most likely. Since then, I am reluctant to open too much ports. It's always a trade-off, but seen the above, the daemons weren't the security problem in this case. The lazarus website is sometimes down due to PHP compromises in PostNuke or whatever. I know. But the end result is the same. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
What about letting apache listening to a second port ? I got no idea what my ISP has change, and asking them was a useless exercise! The only thing I could test on my own, was being able to connect successfully to all attempted connection via the SVN protocol. At this stage I am willing to test anything (if it is not to much work for Michael). Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Localization
On Fri, 3 Mar 2006 13:54:19 +0800 Lee Jingbo [EMAIL PROTECTED] wrote: Is there a way that i can add some localization code for IDE's Form code ? For example, i want to set the font of IDE's Form to 'song ti', for i am a user in China, and which may make IDE looks better. If you use gtk (linux/MacOSX/FreeBSD) then maybe this works: Create a lazarus.gtkrc file with the following content and put it into lazarus directory where the 'lazarus' executable is: style default { font = -*-lucida-medium-r-normal-*-10-*-*-*-*-*-iso8859-1 } widget_class * style default You can find the correct font name in the font selector of the environment options editor options display font browse. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
Michael Van Canneyt wrote: On Fri, 3 Mar 2006, Marc Weustink wrote: Michael Van Canneyt wrote: On Fri, 3 Mar 2006, Graeme Geldenhuys wrote: Hi Michael, The only SSH client I have used is Putty (for Windows) to maintain our internal Linux server. What would such a setup involve? I don't know, because I don't know what ssh client you use. What is the security risk connecting via plain SVN with anonymous access? I have only ever had anonymous access to Lazarus and FPC, and always submitted patches via the mailing list. I am fine with continuing to work that way. The risk is that an additional TCP/IP port is open. Our german FTP machine was compromised recently (that is why the wiki is down). The main server has also been compromised some time ago. Since then, I am reluctant to open too much ports. In reality, the problem is with your ISP, namely that they don't seem to support all WebDAV commands in their proxy. What about letting apache listening to a second port ? What good would that do ? Fooling the proxy ? Yes, mostly transparent proxies are configured for known http ports like 80, 1080 and 8080 and wont affect other ports. Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TLabel and Widgetset questions
On 3/2/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Please report such places. The LCL should not do that. I was wrong, by the way. My TLabel isn't showing. Is DrawText the only function utilized to make TLabel work? I also implemented TextOut, but that one isn't used at all. Here is the order on which events occur: [EMAIL PROTECTED] test]$ ./qttest OnCreate QPainter::begin: Widget painting can only begin as a result of a paintEvent QPainter::begin: Widget painting can only begin as a result of a paintEvent Start OnPaint End OnPaint OnDestroy DrawText is being called twice before the paint event. The Paint message comes from Qt and is processed like this by my widgetset: procedure TQtCustomForm.SlotPaint; cdecl; var Msg: TLMessage; begin FillChar(Msg, SizeOf(Msg), #0); Msg.Msg := LM_PAINT; try LCLObject.WindowProc(TLMessage(Msg)); except Application.HandleException(nil); end; end; Is this a correct way? Here is the stack trace for the first call (I added a exception so I can see the stack trace): QPainter::begin: Widget painting can only begin as a result of a paintEvent [FORMS.PP] ExceptionOccurred Sender=Exception Exception=Error Stack trace: $080CB53D TQTWIDGETSET__DRAWTEXT, line 147 of qtwinapi.inc $08116897 DRAWTEXT, line 181 of ./include/winapi.inc $080F88CC TCUSTOMLABEL__CALCSIZE, line 43 of ./include/customlabel.inc $080F89E8 TCUSTOMLABEL__DOAUTOSIZE, line 68 of ./include/customlabel.inc $080D9893 TCONTROL__ADJUSTSIZE, line 50 of ./include/control.inc $080D1226 TWINCONTROL__RESIZEDELAYEDAUTOSIZECHILDREN, line 1685 of ./include /wincontrol.inc $080D2A42 TWINCONTROL__UPDATESHOWING, line 2528 of ./include/wincontrol.inc $0808BB94 TCUSTOMFORM__UPDATESHOWING, line 1813 of ./include/customform.inc $080D5C0F TWINCONTROL__UPDATECONTROLSTATE, line 4174 of ./include/wincontrol .inc $080D8F2B TWINCONTROL__CMVISIBLECHANGED, line 5801 of ./include/wincontrol.i nc $080528EB $080DCB32 TCONTROL__WNDPROC, line 1542 of ./include/control.inc $080D456D TWINCONTROL__WNDPROC, line 3347 of ./include/wincontrol.inc $08089E9D TCUSTOMFORM__WNDPROC, line 918 of ./include/customform.inc $080DBA48 TCONTROL__PERFORM, line 1014 of ./include/control.inc $080DFD1C TCONTROL__SETVISIBLE, line 2977 of ./include/control.inc $08088F0F TCUSTOMFORM__SETVISIBLE, line 337 of ./include/customform.inc And now for the second: [EMAIL PROTECTED] test]$ ./qttest OnCreate QPainter::begin: Widget painting can only begin as a result of a paintEvent QPainter::begin: Widget painting can only begin as a result of a paintEvent [FORMS.PP] ExceptionOccurred Sender=Exception Exception=Error Stack trace: $080CB54D TQTWIDGETSET__DRAWTEXT, line 157 of qtwinapi.inc $081168A7 DRAWTEXT, line 181 of ./include/winapi.inc $080F88DC TCUSTOMLABEL__CALCSIZE, line 43 of ./include/customlabel.inc $080F89F8 TCUSTOMLABEL__DOAUTOSIZE, line 68 of ./include/customlabel.inc $080D98A3 TCONTROL__ADJUSTSIZE, line 50 of ./include/control.inc $080D1236 TWINCONTROL__RESIZEDELAYEDAUTOSIZECHILDREN, line 1685 of ./include/wincontrol.inc $080D8F4B TWINCONTROL__CMVISIBLECHANGED, line 5803 of ./include/wincontrol.inc $080528EB $080DCB42 TCONTROL__WNDPROC, line 1542 of ./include/control.inc $080D457D TWINCONTROL__WNDPROC, line 3347 of ./include/wincontrol.inc $08089E9D TCUSTOMFORM__WNDPROC, line 918 of ./include/customform.inc $080DBA58 TCONTROL__PERFORM, line 1014 of ./include/control.inc $080DFD2C TCONTROL__SETVISIBLE, line 2977 of ./include/control.inc $08088F0F TCUSTOMFORM__SETVISIBLE, line 337 of ./include/customform.inc $0808B273 TCUSTOMFORM__SHOW, line 1460 of ./include/customform.inc thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Wiki site
A.J. Venter wrote: Hi guys, with the wiki STILL down, I am wondering if I can offer some help, I have a freebsd jail server in Canada running silentcoder.co.za and I would be more than happy to set up a mirror of the wiki there that can pick up the load for the time being and in future if/when problems occur with the current one. Fortunately the wiki up and running again. So, thanks for now. For in the future, I am not sure how you can mirror a wiki with dynamic content. A readonly mirror would be possible. Anybody interested ? Who do I talk to, to make it happen ? You would have to talk to me. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TLabel and Widgetset questions
On 3/3/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Yes, not to paint, but to measure: Flags:=DT_CalcRect Yes, I noticed that on both calls DT_CalcRect is used. So what is the call that acctually does the painting? Is this a correct way? Looking good, but I'm no qt expert. It processes correctly a TCustomForm.OnPaint event. thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TLabel and Widgetset questions
On Fri, 3 Mar 2006 08:33:25 -0300 Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: On 3/3/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Yes, not to paint, but to measure: Flags:=DT_CalcRect Yes, I noticed that on both calls DT_CalcRect is used. So what is the call that acctually does the painting? TCustomLabel.Paint Canvas.TextRect Is this a correct way? Looking good, but I'm no qt expert. It processes correctly a TCustomForm.OnPaint event. Yes, but I don't know, if the exception handling in a qt callback works. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TLabel and Widgetset questions
Felipe Monteiro de Carvalho wrote: On 3/3/06, Mattias Gaertner [EMAIL PROTECTED] wrote: Yes, not to paint, but to measure: Flags:=DT_CalcRect Yes, I noticed that on both calls DT_CalcRect is used. So what is the call that acctually does the painting? Look in MSDN for DrawText description. DT_CALCRECT in flags means only calculate, otherwise paint. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] sqldb
On Fri, 3 Mar 2006, Bogus?aw Brandys wrote: Hello, Please ask FPC developers if they could add ErrorNumber to EDatabaseError exception to differentiate what was the cause of exception.It would be helpful for sqldb package also. This should for example evaluate to GDSCODE for Interbase/Firebird and is more clever way to use in case...end inside on exception handler Besides for example Firebird frequently return (string) error message which is concatenation of several errors (cascade error reporting) - not good to compare. While I understand why you want this: The disadvantage of this is that you need to have a complete list of error numbers and their meaning, and they should be the same accross databases, which is not feasible. The proper way of doing this is to create a descendent which contains the error code. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TLabel and Widgetset questions
Micha Nelissen wrote: So what is the call that acctually does the painting? Look in MSDN for DrawText description. DT_CALCRECT in flags means only calculate, otherwise paint. Oh oops, never mind, read the question wrong :) Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] sqldb
Please ask FPC developers if they could add ErrorNumber to EDatabaseError exception to differentiate what was the cause of exception.It would be helpful for sqldb package also. There already is an bug-item for this. I'm too busy now. Next week i'll answer to all sqldb/db-related issues on the mailinglists and try to implement a better error-handling. -- Met vriendelijke groeten, Joost van der Sluis CNOC Informatiesystemen en Netwerken http://www.cnoc.nl _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TLabel and Widgetset questions
On 3/3/06, Mattias Gaertner [EMAIL PROTECTED] wrote: So what is the call that acctually does the painting? TCustomLabel.Paint Canvas.TextRect Ummm, so now I'm closer to the problem. TCustomLabel.Paint is never called. I suppose that TCustomLabel.Paint should be called by it's owner (the Form) since TLabel isn't a windowed control? thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
Hi Michael, I see the SmartSVN client I sometimes use, has SSH support built-in (it says SVN+SSH for connection type), so could try that The ssh part requires a username and password though. Regards, - Graeme - On 3/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: The only SSH client I have used is Putty (for Windows) to maintain our internal Linux server. What would such a setup involve? I don't know, because I don't know what ssh client you use. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
Graeme Geldenhuys wrote: Hi Michael, I see the SmartSVN client I sometimes use, has SSH support built-in (it says SVN+SSH for connection type), so could try that The ssh part requires a username and password though. I use putty to setup the connection. After that I configure svn so that is uses that connection. Basically, if you name the connection in ssh svn.freepascal.org, then svn+ssh://svn.freepascal.org/FPC/svn/lazarus/trunk is URL for lazarus trunk. You can store username with the putty connection settings, but not the password, afaik. You can store the place for a private key file. Vincent. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
On Fri, 3 Mar 2006, Vincent Snijders wrote: Graeme Geldenhuys wrote: Hi Michael, I see the SmartSVN client I sometimes use, has SSH support built-in (it says SVN+SSH for connection type), so could try that The ssh part requires a username and password though. I use putty to setup the connection. After that I configure svn so that is uses that connection. Basically, if you name the connection in ssh svn.freepascal.org, then svn+ssh://svn.freepascal.org/FPC/svn/lazarus/trunk is URL for lazarus trunk. You can store username with the putty connection settings, but not the password, afaik. You can store the place for a private key file. Some mails on the FPC core list made clear that this option is not feasible, because we don't allow password logins on the FPC machines. The topic is still under consideration. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] sqldb
Michael Van Canneyt wrote: On Fri, 3 Mar 2006, Bogus?aw Brandys wrote: Hello, Please ask FPC developers if they could add ErrorNumber to EDatabaseError exception to differentiate what was the cause of exception.It would be helpful for sqldb package also. This should for example evaluate to GDSCODE for Interbase/Firebird and is more clever way to use in case...end inside on exception handler Besides for example Firebird frequently return (string) error message which is concatenation of several errors (cascade error reporting) - not good to compare. While I understand why you want this: The disadvantage of this is that you need to have a complete list of error numbers and their meaning, and they should be the same accross databases, which is not feasible. I see no problem in this number reporting the error number from the underlying DB. We don't have unified errormessages either. Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] graphical shapes library or component
Hi, Am Montag, den 27.02.2006, 20:08 +0100 schrieb Marc Santhoff: Hi, is anoyone aware of a library or a (set of) componet(s) for pitchforking around some shapes, rectangles, elipses and the like and for creating connectors between this shapes? Of course it should be easily usable with fpc and lazarus. I'm searching for the basic things making up a graphical editor. diacanvas, wrapped for pascal with http://developer.berlios.de/projects/gtk2q/ . Last time I tried (a month or two ago) the compiler still had a problem with inter-package unit checksums (diacanvasq uses gtk2q, but when _it_ tries to use the gtk2q units it brags about checksum failure, so you could not use diacanvasq, only gtk2q directly) ... I kind of got demotivated/sidetracked, thus. Feel free to try again now. Now if you need a canvas to work with non-gtk stuff then the above would be a bad choice :) I don't know any VCL/FCLish canvas thingie. cheers, Danny _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] GTK2 SetFont Patch - final (for now)
Hi, Am Dienstag, den 28.02.2006, 21:59 +0100 schrieb Marc Santhoff: Am Dienstag, den 28.02.2006, 17:53 +0100 schrieb Mattias Gaertner: On Tue, 28 Feb 2006 06:14:04 +0100 Marc Santhoff [EMAIL PROTECTED] wrote: It could be by design, IIRC this is a task done in GTK2 by pango using markup around the strings. Dunno if it's true for simple TEdit, too. pseudo code: TEdit.setText(fgcolor redThe Text to show/fgcolor red); Nope. The SetWidgetColor works. Just not at creation. Not that I'm really into it, but this snippet popped up on a GTK mailing list some hours ago: [EMAIL PROTECTED] says: snip To modify font size PangoFontDescription *font; font=pango_font_description_from_string(San 9); gtk_widget_modify_font(widget,font); To modify color GdkColor color; gdk_color_parse(blue,color); gtk_widget_modify_fg(widget,GTK_STATE_NORMAL,color); /snip It looks to me like on the GTK side the widget has to be realized already ... Why? I can't see a colormap in the code above... cheers, Danny _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] graphical shapes library or component
On Fri, 3 Mar 2006, Danny Milosavljevic wrote: Hi, Am Montag, den 27.02.2006, 20:08 +0100 schrieb Marc Santhoff: Hi, is anoyone aware of a library or a (set of) componet(s) for pitchforking around some shapes, rectangles, elipses and the like and for creating connectors between this shapes? Of course it should be easily usable with fpc and lazarus. I'm searching for the basic things making up a graphical editor. diacanvas, wrapped for pascal with http://developer.berlios.de/projects/gtk2q/ . Last time I tried (a month or two ago) the compiler still had a problem with inter-package unit checksums (diacanvasq uses gtk2q, but when _it_ tries to use the gtk2q units it brags about checksum failure, so you could not use diacanvasq, only gtk2q directly) ... I kind of got demotivated/sidetracked, thus. Feel free to try again now. Now if you need a canvas to work with non-gtk stuff then the above would be a bad choice :) I don't know any VCL/FCLish canvas thingie. All canvases in Lazarus descend from TFPCustomCanvas, in the FCL. (fpimage dir) TFPImageCanvas has no external dependencies and is a fully functional canvas. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] graphical shapes library or component
Hi, Am Freitag, den 03.03.2006, 16:47 +0100 schrieb Michael Van Canneyt: On Fri, 3 Mar 2006, Danny Milosavljevic wrote: Hi, Am Montag, den 27.02.2006, 20:08 +0100 schrieb Marc Santhoff: Hi, is anoyone aware of a library or a (set of) componet(s) for pitchforking around some shapes, rectangles, elipses and the like and for creating connectors between this shapes? Of course it should be easily usable with fpc and lazarus. I'm searching for the basic things making up a graphical editor. diacanvas, wrapped for pascal with http://developer.berlios.de/projects/gtk2q/ . Last time I tried (a month or two ago) the compiler still had a problem with inter-package unit checksums (diacanvasq uses gtk2q, but when _it_ tries to use the gtk2q units it brags about checksum failure, so you could not use diacanvasq, only gtk2q directly) ... I kind of got demotivated/sidetracked, thus. Feel free to try again now. Now if you need a canvas to work with non-gtk stuff then the above would be a bad choice :) I don't know any VCL/FCLish canvas thingie. All canvases in Lazarus descend from TFPCustomCanvas, in the FCL. (fpimage dir) TFPImageCanvas has no external dependencies and is a fully functional canvas. Really? Does that support remembering vector shapes and shape manipulations via the mouse, interconnections between shapes and attributes and undo and such? Interesting, must try :) Michael. cheers, Danny _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] cannot find -lgdk-x11-2.0
Hi, Am Freitag, den 24.02.2006, 18:12 +0200 schrieb Geno Roupsky: installing libgtk2.0-dev and libgdk-pixbuf2 should do the trick Are you installing gtk1 or gtk2 now? Decide ;) libgtk2.0-dev are development headers of gtk 2. libgdk-pixbuf2 is the gtk 1 pixbuf library (i.e. extension library using gtk 1) GTK 2 includes gdkpixbuf stuff in the base package. cheers, Danny Geno Roupsky 2006/2/24, Panagiotis Sidiropoulos [EMAIL PROTECTED]: Are you building Lazarus for GTK 2 ? Yes. IIRC gdk-x11-2.0 comes with the gdk2 packages. I failed to find gdk2 packages neither through Synaptic or packages.debian.org. Please feel free to correct me ine case of using wrong terminoly, my experience on Linux is limited. Any ideas? Panagiotis -Original Message- From: Marc Weustink [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 11:43 AM To: lazarus@miraclec.com Subject: Re: [lazarus] cannot find -lgdk-x11-2.0 Panagiotis Sidiropoulos wrote: While rebuilding Lazarus, I get error messge: - /usr/bin/ld: cannot find -lgdk-x11-2.0 Are you building Lazarus for GTK 2 ? IIRC gdk-x11-2.0 comes with the gdk2 packages. Marc I tried to update gtk library using Synaptic. It found 32 files to update but on 30th file following messages appeared: http://pkg-kde.alioth.debian.org/kde-3.4.0/./Packages.gz: 404 Not Found http://pkg-kde.alioth.debian.org/kde-3.4.1/./Packages.gz: 404 Not Found After this whie opening Synaptic, I get error messages: E: Dynamic MMap ran out of room E: Dynamic MMap ran out of room E: Problem processing xgalaga (NewVersion1) E: Problem with MergeList /var/lib/apt/lists/ftp.de.debian.org_pub_debian_dists_testing_main_binar y-i386_Packages E: Can't analyze or open list of packages. While rebuilding Lazarus, I still get error messge: - /usr/bin/ld: cannot find -lgdk-x11-2.0 Any advice would be most appreciated. Regards, Panagiotis _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] graphical shapes library or component
Hi, Am Freitag, den 03.03.2006, 16:59 +0100 schrieb Michael Van Canneyt: On Fri, 3 Mar 2006, Danny Milosavljevic wrote: Hi, Am Freitag, den 03.03.2006, 16:47 +0100 schrieb Michael Van Canneyt: On Fri, 3 Mar 2006, Danny Milosavljevic wrote: Hi, Am Montag, den 27.02.2006, 20:08 +0100 schrieb Marc Santhoff: Hi, is anoyone aware of a library or a (set of) componet(s) for pitchforking around some shapes, rectangles, elipses and the like and for creating connectors between this shapes? Of course it should be easily usable with fpc and lazarus. I'm searching for the basic things making up a graphical editor. diacanvas, wrapped for pascal with http://developer.berlios.de/projects/gtk2q/ . Last time I tried (a month or two ago) the compiler still had a problem with inter-package unit checksums (diacanvasq uses gtk2q, but when _it_ tries to use the gtk2q units it brags about checksum failure, so you could not use diacanvasq, only gtk2q directly) ... I kind of got demotivated/sidetracked, thus. Feel free to try again now. Now if you need a canvas to work with non-gtk stuff then the above would be a bad choice :) I don't know any VCL/FCLish canvas thingie. All canvases in Lazarus descend from TFPCustomCanvas, in the FCL. (fpimage dir) TFPImageCanvas has no external dependencies and is a fully functional canvas. Really? Does that support remembering vector shapes and shape manipulations via the mouse, interconnections between shapes and attributes and undo and such? Interesting, must try :) No, of course not. It's a plain canvas to draw on. But it works without any external dependencies. I see :) In gtk terminology that's a drawing area. A dia canvas is the complex thing that *stores* the shapes as objects and such... In delphi terminology, the gtk drawing area is called canvas... cheers, Danny _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] USB port in LAZARUS
Hi, Does somebody know how to send and receive raw data through the USB port in win32 or Linux? Is it necessary to use a DDL in Win32 (which one?) or does exist a component for lazarus? In Linux I can send EPCL to Printer with this simple command: cat file.prn /dev/usb/lp0 where file.prn it contains the EPCL commands. But the problem is that I don't know how to read the status of the printer after the print of each card. I'm developing an application that need to communicate with an USB printer (ELTRON P330i) to send and receive EPCL commands to print cards. Any help will be appreciated. Thanks and regards _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the SVN protocol
On 3/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: Some mails on the FPC core list made clear that this option is not feasible, because we don't allow password logins on the FPC machines. The topic is still under consideration. Thanks for the feedback, awaiting the final answer... Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] USB port in LAZARUS
There is a tutorial about how to access the hardware on the wiki, here: http://wiki.lazarus.freepascal.org/index.php/Hardware_Access However I only tested it with Parallel devices (ISA, PCI, parallel port), but the access is very raw, so it may work on usb as well. When you get this working, please add information to that Wiki page on the Serial Communication section =) You might also find interresting the documentation and source code of a digital oscilloscope GUI I developed with Lazarus. It's available here: http://eletronicalivre.incubadora.fapesp.br/portal/english/oscilloscope/ thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Object pascal a Modern Language
On 3/3/06, Matt Henley [EMAIL PROTECTED] wrote: My personal objective is not just to put out a simulator, but a fast and efficient simulator. Furthermore, personally, I do not consider a program portable if it is written in a language which very few can understand. Althought a lot less popular then c, c++ and java, pascal is still reasonably popular, and is easy to learn. Very important software like Skype is written on Object Pascal. Mac OS 7 and below had a lot of Object Pascal code on them, and it's API was written fully in pascal. A modern language such as any of the .NET languages will meet the efficiency objective but portability remains an issue. This statement isn't true. .NET in general has performance much inferior to native pascal. Take a look at debian shootout comparison of Free Pascal and c#: http://shootout.alioth.debian.org/debian/benchmark.php?test=alllang=fpascallang2=csharp Free Pascal is more then 10 times faster and uses 10 times less memory. Yes, benchmarks are all flawed, but a huge difference like this can point at .NET performance flaws. Also take a look at this article: http://www.microsoft-watch.com/article2/0,1995,1820607,00.asp Specially the part: quoteEverything in Longhorn was supposed to be written in C# and to be managed code. But managed code was going to require machines that weren't going to be available for five years or more. So now Microsoft is rewriting everything in Longhorn, the developer says. Developers claim that the Windows team actually began rethinking Microsoft's .Net Framework and managed code promises last summer, around the time of the infamous Longhorn Reset. (The Longhorn Reset is shorthand for Microsoft's decision to axe certain Longhorn features, most notably WinFS, in order to be able to commit to a 2006 ship date.) end quote While I do have the Visual Studio .NET and I am happy with it, I understand that not everybody has it and it is not cheap. I bet that the price of buying VS will be a much bigger blocker then people needing to write pascal code. Pascal is considered easy to learn, and still used a lot in basic programming courses. It will however, limit us to Pascal which is not really a modern language. For those of you who are in favor of using Lazarus, can you assure the rest of us that Pascal has been modernized? When I talk to developers of other languages they all think Pascal is that non-object oriented thing from early 1980s and that it did not change people need to know that Object Pascal is the real industry used pascal. One prove that Pascal is evolving still today is the talks on fpc mailling lists about the inclusion of templates (generics). -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] graphical shapes library or component
On Fri, 03 Mar 2006 17:15:05 +0100, Danny Milosavljevic [EMAIL PROTECTED] wrote: In gtk terminology that's a drawing area. A dia canvas is the complex thing that *stores* the shapes as objects and such... I have been really busy for the past few weeks but I have now tested the DXF library I used 6-7 years ago in Delphi. After the LCL corrections with arcs it seems to work now. It stores the DXF objects as structures of some sort so it might be of some use. For the time being it just reads a DXF file and is capable of displaying it... and I suppose it can also detect the mouse movement on the object (I never used this feature). If anyone is interested I will mail it gladly. Markku -- [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [fpc-pascal] Object pascal a Modern Language
Everything? Missing (thankfully): Multiple Inheritance (but interfaces solves the same problem much more elegantly), templates (nightmare to debug). But if they guy can find something else C++ can do that OOP can't, that would be remarkable. True C is still better for driver authoring, but that is about it. Michael Van Canneyt wrote: On Fri, 3 Mar 2006, Matt Henley wrote: I belong to a mailing list for a defunt open source chemical process simulator (Sim42). Members of the list are now showing interest in restarting the effort. It was originally written in python which cause some speed issues. Several of the list members (including me) suggested freepascal and lazarus. The gentleman spearheading the effort sent the following and I would like to know what is the best way to respond. I do not know what features define a "modern language" and would like to know what points to bring up. "My personal objective is not just to put out a simulator, but a fast and efficient simulator. Furthermore, personally, I do not consider a program portable if it is written in a language which very few can understand. A modern language such as any of the .NET languages will meet the efficiency objective but portability remains an issue. While I do have the Visual Studio .NET and I am happy with it, I understand that not everybody has it and it is not cheap. I looked at the Lazarus project and (at least at a first glance) it is indeed very "Visual" and will likely do the job. It will however, limit us to Pascal which is not really a modern language. For those of you who are in favor of using Lazarus, can you assure the rest of us that Pascal has been modernized? " Most people out there probably think of Pascal as still being in the state it was in when Niklaus Wirth first designed it. Object Pascal to date is fully OOP, and misses nothing that C#, C++ or Java has: Interfaces, Exceptions, Classes: you name it, Object Pascal has it. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives __ NOD32 1.1428 (20060303) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- Thomas Miller Chrome Portal Project Manager Wash DC Delphi SIG Chairperson Delphi Client/Server Certified Developer BSS Accounting Distribution Software BSS Enterprise Accounting FrameWork http://www.bss-software.com http://www.cpcug.org/user/delphi/index.html http://sourceforge.net/projects/chromeportal/ http://sourceforge.net/projects/uopl/ http://sourceforge.net/projects/dbexpressplus
Re: [lazarus] transparent forms
Hi I'v just reported this to bugtrack list, please take a look at issues: 0001804 0001805 0001806 thanks xpete Regions are great and work in all Win Versions but Alpha Blending is only implemented in Win2K+, if you have good drivers even alpha doesn't consume much cpu, on Linux both Alpha and Regions should be supported already, i have noticed TCanvas has TRegion ? Was it meant to be a matrix with the alpha or transparency pixels ? It would be nice if one could use a bw or gray picture(mask) for alpha or transparency on window based controls or even programatically with an array matrix wich could be taken from a 32 bit picture, anyways it is a godd ideea and can probably be implemented in a crossplatform way :) On 2/28/06, Micha Nelissen [EMAIL PROTECTED] wrote: Felipe Monteiro de Carvalho wrote: On 2/27/06, Micha Nelissen [EMAIL PROTECTED] wrote: I think SetWindowRgn makes part of a window transparent (the parts not in the region). For example, winamp can do it: have oddly shaped sizes. well ... good to know new things =) I did not know that such API function existed. Maybe it can be used to implement those Delphi properties? This could be implemented on the widgetset and at least on Qt4 we also know how to do that now. The usual way to implement this is to translate the necessary calls of the winapi (SetWindowRgn and region creation functions in this case) to the target platform. Then the delphi component should more or less work as-is. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TLabel and Widgetset questions
Ok, now I'm even closer. I found what was causing problems outside the Paint event. TCUSTOMLABEL.CALCSIZE calls GetDC, doing some changes on the way I implement BeginPaint and GetDC I solved this. But the label still doesn't show ... now I need to know why TCustomLabel.Paint is never called (and who should be calling it). thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [fpc-pascal] Object pascal a Modern Language
On 3/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Fri, 3 Mar 2006, Matt Henley wrote: Visual and will likely do the job. It will however, limit us to Pascal which is not really a modern language. For those of you who are in favor of using Lazarus, can you assure the rest of us that Pascal has been modernized? Most people out there probably think of Pascal as still being in the state it was in when Niklaus Wirth first designed it. Object Pascal to date is fully OOP, and misses nothing that C#, C++ or Java has: Interfaces, Exceptions, Classes: you name it, Object Pascal has it. my $0.02 ... i've been programming with Java pretty much since it hit the streets, for my paycheck. i've dabbled in many other languages, professionally to fill certain gaps, and as a hobbyist. i discovered FPC about 9 months or so ago, based on a post on slashdot. i was interested, because as a hobby, i write plugins for a flight simulator. up to that point, i had been using 'C' for my hobbyist work and 'C', for me, was a royal pain in the butt coming from a Java background. for me, where java had spoiled me to other languages, wasn't in the usual suspects, such as memory management, i can manage my own memory if i have to, but it was the absolute ease with which i could implement OO constructs, where C++ just confuses the daylights out of me when trying to do basic class creation and inheritance. in addition, and this was fundamental, _every_ type of basic supporting library, that i take for granted when using Java, such as an XML parser, or high quality data structures, or string parsing routines, was a hair pulling nightmare of having to go out on the net and download and try and build from source in 'C' to get the same basic set of services. and to be fair, this was using NON M$ tools, which aren't an option for me, because i refuse to pay M$ for a compiler and useable libraries and i *require* portable code. i also don't know STL and C++ at all, which arguably would have been some help for me i guess ... from what i'm told, but C++ feels like an unbelievable complicated nightmare to me. every time i look at C++ code, i always ask myself ... do programming languages _really_ have to be this complicated anymore ?. in any event, the plugin system for my flight simulator supports pascal, and always had, but i, like many others, knew nothing of Pascal, and i assumed that it was an archaic, non-modern language. in desperation, when i saw a writeup on the 2.0 release of FPC on Slashdot, i decided i needed to take a look, because i was dreading using 'C' for my HOBBYIST development, and figured that maybe the programming i do for *fun* shouldn't suck. i am now having the time of my life with FPC and the rtl,fcl and lcl suite of libraries. besides doing my plugin work with it, i'm starting to do some cross platform GUI development ... AND i've been dabbling with some game programming ... which i've always wanted to play with ... but couldn't get past the learning curve of the 'C'/C++ API's. it is *everything* that Java is, but better. *) awesome, easy to use OO constructs, including properties *) exceptions *) awesome compile/build system (no freakin' Makefiles !) *) an awesome collection of easy to use libraries *) adding libraries/source to your project is as easy/easier than Java *) the ability to integrate with 'C' libraries is dead simple *) the performance of the compiler is awesome *) the executables, executable runtime overhead and application performance are on par with other compiled languages *) multi platform source level compatability with cross compile support as a programming geek, i can't say enough good things. where i had been beating my head against a wall, on and off for years with 'C'/C++ stuff, i was doing wonderfully productive things with FPC in a matter of weeks. probably because of my Java background, i found the FPC environment and mindset intuitive and easy to use. i feel like the hobbyist programmer in me has been reborn AND ... i've actually started to look out into the job market a little, with an eye towards maybe trying to make a jump from being a Java J2EE web application developer to making a jump to doing Pascal development for a day job, if the right opportunity came along. Michael. Tony -- X-SA user ? 0.4 is out ! http://x-plane.dsrts.com http://games.groups.yahoo.com/group/x-plane-foo/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Updated daemon instructions?
I'm trying to implement a deamon using and example I found at: ftp://ftp.cncware.com/pub/fpc/daemon.pp I've of course had to make several changes to support a more recent compiler. Everything compiles fine, and the process forks and dumps directly to the console as expected. However, it's not letting everything go... when I log out of ssh after running it, the session still hangs. I can't launch the daemon from a PHP script (which was the plan) because it causes the apache routine running it to hang. Probably more of an FPC question I guess, but I trust you guys. ;-) Any ideas? -Tony _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] setColor part 3
Hi with current CVS setColor for tSpeedButton don't work DrawFrameControl can draw only rectangle with or without shadow, no other possibilities rest investigation under now i prepare patch for tSpeedButton Why use Frame3D instead of DrawFrameControl ? its simpler, and why one function for drawing for all components, (on other side is used only 3 times toolbutton, speedbutton and checkbutton) SpeedButton is draw near all without widget, Frame3D should be faster and identical on all platforms The buttons look should follow the users theme. They should not look the same on all platforms. With Frame3D we loose the theme background of buttons. I commented this out and kept the old DrawFrameControl. Under tSpeedButton is no background (as I know), all is painting I have similar problem with tPanel and tHeader, but i will investigate in next time A button under gtk1 is an area, not just the frame. Some themes define a simple darkened area when presses, some some define whole images (e.g. round buttons). Maybe gtk2 has more possibilities for TSpeedButton. Interesting are there possibilities, which we can use in all OS, of course we can implement all myself, but we are limited by LCL API, for example now I can't change color of shadow (tButton have not thous properties) I think, that we should implement more flexible widgets, not so dependent from desired library (GTK, WIN, QT) I don't know exactly, but DrawFrameControl can't draw round frame, thats not issue, we have own paint function with caption and glyph, only frame left from widgets I don't know, what windows can do with DrawFrameControl, but under gtk it draws an area in a specific style. If this is a button style, and the theme defines an image, it paints it. If I want (as programmer) to one of buttons will be red, user should'n change it by change theme for tButton all depend from widgets, but for me in tSpeedButton all should be independent. (GTK has't two widgets) Gtk has less widgets, because the idea is combine them. A TGroupbox is a single widget under windows, while under gtk it needs two. For gtk it is pretty normal to put a 'listbox' into a menu. That's why you have more possibilties. A TSpeedButton that is used a button and that draws some rectangles, when all other widgets on the application have shaded round widgets looks very ugly. Especially if you use broken themes, that merely defines images and no colors. DrawFrameControl not avoid this it's only my suggestion What is the trouble with theme painted speedbuttons? it's not work Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] bug in tComboBox
Hi I can't set by mouse item in tComboBox when Style is csDropDownList below is patch (I think: all MouseUp can be removed) Darek PS.Can I comment all EventTrace (or IFDEFs) in gtkcallback.inc, they slowdown running. Index: include/customcombobox.inc === --- include/customcombobox.inc(wersja 8862) +++ include/customcombobox.inc(kopia robocza) @@ -461,8 +461,8 @@ procedure TCustomComboBox.MouseUp(Button: TMouseButton; Shift:TShiftState; X, Y: Integer); begin inherited MouseUp(Button, Shift, X, Y); - if (Style = csDropDownList) then - DroppedDown := not DroppedDown; +// if (Style = csDropDownList) then +// DroppedDown := not DroppedDown; end; _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] setColor part 3
On Fri, 03 Mar 2006 23:10:41 +0100 darekm [EMAIL PROTECTED] wrote: [...] A button under gtk1 is an area, not just the frame. Some themes define a simple darkened area when presses, some some define whole images (e.g. round buttons). Maybe gtk2 has more possibilities for TSpeedButton. Interesting are there possibilities, which we can use in all OS, of course we can implement all myself, but we are limited by LCL API, for example now I can't change color of shadow (tButton have not thous properties) I think, that we should implement more flexible widgets, not so dependent from desired library (GTK, WIN, QT) Yes, but then it will be a TButtonPlus. A normal TButton is the normal button of the theme. [...] I don't know, what windows can do with DrawFrameControl, but under gtk it draws an area in a specific style. If this is a button style, and the theme defines an image, it paints it. If I want (as programmer) to one of buttons will be red, user should'n change it by change theme Correct. But if you want a 'red' button, then you want a custom drawn button, not a TButton. If 'red' buttons are needed that often, then we should add a TCustomDrawnButton (or whatever name fits) with properties like Color, Frame, BorderWidth, TextAlignment, WordWrap, ... . This has five advantages: - the button will really look the same under all platforms - less code in LCL interfaces - better for smartlinking - more flexibility - cleaner design (themed and non themed controls) for tButton all depend from widgets, but for me in tSpeedButton all should be independent. (GTK has't two widgets) Gtk has less widgets, because the idea is combine them. A TGroupbox is a single widget under windows, while under gtk it needs two. For gtk it is pretty normal to put a 'listbox' into a menu. That's why you have more possibilties. A TSpeedButton that is used a button and that draws some rectangles, when all other widgets on the application have shaded round widgets looks very ugly. Especially if you use broken themes, that merely defines images and no colors. DrawFrameControl not avoid this It should. If not, you found a bug. it's only my suggestion What is the trouble with theme painted speedbuttons? it's not work Can you give more details? Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] bug in tComboBox
On Sat, 04 Mar 2006 00:15:58 +0100 darekm [EMAIL PROTECTED] wrote: Hi I can't set by mouse item in tComboBox when Style is csDropDownList below is patch (I think: all MouseUp can be removed) Applied. Thanks. Darek PS.Can I comment all EventTrace (or IFDEFs) in gtkcallback.inc, they slowdown running. Did you test that? How much slower? Mattias Index: include/customcombobox.inc === --- include/customcombobox.inc(wersja 8862) +++ include/customcombobox.inc(kopia robocza) @@ -461,8 +461,8 @@ procedure TCustomComboBox.MouseUp(Button: TMouseButton; Shift:TShiftState; X, Y: Integer); begin inherited MouseUp(Button, Shift, X, Y); - if (Style = csDropDownList) then - DroppedDown := not DroppedDown; +// if (Style = csDropDownList) then +// DroppedDown := not DroppedDown; end; _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] compile lazarus on opensuse 10.0
Any hint? I have /opt/gnome/lib/libgdk-1.2.so.0 . What am i missing? Any help on this, please? Uwe Hi Uwe, For me there are major problems setting up the correct programming/developement environment in OpenSuSe 10.0. I am currently using the OpenSuSE10.0 x86_64 distribution and to me this distribution is crippled. Perhaps you may get the answers to your specific distro questions by asking them in an OpenSuSE forum. Regards John _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Repository access via the HTTP protocol
Hi Michael That seems to have done the trick!! I just tested it from home and it is now busy checking out the Lazarus repository, which it couldn't before on port 80. Monday I will test it from work as well, which is where I use it most. So far so good. Thanks! Regards, - Graeme - On 3/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: Hi, I've let the Apache webserver listen on port 8080 as well. This should hopefully fool proxy servers into believing it's not HTTP, so they pass it through. Could people that had previously problems with HTTP access to SVN on the regular HTTP port, please try http access for SVN with this port, and report on their success ? Just add :8080 to the hostname in the anonymous SubVersion access instructions, and you should be fine. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Object pascal a Modern Language
I belong to a mailing list for a defunt open source chemical process simulator (Sim42). Members of the list are now showing interest in restarting the effort. It was originally written in python which cause some speed issues. Several of the list members (including me) suggested freepascal and lazarus. The gentleman spearheading the effort sent the following and I would like to know what is the best way to respond. I do not know what features define a modern language and would like to know what points to bring up. My personal objective is not just to put out a simulator, but a fast and efficient simulator. Furthermore, personally, I do not consider a program portable if it is written in a language which very few can understand. A modern language such as any of the .NET languages will meet the efficiency objective but portability remains an issue. While I do have the Visual Studio .NET and I am happy with it, I understand that not everybody has it and it is not cheap. I looked at the Lazarus project and (at least at a first glance) it is indeed very Visual and will likely do the job. It will however, limit us to Pascal which is not really a modern language. For those of you who are in favor of using Lazarus, can you assure the rest of us that Pascal has been modernized? Thanks for any help Matt Henley _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [fpc-pascal] Object pascal a Modern Language
On Fri, 3 Mar 2006, Matt Henley wrote: I belong to a mailing list for a defunt open source chemical process simulator (Sim42). Members of the list are now showing interest in restarting the effort. It was originally written in python which cause some speed issues. Several of the list members (including me) suggested freepascal and lazarus. The gentleman spearheading the effort sent the following and I would like to know what is the best way to respond. I do not know what features define a modern language and would like to know what points to bring up. My personal objective is not just to put out a simulator, but a fast and efficient simulator. Furthermore, personally, I do not consider a program portable if it is written in a language which very few can understand. A modern language such as any of the .NET languages will meet the efficiency objective but portability remains an issue. While I do have the Visual Studio .NET and I am happy with it, I understand that not everybody has it and it is not cheap. I looked at the Lazarus project and (at least at a first glance) it is indeed very Visual and will likely do the job. It will however, limit us to Pascal which is not really a modern language. For those of you who are in favor of using Lazarus, can you assure the rest of us that Pascal has been modernized? Most people out there probably think of Pascal as still being in the state it was in when Niklaus Wirth first designed it. Object Pascal to date is fully OOP, and misses nothing that C#, C++ or Java has: Interfaces, Exceptions, Classes: you name it, Object Pascal has it. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] setColor part 3
On Sat, 4 Mar 2006 02:06:46 +0100 Mattias Gaertner [EMAIL PROTECTED] wrote: If I want (as programmer) to one of buttons will be red, user should'n change it by change theme Correct. But if you want a 'red' button, then you want a custom drawn button, not a TButton. If 'red' buttons are needed that often, then we should add a TCustomDrawnButton (or whatever name fits) with properties like Color, TSpeedButton ? Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] setColor part 3
On Sat, 4 Mar 2006 08:06:24 +0100 Micha Nelissen [EMAIL PROTECTED] wrote: On Sat, 4 Mar 2006 02:06:46 +0100 Mattias Gaertner [EMAIL PROTECTED] wrote: If 'red' buttons are needed that often, then we should add a TCustomDrawnButton (or whatever name fits) with properties like Color, TSpeedButton ? I mean we're getting a lot of buttons this way, with mostly redundant (duplicate) code ... :-/ Micha _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives