Re: [lazarus] why sometime TLHTTPClientComponent can not get data?
ik wrote: On Jan 14, 2008 3:59 AM, wfifi [EMAIL PROTECTED] wrote: thanks ido wireshark is a great tool, i attach a log, found data is got, but Component's status not change. I've read your code again (and looked at the log), I noticed this: strstream.WriteString(String(ABuffer)) You are casting a pointer as a string... The way to convert PChar to a string is to use the function StrPas Only if you use shortstrings. When using ansistrings you can cast a PChar in to a string like: String(SomePchar) With ansistrings you seldom (or never) need StrPas Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] why sometime TLHTTPClientComponent can not get data?
Marc Weustink wrote: ik wrote: On Jan 14, 2008 3:59 AM, wfifi [EMAIL PROTECTED] wrote: thanks ido wireshark is a great tool, i attach a log, found data is got, but Component's status not change. I've read your code again (and looked at the log), I noticed this: strstream.WriteString(String(ABuffer)) You are casting a pointer as a string... The way to convert PChar to a string is to use the function StrPas Only if you use shortstrings. When using ansistrings you can cast a PChar in to a string like: String(SomePchar) With ansistrings you seldom (or never) need StrPas What about the length that is stored just before the memory location of ansistrings? Does PChar created with StrAlloc have this field? Luiz _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] why sometime TLHTTPClientComponent can not get data?
On Mon, 14 Jan 2008, Luiz Americo Pereira Camara wrote: Marc Weustink wrote: ik wrote: On Jan 14, 2008 3:59 AM, wfifi [EMAIL PROTECTED] wrote: thanks ido wireshark is a great tool, i attach a log, found data is got, but Component's status not change. I've read your code again (and looked at the log), I noticed this: strstream.WriteString(String(ABuffer)) You are casting a pointer as a string... The way to convert PChar to a string is to use the function StrPas Only if you use shortstrings. When using ansistrings you can cast a PChar in to a string like: String(SomePchar) With ansistrings you seldom (or never) need StrPas What about the length that is stored just before the memory location of ansistrings? Does PChar created with StrAlloc have this field? No. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] why sometime TLHTTPClientComponent can not get data?
Luiz Americo Pereira Camara wrote: Marc Weustink wrote: ik wrote: On Jan 14, 2008 3:59 AM, wfifi [EMAIL PROTECTED] wrote: thanks ido wireshark is a great tool, i attach a log, found data is got, but Component's status not change. I've read your code again (and looked at the log), I noticed this: strstream.WriteString(String(ABuffer)) You are casting a pointer as a string... The way to convert PChar to a string is to use the function StrPas Only if you use shortstrings. When using ansistrings you can cast a PChar in to a string like: String(SomePchar) With ansistrings you seldom (or never) need StrPas What about the length that is stored just before the memory location of ansistrings? Does PChar created with StrAlloc have this field? It is not really a cast. The compiler adds conversion code. Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Compiling 13748 svn snapshot fails
Hi all, compiling 13748 svn version is failing because this error: Compiling gtkwsdialogs.pp Compiling gtkwsextctrls.pp gtkwsextctrls.pp(597,31) Error: Identifier not found gtk_notebook_current_page gtkwsextctrls.pp(717) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[3]: *** [interfaces.ppu] Error 1 make[3]: Leaving directory `/home/antonio/lazarus/lcl/interfaces/gtk' Antonio -- Antonio Sanguigni alias slapshot -- GioveLUG (Linux User Group) - http://www.giovelug.org Edupup (Educational distro) - http://www.edupup.org
Re: [lazarus] Compiling 13748 svn snapshot fails
Am Montag, 14. Januar 2008 13:57 schrieb Antonio Sanguigni: Hi all, compiling 13748 svn version is failing because this error: Compiling gtkwsdialogs.pp Compiling gtkwsextctrls.pp gtkwsextctrls.pp(597,31) Error: Identifier not found gtk_notebook_current_page gtkwsextctrls.pp(717) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[3]: *** [interfaces.ppu] Error 1 make[3]: Leaving directory `/home/antonio/lazarus/lcl/interfaces/gtk' Paul fixed this in 13749, please update. regards Burkhard _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Compiling 13748 svn snapshot fails
Paul fixed this in 13749, please update. Thanks. Antonio -- Antonio Sanguigni alias slapshot -- GioveLUG (Linux User Group) - http://www.giovelug.org Edupup (Educational distro) - http://www.edupup.org
[lazarus] New Docked IDE
I think my last email was loose (big attachment). What do you think of my current (on beta testing) new docked IDE? See it here: http://www.eurekalog.com/DockIDE.png -- Best regards... Fabio Dell'Aria.
Re: [lazarus] New Docked IDE
Very good! Can this be optional? -- Laurent. My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php
Re: [lazarus] New Docked IDE
Fabio Dell'Aria wrote: I have created a little universal Docking unit (all new code). I'm just testing it on GTK2, QT and Win32. Great, did you manage to fix the win32 docking bug? (i have been looking, but was unable to narrow down that problem) Greetings, Marius _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New Docked IDE
I hope to can see it on the official lazarus release (when I'll finish it)! 2008/1/14, wile64 [EMAIL PROTECTED]: Very good! Can this be optional? -- Laurent. My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -- Best regards... Fabio Dell'Aria.
Re: [lazarus] New Docked IDE
Hi, 2008/1/14, Marius [EMAIL PROTECTED]: Fabio Dell'Aria wrote: What do you think of my current (on beta testing) new docked IDE? Looks very nice! On windows or other OS? On all supported OS! :) Generic or specific docking? (via dockmanager?) I have created a little universal Docking unit (all new code). I'm just testing it on GTK2, QT and Win32. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- Best regards... Fabio Dell'Aria.
Re: [lazarus] New Docked IDE
On Jan 14, 2008, at 5:39 PM, Fabio Dell'Aria wrote: Hi, 2008/1/14, Marius [EMAIL PROTECTED]: Fabio Dell'Aria wrote: What do you think of my current (on beta testing) new docked IDE? Looks very nice! On windows or other OS? On all supported OS! :) Generic or specific docking? (via dockmanager?) I have created a little universal Docking unit (all new code). I'm just testing it on GTK2, QT and Win32. Oh I want to test :) -- Damien Gerard [EMAIL PROTECTED] Le temps n'a pas d'importance. Seul le code est important -- (f00ty)
Re: [lazarus] New Docked IDE
Hi, 2008/1/14, Marius [EMAIL PROTECTED]: Fabio Dell'Aria wrote: I have created a little universal Docking unit (all new code). I'm just testing it on GTK2, QT and Win32. Great, did you manage to fix the win32 docking bug? (i have been looking, but was unable to narrow down that problem) Yes, I think to have fixed it (or just found a simple workaround). Fixed it, I have found some other little issues, so I'm still try to fix them before release my final patch. Greetings, Marius _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- Best regards... Fabio Dell'Aria.
Re: [lazarus] New Docked IDE
Very nice Fabio. I hope this will become part of the official release. :-) Fabio Dell'Aria wrote: I think my last email was loose (big attachment). What do you think of my current (on beta testing) new docked IDE? See it here: http://www.eurekalog.com/DockIDE.png http://www.eurekalog.com/DockIDE.png -- Best regards... Fabio Dell'Aria. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New Docked IDE
Hi Andrew, 2008/1/14, Andrew Higgs [EMAIL PROTECTED]: Very nice Fabio. I hope this will become part of the official release. :-) I hope this too! :) Fabio Dell'Aria wrote: I think my last email was loose (big attachment). What do you think of my current (on beta testing) new docked IDE? See it here: http://www.eurekalog.com/DockIDE.png http://www.eurekalog.com/DockIDE.png -- Best regards... Fabio Dell'Aria. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- Best regards... Fabio Dell'Aria.
[lazarus] Freeing runtime components.
Sorry for such a simple question but I'm just getting back to programming (as a hobby). Haven't done much since TP5. Anyway, if I create a component eg TPanel during runtime and set it's owner property to a form, do I have to write code to free the panel or is there already code in the forms destructor to free owned classes? _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New Docked IDE
Hi Damien, 2008/1/14, Damien Gerard [EMAIL PROTECTED]: On Jan 14, 2008, at 5:39 PM, Fabio Dell'Aria wrote: Hi, 2008/1/14, Marius [EMAIL PROTECTED]: Fabio Dell'Aria wrote: What do you think of my current (on beta testing) new docked IDE? Looks very nice! On windows or other OS? On all supported OS! :) Generic or specific docking? (via dockmanager?) I have created a little universal Docking unit (all new code). I'm just testing it on GTK2, QT and Win32. Oh I want to test :) I appreciate your enthusiasm, but before release my patch I want fix some annoying issues (ex: you must close all the opened Editors Tab before close the IDE). Unlucky I have not more times, but I hope to can communicate more news into the week! :) -- Damien Gerard [EMAIL PROTECTED] Le temps n'a pas d'importance. Seul le code est important -- (f00ty) -- Best regards... Fabio Dell'Aria.
Re: [lazarus] Freeing runtime components.
Patrick Shepherd ha scritto: Sorry for such a simple question but I'm just getting back to programming (as a hobby). Haven't done much since TP5. Anyway, if I create a component eg TPanel during runtime and set it's owner property to a form, do I have to write code to free the panel or is there already code in the forms destructor to free owned classes? AFAIK the form destructor takes care freeing all children components. Happy coding, Giuliano -- Giuliano Colla Whenever people agree with me, I always feel I must be wrong (O. Wilde) _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New Docked IDE
On 14/01/2008, Fabio Dell'Aria [EMAIL PROTECTED] wrote: Where I can find it? lazarus/components/editortoolbar/editortoolbar.lpk http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/editortoolbar/?root=lazarus Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New Docked IDE
It looks very nice Fabio! Could you let me know what happens if you install the Editor Toolbar package in Lazarus? Editor Toolbar is a optional installed package included with Lazarus - it creates a toolbar panel above the Editor tabs where you can add any Lazarus IDE menu items at runtime... Someone created a similar docking version of Lazarus, but that broke the Editor Toolbar horribly. Then again, I didn't actually have a look at the supplied patch to see what needs to be fixed. Regards, - Graeme - On 14/01/2008, Fabio Dell'Aria [EMAIL PROTECTED] wrote: I think my last email was loose (big attachment). What do you think of my current (on beta testing) new docked IDE? See it here: http://www.eurekalog.com/DockIDE.png -- Best regards... Fabio Dell'Aria. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New Docked IDE
Hi Graeme, 2008/1/14, Graeme Geldenhuys [EMAIL PROTECTED]: It looks very nice Fabio! Could you let me know what happens if you install the Editor Toolbar package in Lazarus? Editor Toolbar is a optional installed package included with Lazarus - it creates a toolbar panel above the Editor tabs where you can add any Lazarus IDE menu items at runtime... Someone created a similar docking version of Lazarus, but that broke the Editor Toolbar horribly. Then again, I didn't actually have a look at the supplied patch to see what needs to be fixed. Where I can find it? Regards, - Graeme - On 14/01/2008, Fabio Dell'Aria [EMAIL PROTECTED] wrote: I think my last email was loose (big attachment). What do you think of my current (on beta testing) new docked IDE? See it here: http://www.eurekalog.com/DockIDE.png -- Best regards... Fabio Dell'Aria. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- Best regards... Fabio Dell'Aria.
Re: [lazarus] Sockets programming
Marco van de Voort wrote: Any thoughts on how to get select() and associated procedures working? Yes. Use them from baseunix (fpselect fpset* etc). See docs. Thanks, I think I'm slowly getting there. Also fpFD_ZERO() and so on. Under Unix they are not just for sockets, hence they are not in the socket units, but in the general api. I know. Which I presume is why I still haev to use WinSock on Win-32: there simply isn't a direct equivalent to the select() function. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New Docked IDE
Hi Graeme, 2008/1/14, Graeme Geldenhuys [EMAIL PROTECTED]: On 14/01/2008, Fabio Dell'Aria [EMAIL PROTECTED] wrote: Where I can find it? lazarus/components/editortoolbar/editortoolbar.lpk http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/components/editortoolbar/?root=lazarus I hope to can testing it on this week! I'll communicate you any related news! :) Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- Best regards... Fabio Dell'Aria.
Re: [lazarus] why sometime TLHTTPClientComponent can not get data?
Marc Weustink wrote: You are casting a pointer as a string... The way to convert PChar to a string is to use the function StrPas Only if you use shortstrings. When using ansistrings you can cast a PChar in to a string like: String(SomePchar) With ansistrings you seldom (or never) need StrPas What about the length that is stored just before the memory location of ansistrings? Does PChar created with StrAlloc have this field? It is not really a cast. The compiler adds conversion code. I'm interested in this since currently i use StrPas to convert from PChar to AnsiString. Is this (String(PChar)) faster than StrPas? Is safe that will not change to a simple pointer cast in future? Does it copy the string content? Luiz _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] why sometime TLHTTPClientComponent can not get data?
Luiz Americo Pereira Camara wrote: Marc Weustink wrote: You are casting a pointer as a string... The way to convert PChar to a string is to use the function StrPas Only if you use shortstrings. When using ansistrings you can cast a PChar in to a string like: String(SomePchar) With ansistrings you seldom (or never) need StrPas What about the length that is stored just before the memory location of ansistrings? Does PChar created with StrAlloc have this field? It is not really a cast. The compiler adds conversion code. I'm interested in this since currently i use StrPas to convert from PChar to AnsiString. that is not needed. the following app is valid: program a; {$mode objfpc}{$h+} var p: PChar; s: String; begin p := 'abcdef'; s := p; end. PChars will be autoconverted to strings The use of StrPas is from the shortstring times. Is this (String(PChar)) faster than StrPas? lets compale to assembler and comapre: # [10] s := p; leal-48(%ebp),%eax callFPC_ANSISTR_DECR_REF movl$0,-48(%ebp) movlU_P$S_P,%eax callfpc_pchar_to_ansistr movl%eax,-48(%ebp) movl-48(%ebp),%eax callFPC_ANSISTR_INCR_REF movl$U_P$S_A,%eax callFPC_ANSISTR_DECR_REF movl-48(%ebp),%eax movl%eax,U_P$S_A # [11] s := StrPas(p); leal-48(%ebp),%eax callFPC_ANSISTR_DECR_REF movl$0,-48(%ebp) leal-304(%ebp),%edx movlU_P$S_P,%eax callFPC_PCHAR_TO_SHORTSTR leal-304(%ebp),%eax callfpc_shortstr_to_ansistr movl%eax,-48(%ebp) movl-48(%ebp),%eax callFPC_ANSISTR_INCR_REF movl$U_P$S_A,%eax callFPC_ANSISTR_DECR_REF movl-48(%ebp),%eax movl%eax,U_P$S_A You see... with StrPas, the pchar is first converted to a short string. Is safe that will not change to a simple pointer cast in future? This will break compatebility. Does it copy the string content? Yes, its the same code as assigning directly # [12] s := String(p); leal-48(%ebp),%eax callFPC_ANSISTR_DECR_REF movl$0,-48(%ebp) movlU_P$S_P,%eax callfpc_pchar_to_ansistr movl%eax,-48(%ebp) movl-48(%ebp),%eax callFPC_ANSISTR_INCR_REF movl$U_P$S_A,%eax callFPC_ANSISTR_DECR_REF movl-48(%ebp),%eax movl%eax,U_P$S_A Marc _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] why sometime TLHTTPClientComponent can not get data?
Marc Weustink wrote: Luiz Americo Pereira Camara wrote: Marc Weustink wrote: You are casting a pointer as a string... The way to convert PChar to a string is to use the function StrPas Only if you use shortstrings. When using ansistrings you can cast a PChar in to a string like: String(SomePchar) With ansistrings you seldom (or never) need StrPas What about the length that is stored just before the memory location of ansistrings? Does PChar created with StrAlloc have this field? It is not really a cast. The compiler adds conversion code. I'm interested in this since currently i use StrPas to convert from PChar to AnsiString. that is not needed. the following app is valid: program a; {$mode objfpc}{$h+} var p: PChar; s: String; begin p := 'abcdef'; s := p; end. PChars will be autoconverted to strings The use of StrPas is from the shortstring times. Is this (String(PChar)) faster than StrPas? lets compale to assembler and comapre: # [10] s := p; leal-48(%ebp),%eax callFPC_ANSISTR_DECR_REF movl$0,-48(%ebp) movlU_P$S_P,%eax callfpc_pchar_to_ansistr movl%eax,-48(%ebp) movl-48(%ebp),%eax callFPC_ANSISTR_INCR_REF movl$U_P$S_A,%eax callFPC_ANSISTR_DECR_REF movl-48(%ebp),%eax movl%eax,U_P$S_A # [11] s := StrPas(p); leal-48(%ebp),%eax callFPC_ANSISTR_DECR_REF movl$0,-48(%ebp) leal-304(%ebp),%edx movlU_P$S_P,%eax callFPC_PCHAR_TO_SHORTSTR leal-304(%ebp),%eax callfpc_shortstr_to_ansistr movl%eax,-48(%ebp) movl-48(%ebp),%eax callFPC_ANSISTR_INCR_REF movl$U_P$S_A,%eax callFPC_ANSISTR_DECR_REF movl-48(%ebp),%eax movl%eax,U_P$S_A You see... with StrPas, the pchar is first converted to a short string. Is safe that will not change to a simple pointer cast in future? This will break compatebility. Does it copy the string content? Yes, its the same code as assigning directly # [12] s := String(p); leal-48(%ebp),%eax callFPC_ANSISTR_DECR_REF movl$0,-48(%ebp) movlU_P$S_P,%eax callfpc_pchar_to_ansistr movl%eax,-48(%ebp) movl-48(%ebp),%eax callFPC_ANSISTR_INCR_REF movl$U_P$S_A,%eax callFPC_ANSISTR_DECR_REF movl-48(%ebp),%eax movl%eax,U_P$S_A Thanks. This info is useful Luiz _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New Docked IDE
Fabio Dell'Aria wrote: I think my last email was loose (big attachment). What do you think of my current (on beta testing) new docked IDE? See it here: http://www.eurekalog.com/DockIDE.png http://www.eurekalog.com/DockIDE.png Looks good, but I see you implementing your own classes instead of compliting existing. Please look at LDockTree unit. DockSites already can draw their header and splitter is inserted between controls. We'll benifit all if we complete common classes insted of create our own. Currently Marius, Mattias and me working on docking in existing lcl units: LDockTree.pas, dockmanager.inc. Best regards, Paul Ishenin. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives