[lazarus] Console app problems
Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates with the console application over stndin and stdout. The problem that I'm having is that when I send a command using WriteLn, the command doesn't return as it should so I'm wonder if FP/Laz handles stdin/stdout in some way that I am not familiar with. Is the data written to WriteLn buffered or sent immediately? Below is a sample of the code I am trying. // Asterisk sends environmental vars at the start of the app // over stdin. When it's finished it sends a blank line. Repeat; begin ReadLn(sRead); if (pos('uniqueid', sRead) 0) then sUniqueID := sRead; end; until (sRead = ''); // -// // Parameters Passed to app from Asterisk // -// // 1=DataToPlay, 2 = VoiceToUse sData := paramstr(1); sVoice := ParamStr(2); // which voice to use? If none specified use the default if (FileExists(sData)) then begin // assume it's path to a text file. Build Cmd line accordingly. sCmd := sExePath + '/swift -f ' + sData + ' -o /tmp/' + sUniqueID + '.wav'; sCmd := sCmd + '-p ' + sParams; end else begin // assume that we are synthesizing the actual text provided in parameter to app sCmd := sExePath + '/swift -o /tmp/' + sUniqueID + '.wav'; sCmd := sCmd + ' -p ' + sParams + ' '+ sData + ''; end; Proc := TProcess.create(nil); try // Send command and write to file Proc.CommandLine := sCmd; Proc.Options := Proc.Options + [poWaitOnExit]; Proc.Execute; // Write out command to play file to Asterisk over stdout WriteLn('PLAYBACK /tmp/' + sUnique); ReadLn(sCmd); // = Gets stuck here. Does not return. // finally, delete the file Proc.Active := false; Proc.CommandLine := 'rm -f /tmp/' + agi.UniqueID + '.wav'; Proc.Execute; finally; Proc.free; end; Thanks, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
ik wrote: On 12/30/06, Lee Jenkins [EMAIL PROTECTED] wrote: Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates with the console application over stndin and stdout. Sorry for the question, but are you on the right library to use AGI ? Sorry, I'm not sure I understand your question. If you mean, am I writing to the correct list, then yes. I just want to be sure that I understand the mechanics of stdin/stdout within a console app. I've only written GUI apps mostly. If you mean, am I using the right comiler/tool, then yes. Asterisk communicates with any program over stdin/stdout from what I understand and reading the asterisk wiki. I've actually written a couple of AGI programs in C#/Mono, but didn't like the extra setup required for the mono runtime. The problem that I'm having is that when I send a command using WriteLn, the command doesn't return as it should so I'm wonder if FP/Laz handles stdin/stdout in some way that I am not familiar with. As far as I know (I will know more in this week btw :)), you should also check STDERR. I will. Is the data written to WriteLn buffered or sent immediately? Below is a sample of the code I am trying. It always buffered. Please take a look at http://www.freepascal.org/docs-html/rtl/system/settextbuf.html It also appears that a standard Writeln automatically issues a flush() command anyway: http://www.freepascal.org/docs-html/rtl/system/flush.html Ido Thanks for responding. It appears the problem may very well be between the back of my chair and the keyboard. I will start again with a very basic program and work myself up from there to find out where I am going wrong. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
ik wrote: Nop, I meant that does your program is located in the right location to use AGI (I still learn Asterisk, so I'm not sure that my question is correct) :) I'm sure you use the best programming language in the list you gave :D Good News! First, I have fixed it (or worked around) and will share my finding on a separated post to this thread. Do you mean where the file is located on the linux box? It's in /var/lib/asterisk/agi-bin. As I mentioned, I actually wrote a couple agi's using Mono and C#, but didn't like having to setup mono and then you had to associate exe files with binfmt and such, it was not something I wanted. I use delphi a lot in windows and I love the pascal language so much, easy like vb, but strong like C! So you can see my motive in getting things to work with fp/laz. Good luck, and if you can please share your sources :) Indeed. I have actually ported the MONOTONE.cs class written by Gabriel Gunderson (link below) to a pascal object class. I was just starting to test it for bugs when I got bogged down with my current problem. http://gundy.org/asterisk/MONO-TONE-0.02.cs.txt -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
Lee Jenkins wrote: Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates with the console application over stndin and stdout. Hi all, after trying a number of different ways to get this to work, I have found a way. For some reason, it does not appear to me that using standard Writeln() to send commands to Asterisk are ignored for some reason, even when appending #10 or #13#10 or #13 to the end. At any rate, following the example here: http://www.freepascal.org/docs-html/rtl/system/flush.html I create explicit file associate with stdout: var F: Text; sRead, sRet: string; begin repeat; begin Readln(sRead); // other assign values as needed end; until (sRead = ''); Assign(F,''); Rewrite(F); Write('NOOP Here is some sample output to CLI' + #10); Flush(F); ReadLn(sRet); Close(f); end; One thing that I ran across was that if I also tried to ReadLn using the explicit F file, I got an AV. So it seems (at least for me and my particular setup) that ReadLn reads ok with Asterisk, but an explicit control over stdout must be used with explicit flush()'s to ensure that Asterisk gets the ouputted command. Keep in mind that I am not debugging my app in real time. I'm compiling it on a VMWare linux image on my windows box and then copying it over to my asterisk linux box. Just been using a lot of file logging to see what's going on under the hood when the app runs. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
ik wrote: Good luck, and if you can please share your sources :) Please find attached a simple unit to use for now. I will be finishing the more robust version in a few days (weeks?) as time permits. -- Warm Regards, Lee {** This is a simple class to communicate with Asterisk. insert Legag crap about not being responsible for you using this code. Needless to say, I am not responsible. Distribute and use as you like. **} unit simplepasagi; {$mode objfpc}{$H+} interface uses Classes, SysUtils; type { TSimpleAGI } TSimpleAGI = class(TObject) private FAccountCode: string; FCallerID: string; FCallerIDName: string; FCallingANI2: string; FCallingPres: string; FCallingTNS: string; FCallingTON: string; FChannel: string; FChannelType: string; FCONTEXT: string; FDNID: string; FEnhanced: string; FEXTENSION: string; FLanguage: string; FPriority: integer; FRDNIS: string; FRequest: string; FUniqueID: string; procedure SetAccountCode(const AValue: string); procedure SetCallerID(const AValue: string); procedure SetCallerIDName(const AValue: string); procedure SetCallingANI2(const AValue: string); procedure SetCallingPres(const AValue: string); procedure SetCallingTNS(const AValue: string); procedure SetCallingTON(const AValue: string); procedure SetChannel(const AValue: string); procedure SetChannelType(const AValue: string); procedure SetCONTEXT(const AValue: string); procedure SetDNID(const AValue: string); procedure SetEnhanced(const AValue: string); procedure SetEXTENSION(const AValue: string); procedure SetLanguage(const AValue: string); procedure SetPriority(const AValue: integer); procedure SetRDNIS(const AValue: string); procedure SetRequest(const AValue: string); procedure SetUniqueID(const AValue: string); {** Methods - Private *} {** Retrieves initial vars sent from Asterisk **} procedure InitEnvVars; {** Process single initial variable and assign value appropriate class member **} Function ProcessSingleVar(aVar: string): boolean; public {** Properties - Public *} property Request: string read FRequest write SetRequest; property Channel: string read FChannel write SetChannel; property Language: string read FLanguage write SetLanguage; property ChannelType: string read FChannelType write SetChannelType; property UniqueID: string read FUniqueID write SetUniqueID; property CallerID: string read FCallerID write SetCallerID; property CallerIDName: string read FCallerIDName write SetCallerIDName; property CallingPres: string read FCallingPres write SetCallingPres; property CallingANI2: string read FCallingANI2 write SetCallingANI2; property CallingTON: string read FCallingTON write SetCallingTON; property CallingTNS: string read FCallingTNS write SetCallingTNS; property DNID: string read FDNID write SetDNID; property RDNIS: string read FRDNIS write SetRDNIS; property CONTEXT: string read FCONTEXT write SetCONTEXT; property EXTENSION: string read FEXTENSION write SetEXTENSION; property Priority: integer read FPriority write SetPriority; property Enhanced: string read FEnhanced write SetEnhanced; property AccountCode: string read FAccountCode write SetAccountCode; {** Constructors/Destructors *} Constructor Create; {** Methods - Public *} Function SendAstCommand(aCmd: string): string; virtual; overload; Function SendAstCommand(aCmd: string; var AResponse: string): boolean; virtual; overload; end; implementation { TSimpleAGI } procedure TSimpleAGI.SetAccountCode(const AValue: string); begin if FAccountCode=AValue then exit; FAccountCode:=AValue; end; procedure TSimpleAGI.SetCallerID(const AValue: string); begin if FCallerID=AValue then exit; FCallerID:=AValue; end; procedure TSimpleAGI.SetCallerIDName(const AValue: string); begin if FCallerIDName=AValue then exit; FCallerIDName:=AValue; end; procedure TSimpleAGI.SetCallingANI2(const AValue: string); begin if FCallingANI2=AValue then exit; FCallingANI2:=AValue; end; procedure TSimpleAGI.SetCallingPres(const AValue: string); begin if FCallingPres=AValue then exit; FCallingPres:=AValue; end; procedure TSimpleAGI.SetCallingTNS(const AValue: string); begin if FCallingTNS=AValue then exit; FCallingTNS:=AValue; end; procedure TSimpleAGI.SetCallingTON(const AValue: string); begin if FCallingTON=AValue then exit; FCallingTON:=AValue; end; procedure
Re: [lazarus] Console app problems
ik wrote: repeat; begin ReadLn(sRead); bDone := self.ProcessSingleVar(sRead); end; until (bDone); LOL. Just makes it more readable for me. When I have to come back to some code later on (6 month, 1 year from now) I want to be as easy to sift through as possible. A little extra effort up front allows me to be a bit more lazy later on! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
Micha Nelissen wrote: Lee Jenkins wrote: repeat; begin ReadLn(sRead); bDone := self.ProcessSingleVar(sRead); end; until (bDone); LOL. Just makes it more readable for me. When I have to come back to The above is more readable than the following to you ? (Just asking) repeat ReadLn(sRead); bDone := self.ProcessSingleVar(sRead); until bDone; - no semicolon after repeat - no begin/end pair within repeat/until - no parenthesis needed for simple expression after until. Micha Either one, actually. The first is just the way that I started using pascal (delphi) and it stuck. You may remove the extraneous lines if they offend you ;) Also, a lot of people will using this: For i := 0 to 99 do begin // some stuff end; While I prefer For i := 0 to 99 do begin // do some stuff end; Of course, I am self taught. You see, the only thing that kept me out of college was high school. :-p -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
Darius Blaszijk wrote: Hi Lee, I was following this thread with great interest. Is there somewhere a description how communication is defined in pbx? What commands are used and how are they structured? I personally don't know anything about asterisk but I am interested in this way of communicating between two apps. Darius Everything and anything Asterisk related. http://www.voip-info.org In answer to your question, maybe through pipes? You could probably use TProcess too, no? http://wiki.lazarus.freepascal.org/Executing_External_Programs#An_Improved_Example HIH, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
Christian Iversen wrote: I much prefer for X := 0 to 99 do begin FooStuff(); end; Hmm. That's nice too. I used to Capitalize keywords too, but I've never only capitalized the first keyword in a block - that's pretty obscure to me :) I'm a big camel case kind of guy. I LikeToQuicklyUnderstand a line of text or variable name. In Delphi, I use GExperts that will will captialize your keywords/vars for you. Define it as MyVar and write myvar and as soon as you spacebar away from the word, tada! With Laz, I have to type that camel case every instance, so I've been playing with a javaCase type syntax lately. https://technetium.dk/cgi-bin/trac.cgi/wiki/Tc/CodingStyle It's not done yet, but perhaps someone will be inspired by it, or offer critique :) Very nice. I am a one man band, however. It's just me working out of my home office with resellers and distributors that do everything. Pay no attention to the man behind the curtain, so to speak ;) Unfortunately, I am the only programmer here and only interact with others of my ilk on the net. I met a delphi programmer once in a coffee shop. Poor guy, I talked his ear off for 45 minutes I am only flesh and blood. Sometimes I too need to talk about OOP or a recursive algorithm with someone! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
Christian Iversen wrote: On Sunday 31 December 2006 01:51, Lee Jenkins wrote: Christian Iversen wrote: I much prefer for X := 0 to 99 do begin FooStuff(); end; Hmm. That's nice too. Naturally it's a matter of taste, but I really cannot get used to the indenting of begin-end. It just looks wierd to me, even after all these years. It's something like for (int x = 0; x 99; x++) { FooStuff(); } Doesn't that look odd, too? This is exactly the way that I format those blocks in C#! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Console app problems
Micha Nelissen wrote: And without braces ? Like: for (int x = 0; x 99; x++) FooStuff(); ? Or FooStuff indented 2 more spaces ? Micha The indentation. Lee -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Rebuilding IDE with sqlite3 support
I keep getting a error: Error: Unable to open file 'clean' When trying to rebuild the ide. Do I have to reinstall from source to rebuild new lpk packages into the IDE? I tried installing from source originally, but had a mess of problems with the IDE not finding any packages, etc so I settled on installing from RPM. Do I have to install from source to rebuild? I assumed that some sources were distributed via RPM in order to be able to rebuild packages into the IDE. Thanks for any help, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Rebuilding IDE with sqlite3 support
Marco van de Voort wrote: On Wed, Jan 03, 2007 at 12:59:40AM -0500, Lee Jenkins wrote: I keep getting a error: Error: Unable to open file 'clean' Sounds like missing (or not properly entered) make. Check your settings in under environment - environment options Thanks for responding (all). Note that I am fairly new to Linux. I have uninstalled fpcsrc, fpc and lazarus using yum. I then went through and searched for errant files and deleted those that were obviously fpc/laz related. Couple I found, I wasn't sure about... I then reinstalled RPM's. Running fpc/laz on CentOS4.4, I have the following from: Environment Environment Options -- Files: Lazarus directory: /usr/lib/lazarus/ Compiler path: /usr/bin/ppc386 FPC source directory: /usr/share/fpcsrc/ Make path: /usr/bin/fpcmake Directory for building test project: /tmp/ I can create a new project and compile it ok so the basic settings for locating the fpc compiler seem to be ok. But, if I go to Tools Build Lazarus and say yes, I immediately get: Error: Unable to open file clean. I did a search and the only relevant file I found was clean.bat which looks like a dos batch file. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Rebuilding IDE with sqlite3 support
Vincent Snijders wrote: Lee Jenkins schreef: Make path: /usr/bin/fpcmake This is wrong. It should be something like /usr/bin/make or (doubtful) /usr/bin/gmake. Perfect! Thanks for catching that. The only problem now is that although it looks like it's re-compiling the IDE, the component (sqlite) doesn't show on the palette after building. As a matter of the fact, the sqldblaz tab is gone too! Maybe I'll just try to use the sqlite3 stuff through using the units directly... I would like to figure out why this isn't installing the components though... -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Rebuilding IDE with sqlite3 support
Lee Jenkins wrote: After some initial setbacks, I was able to get the IDE build to happen, the results are still frustrating. Aside from the components that are required by the IDE, nothing will install onto the palette. I would just use the units of in my projects, but I get all kinds of errors there too. I've been going at this thing pretty steady since last night and I am worse off than I was before because now I have no SQLDB component either. I'm stuck at this point unfortunately. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] SQLDB TIBConnection
After not getting the sqlite components to install or be usable from a lazarus project through reference to the units, I on to try the SQLDB ibconnection component now. Has anyone else had any luck with these components? I'm trying to use them and I get an exception about not being able to access the libgds.so or libfbclient.so. I've worked with FB quite a bit with windows/delphi and I was always able to put the client libraries in the same directory as the application without problems. I have tried doing that with lazarus as well, but keep getting the error that I mentioned above. I checked and there are what appear to be valid symlinks to those libraries in the usr/lib directory as well. I have also placed a copy of the libraries named as each of those mentioned above in the app's directory as well without any success. I am beginning to feel that there is an unseen force that does not want to have any database access from lazarus ;0) Thanks for any help. I'm going to go drink for a while I think. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Rebuilding IDE with sqlite3 support
Algis Kabaila wrote: On Thursday 04 January 2007 05:27, Mattias Gaertner wrote: On Wed, 03 Jan 2007 13:14:34 -0500 I'm stuck at this point unfortunately. The simplest way is to not install the lazarus rpm, but to download the tgz and uncompress it to a directory (e.g. /home/username/lazarus) or get the source via svn. http://wiki.lazarus.freepascal.org/Installing_Lazarus#Downloading_Lazarus_S VN Mattias Unfortunately, I have given up on using the sqlite components. I just can't afford to spend days trying to get it to work. I thought I might use the SQLDB stuff for firebirdsql instead and that is not working for me either as of yet. Hopefully I'll have better luck with those however. But thanks again for your response. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLDB TIBConnection
Lee Jenkins wrote: After not getting the sqlite components to install or be usable from a lazarus project through reference to the units, I on to try the SQLDB ibconnection component now. Has anyone else had any luck with these components? I'm trying to use them and I get an exception about not being able to access the libgds.so or libfbclient.so. I just tried installing UIB components and while there was no error, there is no components on the palette for them either. I *really* don't want this to sound the right way, but is it even possible to install non-default components on in the IDE on linux? -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLDB TIBConnection
Kevin hayton wrote: I have just installed UIB components and there are components on the palette. Using MEPIS 6.0 and lazarus 0.9.20 beta. Just downloaded the latest UIB extracted to /usr/share/lazarus/components and installed the .lpk in /source. Man, that is so odd. I did essentially the same thing except all my stuff was installed in /usr/lib/lazarus/coponents. Same thing with lpk. And everything looked like it compiled fine too, at least no visible errors that I could see. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLDB TIBConnection
Joost van der Sluis wrote: On Wed, 2007-01-03 at 21:15 -0500, Lee Jenkins wrote: Kevin hayton wrote: I have just installed UIB components and there are components on the palette. Using MEPIS 6.0 and lazarus 0.9.20 beta. Just downloaded the latest UIB extracted to /usr/share/lazarus/components and installed the .lpk in /source. Man, that is so odd. I did essentially the same thing except all my stuff was installed in /usr/lib/lazarus/coponents. Same thing with lpk. Ergo: you've installed lazarus TWICE. You were installing in one of them, but you started the other one. No, I installed twice, but the second time only after uninstalling the first. I don't have two separate installations. (one in /usr/lib/lazarus, and one in /usr/lib/shared) The only installation that I have is in /usr/lib/lazarus. There is no /usr/lib/shared directory, et al or even as I think you mean, /usr/share/lazarus either. Next question is: which distro do you use? If it's FC, you probably installed the rpm provided by fedora, which installs in /usr/lib/lazarus. But the rpm you can download on the lazarus website installs to /usr/shared/lazarus I am using CentOS4.4 and I installed the following from sourceforge: fpc-2.0.40-i586.rpm fpc-src-2.0.4-0.i386.rpm lazarus-0.9.0.20-0.i386.rpm And everything looked like it compiled fine too, at least no visible errors that I could see. I still find it stranghe, though, that he can't find the firebird- client-library. But I think you've installed something else wrongly.. Yes, very strange. As I mentioned in another thread, I am pretty new to linux so I wasn't sure what the behavior of shared objects (dll's) would be. It just made sense that the components would look first in the application directory, but is not finding them. I even tried putting copies where I thought it might look for them such as /bin, /usr/bin, /usr/lib, etc. and still no love. Thanks for replying! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLDB TIBConnection
Lee Jenkins wrote: I have tried to almost two days straight, ignoring just about everything else in my business to get some kind of workable database access through Lazarus without any success. This morning, I even tried installing from source and that seemed to go OK except for the fact that I still cannot install any non-default components into the IDE. The IBConnection components don't recognize the .so libraries for firebird. I cannot install UIB. At this point I am all out of ideas and patience. * Reinstall from rpm again? * Rebuild source again? * Install from source again? * Try to reinstall components that will not install again? -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLDB TIBConnection
Lee Jenkins wrote: Lee Jenkins wrote: I have tried to almost two days straight, ignoring just about everything else in my business to get some kind of workable database access through Lazarus without any success. This morning, I even tried installing from source and that seemed to go OK except for the fact that I still cannot install any non-default components into the IDE. The IBConnection components don't recognize the .so libraries for firebird. I cannot install UIB. At this point I am all out of ideas and patience. * Reinstall from rpm again? * Rebuild source again? * Install from source again? * Try to reinstall components that will not install again? Oh, and I forgot, thanks to everyone for their time and patience ;) I'm just a bit frustrated right now, lol. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Re: SQLDB TIBConnection
Funky Beast wrote: Hi, You might want to try finding all instances of lazarus executable in your entire system with a file manager started as root, by searching from '/' directory with 'include subfolder' options. Try them one by one and maybe you might find one that has the components that you installed. If you do find it, you'll at least know where your compiled lazarus executable went. If not, then its a bizarre bug. (I have all SQLDB components on my component palette.) Another option is to specify where you want your compiled lazarus executable to end up by specifying a target directory in Tools-Configure Build Lazarus, and rebuild lazarus. Nice. At least I have something else to try. I will try the first suggestion first and then if that doesn't turn up anything, I will try the second. I will post back. Thanks for the help. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLDB sql connection on wince
[EMAIL PROTECTED] wrote: Hi. Did someone know if it is possible to use SQLdb to connect to a mysql server through tcp/ip with wince? Actually, vincent is trying to make lnet libs work on wince but even if he have success that's not enough for me, i need to get some data from a database... I had to do something similar a while back, but with .net. No firebird drivers at the time for pocketpc framework so I ended up writing a middleware based on xml request/response to the database. Just an idea if you don't find anything else... -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Re: SQLDB TIBConnection
Funky Beast wrote: Lee Jenkins wrote: Lee Jenkins wrote: Lee Jenkins wrote: I have tried to almost two days straight, ignoring just about everything else in my business to get some kind of workable database access through Lazarus without any success. This morning, I even tried installing from source and that seemed to go OK except for the fact that I still cannot install any non-default components into the IDE. The IBConnection components don't recognize the .so libraries for firebird. I cannot install UIB. At this point I am all out of ideas and patience. * Reinstall from rpm again? * Rebuild source again? * Install from source again? * Try to reinstall components that will not install again? Oh, and I forgot, thanks to everyone for their time and patience ;) I'm just a bit frustrated right now, lol. Hi, You might want to try finding all instances of lazarus executable in your entire system with a file manager started as root, by searching from '/' directory with 'include subfolder' options. Try them one by one and maybe you might find one that has the components that you installed. If you do find it, you'll at least know where your compiled lazarus executable went. If not, then its a bizarre bug. (I have all SQLDB components on my component palette.) Another option is to specify where you want your compiled lazarus executable to end up by specifying a target directory in Tools-Configure Build Lazarus, and rebuild lazarus. I did a search as root and I didn't see multiple instances of lazarus, except for what I think were symlinks and I had a bit of trouble getting rid of them. Had to actually click on them and let the os decide they were no longer valid and I chose to remove them when asked. I tried then rebuilding laz with uib, but then when trying to restart lazarus, I got the error about trying to start threads before they are initialized. I've seen this before when I was writing my first app with laz, a tcp server. My guess is that its a problem with one or more units in UIB without an {IFDEF} around a ctthreads inclusion. I will try and download UIB latest version (6?) and try that. Meanwhile, I'm reinstalling laz from source again, LOL. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Re: SQLDB TIBConnection
Funky Beast wrote: You might want to try finding all instances of lazarus executable in your entire system with a file manager started as root, by searching from '/' directory with 'include subfolder' options. Try them one by one and maybe you might find one that has the components that you installed. If you do find it, you'll at least know where your compiled lazarus executable went. If not, then its a bizarre bug. (I have all SQLDB components on my component palette.) Another option is to specify where you want your compiled lazarus executable to end up by specifying a target directory in Tools-Configure Build Lazarus, and rebuild lazarus. Woohoo! That worked. I think changing the build path did it, although I'm not sure. I set the build path and then went immediately about trying to install the UIB components when I received the cthreads error when trying to start lazarus after a rebuild. Inside lazarus.pas is this definition in uses clause: {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} I haven't play much with include files, even with delphi other than to change some compile settings for rxlib or such. I'm assuming there is an include file in there somewhere where I can define specifically to use cthreads unit. To test, I just removed the inner UseCThreads $IFDEF and I compiled and with jvUIB components on the palette! Anyone know which file that is defined in or what a better way of switching this would be? I hate to change the lazarus.pp file permanently. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SQLDB TIBConnection
Lee Jenkins wrote: After not getting the sqlite components to install or be usable from a lazarus project through reference to the units, I on to try the SQLDB ibconnection component now. Just so that it will be archived, I wanted to post the resolution to the original issue I had and the reason for this post. I was unable to using firebirdsql related components because they complained they they could not load the appropriate library (libfbclient.so). Hopefully someone who is wondering why firebird related components cannot load the libfbclient.so library will find this. The text of the post is listed below. Installing compat-libstdc++-33 fixed the problem on my CentOS 4 box. -- Warm Regards, Lee Installing from the rpm, no programs can run because they say that client libraries cannot be loaded. I poked around after reading over the release notes and I see the libraries there in /opt/firebird/lib with links to them in /usr/lib. I'm trying to connect from lazarus (latest builds) using uib and even if I point the component directly to the libfbclient.so link in /usr/lib, I get the same thing. I also tried running isql which threw an exception saying that libstdc++.so.5 could be opened No such file or directory. The installation with the rpm seemd to go fine, no errors or mention of missing dependencies, etc. I've worked with fb on windows quite a bit, but I'm just cutting my teeth on linux so any pointers would be appreciated. I don't know which packages are required by CentOS, but this is a common issue: you need a C++ library compatibility package. compat-libstdc++-8 (Fedora Core 3) compat-libstdc++-33 (Fedora Core 5; Red Hat Enterprise Linux 4) This should fix it. Steve _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Re: SQLDB TIBConnection
Funky Beast wrote: Anyone know which file that is defined in or what a better way of switching this would be? I hate to change the lazarus.pp file permanently. You might find useful information here: http://wiki.lazarus.freepascal.org/Lazarus_Faq#Lazarus_crashes_with_runtime_error_211_after_I_installed_a_component Excellent. That wiki is deceptively fruitful. A quick search could have saved me about 30 minutes poking around in the source. I originally throught that the UIB component source didn't have cthreads declared correctly and looked around there for a bit. Luckily I was to run lazarus out of a term window and saw the dump when laz couldn't start indicating the cthreads error in lazarus.pp. Thanks for the link and the help. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] TSdfDataset
Hi all, Anyone use the TSdfDataset? I'm trying to figure out the schema syntax for the schema property, but can't find anything substantial. The wiki had mention the component itself, but nothing else that I could see. Thanks! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus compilation speed
Howard Lee Harkness wrote: I had already seen that, and no, it doesn't answer my real question. It indicates that it is possible to do what I want, but I either the component I was trying isn't the right one, or I don't know how to set up the schema. Or both. Were you trying one of the text based database components? If so, I'm am curious about this as well. I posted a query about it a few days ago. No answers :( -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] illegal qualifier problem arose to a newbie
Sönmez Kartal wrote: Hello, I am new to Lazarus. I have a book named Mastering Delphi 7 by Marco Cantu. I got an error when I tried to compile an example. procedure TDateForm.FormCreate(Sender: TObject); begin TheDay := TDate.Create(); TheDay.SetValue(2007,1,13); end; What not something like this? procedure TDateForm.FormCreate(sender: TObject); begin TheDay := EncodeDate(2007,1,13); end; This is assuming that the TheDay var is declared in the form where it is accessible. This may help as well: http://www.taoyue.com/tutorials/pascal/contents.html http://packetstormsecurity.nl/programming-tutorials/Pascal/pascal-tutorial/paslist.htm -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Making calls to External Programs
[EMAIL PROTECTED] wrote: Hi, I need to clean up the /tmp folder and erase various files and directories that my App has created there. Using Linux, can I call bash from within my App to 'rmdir'? Davec, Check out this link: http://wiki.lazarus.freepascal.org/Executing_External_Programs -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Compiled Linuxy Binary Compatibility/A bit (OT)
Hi all, I have a question about binary compatibility for linux programs that I write in Lazarus/Freepascal. I've done some googling, but am still unsure as to the answer to my question. Namely, if I do not provide source to a program, but still want to distribute it, can I compile the binary on a specific platform and run it on another without re-compiling? For instance, can I compile on a i686 box and run the binary on a 586 box as it is, compiled for 32bit? Or can I 32 bit binary run on a 64 bit linux? Sorry, I know it's a bit OT. Thank you. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Compiled Linuxy Binary Compatibility/A bit (OT)
Albert Zeyer wrote: Hi There are severeal parts you should seperate: Firstly, all the hardware-stuff: Thanks Albert. So it seems that if I do not distribute the source of a program, than I will have to compile binaries for at least a couple of different distributions and/or cpu's. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Compiled Linuxy Binary Compatibility/A bit (OT)
Michael Van Canneyt wrote: If you don't use hand-coded assembler, it should be enough to compile your program for i386 and AMD64. That should cover most distributions out there. The compiler by default outputs code which can be run on almost any machine. Thanks very much for responding. Remembering that I am still pretty new to linux when I ask; is there options to compile to different platforms from Lazarus? Or (more likely) I have to setup a box or VMWare images for each platform I want to target and compile the binary there? Dumb question, I know. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Compiled Linuxy Binary Compatibility/A bit (OT)
Michael Van Canneyt wrote: If you have only i386, then you can cross-compile for AMD64, but then you'll need all libraries for an AMD64 system somewhere where the linker can find them, plus a cross-compiler. There is a FAQ on how to create a cross compiler (don't have the link handy now...) Excellent. Looks like I have another project on for this weekend. Thanks again for your help. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Compiled Linuxy Binary Compatibility/A bit (OT)
Albert Zeyer wrote: As Michael said, you can cover a very huge range of systems if you distribute an i386 and AMD64 version. (But you should have in mind, that there are also some people with other architectures...) Most closed-source applications for Linux are only available for these (for example Google Earth and others), Opera for example still also provides a version for PPC. (I, as a Linux/PPC user, am a little bit frustaded about the situation, that I cannot use Flash, Google Earth, official ATI drivers, ...) Ouch. That hurts. If you distribute a Windows application, you normaly also only distribute a i386 version of it. Yes. Very convenient. But as an Open Source developer, I surely recommend you to distribute the source. :) And you are right: Only if you distribute the source, you can ensure, that your application will run nearly everywhere. This particular piece of software is a simple xml based TCP server written in Laz/FP for a Windows client software so I have no problem with providing the source. Personally, I just don't think it would be very convenient to customers to have to download the FP compiler and compile the software. Maybe binaries by default with access to the source if they want it...this way a large majority of linux users could use the binary as is, but users with less prevelant distros would still be ok, if a little more inconvienced. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Compiled Linuxy Binary Compatibility/A bit (OT)
Michael Van Canneyt wrote: If you have only i386, then you can cross-compile for AMD64, but then you'll need all libraries for an AMD64 system somewhere where the linker can find them, plus a cross-compiler. There is a FAQ on how to create a cross compiler (don't have the link handy now...) Michael, I think this is probably the article you were talking about. http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Linux A bread crumb for anyone needing the same information in the future. Thanks again, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus]
Marco van de Voort wrote: On Tue, Jan 30, 2007 at 09:18:17AM -0200, Ar? Ricardo Ody wrote: As I have troubles to remember the TAR functios and options I'm trying to develop a graphical front end to run it. Then I need to select files and/or directories from a visual dialog. 2.1.1 has unit libtar, and internal TAR (and gzip already existed). There are demoes in the fpc/fcl/tests/tarmaker* Nice. I'll have a look at those too! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] how to add a package via commandline
Burkhard Carstens wrote: Am Mittwoch, 31. Januar 2007 19:29 schrieb Mattias Gaertner: On Wed, 31 Jan 2007 16:39:42 +0100 Burkhard Carstens [EMAIL PROTECTED] wrote: Am Donnerstag, 18. Januar 2007 19:43 schrieb Mattias Gaertner: On Thu, 18 Jan 2007 18:35:46 +0100 Burkhard Carstens [EMAIL PROTECTED] wrote: I'd like to build a lazarus rpm containing all the components, I need (BigIDE + indy, glscene). Before diving into the rpm building trouble, I first try to figure out, how I could install a package into lazarus without using the ide. With lazbuild, I can compile the package, which is fine. But how can I recompile lazarus to include the package? Do I have to deal with idemake.cfg and staticpackages.inc manually? For my special needs, I could of course create the correct files and do a make ide -w OPT=@/etc/lazarus/idemake.cfg but a commandline tool (or switch for lazbuild), that enables installation/uninstallation of packages would be really helpfull. So the question: Is there allready some (hidden) feature to do this? No, there is none yet. You have to fiddle with idemake.cfg and staticpackages.inc (easy for one package, but not flexible) or extend lazbuild (difficult, but flexible). I'd like to test the easy way first, but there are problems with staticpackages, even when not fiddling with it: Fist goal is to re-compile lazarus having previously installed packages included. Situation: (i386-linux, suse 10.0 / own linuxfromscratch with rpms) * fpc is installed globally (/usr/local/) incl. indy-fpc * lazarus installed in home (~/FreePascal/lazarus) * indy is in home (~/FreePascal/indy/lazarus) * glscene in home (~/FreePascal/gscene) * lazarus is running with bigide, indy and glscene installed. All components on the palette. Now when I remove the lazarus folder, get a fresh svn co, do a make clean all bigide, bigide ignores user settings and compiles a static set of packages. 'make idepkg' compiles with user settings. start lazarus, it does not show my previously installed packages. I have to open one of the packages (doesn't matter if indy or glscene) and click install. Now it compiles all the packages and on restart everything is fine. This is 'make idepkg'. Yea, that works, if all packages have been compiled before. So for the records: in a clean lazarus checkout, doing * make all bigide * ./lazbuild -B ../indy/lazarus/indylaz.lpk * ./lazbuild -B ../glscene/LazarusLin/glscenelazarus.lpk * make idepkg gives me a fresh ide containig all my previously installed packages. Very nice, thanks. Now heading for the next step: getting this done on a fresh system, i.e. without the allready existing ~/.lazarus/* Then finally try to create a lazarus rpm containing these additional components. regards Burkhard That is very interesting, Burkhard. Please keep us updated on your progress. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] FP/Delphi compatible Encryption and Zip Libraries?
Hi all, Can anyone recommend an encryption and zip library/unit that works with both FP and delphi? The zlib stuff should work well between them I would imagine. I need to encrypt and compress plain xml packets between two endpoints. Thanks! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] FP/Delphi compatible Encryption and Zip Libraries?
Graeme Geldenhuys wrote: On 2/1/07, Vincent Snijders [EMAIL PROTECTED] wrote: The zlib stuff should work well between them I would imagine. We use zlib for compression under both Delphi and Lazarus. No problems at all. One option is DCPCrupt: http://wiki.lazarus.freepascal.org/DCPcrypt And we use DCPCrypt for compression under both (same product as the zlib one) Delphi and Lazarus. Again, no problems. Thanks to you both. I will give them a try. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] XML and XPath?
Hi all, Does the current xml implementation in laz/fpc support xpath for retrieving nodes? If so, does anyone have any examples? Wiki seems to have mostly code for working with the DOM, but no XPath examples. Thank you. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] XML and XPath?
Lepidosteus wrote: In fpc/fcl/xml there is a xpath unit. Never used it, don't know if it works, guess it should. Ahh, you're correct. I'll poke around the sources a bit and see if I can figure it out. Thanks, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] X10/Firecracker Integration
Hi all, I was curious if anyone had done any X10/Firecracker integration using FP/Laz. I'm looking at the possibility in the not so distant future of doing a project that would involve home automation equipment for FP/Laz/Linux. Thanks. Hope everyone had a great weekend. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] XML and XPath?
Kris Leech wrote: Lee Jenkins wrote: Lepidosteus wrote: In fpc/fcl/xml there is a xpath unit. Never used it, don't know if it works, guess it should. Ahh, you're correct. I'll poke around the sources a bit and see if I can figure it out. It broken at the moment, but I just got a fixed unit today from Sebastian Günther. Thanks, Can you forward a copy of the fixed unit to my email? -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Midware port to Lazarus
Balanyi Zsolt wrote: Hi friends! Anybody interested in porting Midware to Lazarus? Midware is a very good middleware for Delphi and Kylix. If you know any alternative solution, let me know! Synapse works. I've written a TCP server using it. On the other hand, it's blocking sockets. Midware is non-blocking, right? -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Midware port to Lazarus
Cesar Romero wrote: Synapse works. I've written a TCP server using it. On the other hand, it's blocking sockets. Midware is non-blocking, right? I was looking for this kind of server with Synapse, do you know where can I find a example like that? []s I can't remember if examples are distrbuted with the main package or not. Check out their website: http://synapse.ararat.cz/ One of the downloads has a sample project for TCP server. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Midware port to Lazarus
Balanyi Zsolt wrote: Hi! Well, AFAIK Midware is non-blocking... Could you send me a link to Synapse? Best regards, Zsolt Sure. My apologies for not including it originally. http://synapse.ararat.cz/ -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] XML and XPath?
Kris Leech wrote: Can you forward a copy of the fixed unit to my email? And to me as well, so I can commit the fix in SVN :-) It may still need a few bug fixes yet, Ive sent some feedback to Sebastian but I know he is really busy at the moment. However the basics work, its just a few xpath syntaxes that don't. Does anyone know there way around the unit, would be great to get some tips or code examples of xpath in use...? I haven't had a chance to use it yet, but my needs are simple. Just need to be able to select single node like '/root/cards/audi'. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Stoping debugger.
Marc Weustink wrote: The problem you have is something deeper and needs to be solved. Setting EndDebugging is just a workaround for this problem but doesn't solve it. Thanks to a mail conversation I had last night with Jay Binks we found out that the debugger process reports an error when the application is stopped and this application has a .manifest. Without the manifest debugging works fine. Since I now have at least a direction to look at, chances that it get fixed are getting higher. I've seen this problem as well. Taking the manifest file out does make it work. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Suse linux with mono tools vmware image
George Birbilis wrote: At mono website they have for download a Suse linux with mono tools vmware image and a link to the free VMWare player. Is there a similar thing for Lazarus? I haven't seen one. I'm new to linux/lazarus so I used a CentOS 4.4 VM Ware image and then just installed fpc and lazarus on it. Works pretty well, actually. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Kudos to Lazarus and FPC
I just wanted to share with everyone how impressed that I am with Lazarus (and FPC). I have just finished the bulk of a TCP scripting host using Rem Objects scripting utility and Lazarus and I have to say that I am very impressed. Yes, the IDE does have it quirks (like when I have to manually reset the debugger sometimes), but all in all, its a very functional IDE and I appreciate the work that has gone into making it. Kudos. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Managing Cross Platform Projects
Hi all, I was wondering what other did to manage cross platform projects? The problem that I have is writing the project in on OS (Windows for the current project) and then compiling over on linux. Everything compiles fine, but it's a pain to port a project over because of unit reference paths, etc that are different on each platform. I was curious as to what other do in this situation. My first thought is to save a version of the project to Linux, make sure everything compiles and then diff the units when I need to compile and update on the other platform. Any Suggestions? Thanks, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Managing Cross Platform Projects
Felipe Monteiro de Carvalho wrote: On 3/21/07, Lee Jenkins [EMAIL PROTECTED] wrote: I was wondering what other did to manage cross platform projects? I mostly use subversion to manage the source code. You will need a server for that, of course. It´s not hard to set up, I´ve already done it for internal non-open source projects. For gpl projects I use source forge´s svn =) I think that even with only 2 persons on a project, or even only 1 person working on different operating systems, subversion is a good solution. Further you can see all alterations later, it´s very convenient. Thank you. I'll take a look. but it's a pain to port a project over because of unit reference paths, etc that are different on each platform. Why are paths different on each platform? A project should normally work with paths relative to it´s project file directory, this way paths work everywhere. I use quite a few class objects from one project to another. I don't like to make copies of them just to place under a project so that it can find the unit. I guess I could place them all under lazarus components directory and use a macro...to specify the paths and let lazarus do the work... -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] touch command [OT]
Hi all, I'm trying to use the touch command from TProcess and it only changes the date. I've tried many different formats that I have found suggested on various linux sites, including [[CC]YY]MMDDhhmm [.SS] and none of them seem to work. touch seems to work if I run it directly from the command line. Anyone tried doing this? Thanks! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Managing Cross Platform Projects
Patrick Chevalley wrote: In the past I do myself some fright by manually copy the files to a Samba share ... shifts his feet uncomfortably -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] touch command [OT]
Lee Jenkins wrote: Hi all, I'm trying to use the touch command from TProcess and it only changes the date. I've tried many different formats that I have found suggested on various linux sites, including [[CC]YY]MMDDhhmm [.SS] and none of them seem to work. Never mind. I used a different command to what I wanted. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Anybody on this list use Firebird database with Lazarus?
[EMAIL PROTECTED] wrote: try with http://www.progdigy.com/modules.php?name=UIB, support Lazarus and works fine for Firebird, Interbase and Yaffil. Include several components: I've used UIB components in Laz myself and they are good. Recently, I tried the PDO stuff and while it's not TDataset decendant, I really like it. It supports FB as well as MySQL as well. I hope they end up putting SQLITE support as well. That would round off my databases nicely. http://pdo.sourceforge.net/ -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Anybody on this list use Firebird database with Lazarus?
Howard Lee Harkness wrote: One of the utilities that was foresighted enough to write was one that dumps all of the tables into CSV format. Any recommendations for the best way to get a CSV file imported into a Firebird database? Not for lazarus. I have have some nice components for that sort of thing for delphi that I purchased a while back. For yourself, you could just parse the file and build your SQL on the fly. Just remember for Firebird to commit your transaction every x number of records during the import process. Maybe every 1K - 5K records, piped in, commit and restart your transaction. Otherwise, FB may bog down from the non-committed transaction. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] SynEdit Docs
Do these exist in any form? I have the source and it does not tell me what some things mean like this below. Assumes a bit more that I know personally synedit, etc. Thanks for any pointers. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Plug-in functionality
Hi all, Since Lazarus does not support dynamically loaded DLL's, can anyone offer suggestions for creating a plug in functionality for a Windows/Linux application? Thanks a bunch, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Delphi incompatibilities in TForm
Flávio Etrusco wrote: 2) Delphi Form has a Bitmap property which allows to set a background image on the form, while Lazarus does not. What version is it? I vaguely remember seeing this on a very recent version of Delphi (probably Turbo Delphi Explorer), but in Delphi7 there isn't any such property... Nor is there a property like that in D6. I've always had to use TImage and stretch it across the form the few times I needed this functionality. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Plug-in functionality
Christian Ulrich wrote: Lee Jenkins schrieb: Hi all, Since Lazarus does not support dynamically loaded DLL's, can anyone offer suggestions for creating a plug in functionality for a Windows/Linux application? Why you think it dont support dynamically loaded dlls ? I work for years with them and fpc/lazarus... That may be my mistake then Christian. I thought I read that somewhere, I've never tried it. Nonetheless, that is good news. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Plug-in functionality
Felipe Monteiro de Carvalho wrote: On 4/18/07, Lee Jenkins [EMAIL PROTECTED] wrote: That may be my mistake then Christian. I thought I read that somewhere, I've never tried it. Nonetheless, that is good news. What doesn´t work on Free Pascal is creating a dll that exports classes, like for example building the full fpc runtime library into a DLL. Exporting normal functions works ok. For a common software it´s almost always enouth to write a procedural interface, so that is what I recomend. I read something about this being solved or partially solved on 2.2 Thanks Felipe. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] detecting the Linux window manager used
micahel schneider wrote: Am Samstag, 21. April 2007 11:38 schrieb Graeme Geldenhuys: http://pastebin.archlinux.org/2091 http://bbs.archlinux.org/viewtopic.php?id=24208p=1 That unless operator is very cool. Never seen that, but then again, I am no C coder. Neat though. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] detecting the Linux window manager used
Graeme Geldenhuys wrote: On 4/21/07, Lee Jenkins [EMAIL PROTECTED] wrote: That unless operator is very cool. Never seen that, but then again, I am no C coder. Neat though. That is pretty cool, though it is Perl not C. :-) Oops ;) I guess we've established that I am not familiar with Perl either... -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Error while linking - Sqlite problem?
Hi all, I had a project successfully building on both Windows and Linux. I added SQLite support and while everything compiles fine on Windows, now on the linux box, Lazarus simply says: Error: Error while linking No descriptions, just that. Must the SQLite.so be installed on the linux box? I have it installed in /lib and I've tried placing it in /usr/lib to no avail. Of course, that could just not be the problem at all. It's a bit difficult to figure out with the above error message that doesn't give me much to go on. Any help would be appreciated. Thanks! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Error while linking - Sqlite problem?
Lee Jenkins wrote: Hi all, I had a project successfully building on both Windows and Linux. I added SQLite support and while everything compiles fine on Windows, now on the linux box, Lazarus simply says: Error: Error while linking No descriptions, just that. Must the SQLite.so be installed on the linux box? I have it installed in /lib and I've tried placing it in /usr/lib to no avail. Of course, that could just not be the problem at all. It's a bit difficult to figure out with the above error message that doesn't give me much to go on. Just to verify, I commented out all references to sqlite3ds and everything builds fine on linux. So, my assumption is that it is a problem with sqlite3ds or way that I am trying to build it. Thanks again for any help, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Error while linking - Sqlite problem?
Lee Jenkins wrote: Lee Jenkins wrote: Hi all, I had a project successfully building on both Windows and Linux. I added SQLite support and while everything compiles fine on Windows, now on the linux box, Lazarus simply says: Error: Error while linking No descriptions, just that. Must the SQLite.so be installed on the linux box? I have it installed in /lib and I've tried placing it in /usr/lib to no avail. Of course, that could just not be the problem at all. It's a bit difficult to figure out with the above error message that doesn't give me much to go on. Just to verify, I commented out all references to sqlite3ds and everything builds fine on linux. So, my assumption is that it is a problem with sqlite3ds or way that I am trying to build it. Thanks again for any help, Resolved. I needed to install the sqlite devel packages on the linux box. Which brings me to another question: What is the difference between the build process on linux vs. windows that requires that the sqlite development packages be installed? The only thing I needed on Windows was the single sqlite3.dll file. My assumption was that all was needed was the .so file on the linux machine, which was obviously wrong. Thanks for any clarity. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Error while linking - Sqlite problem?
Mattias Gaertner wrote: On Sun, 29 Apr 2007 12:27:44 -0400 Lee Jenkins [EMAIL PROTECTED] wrote: Lee Jenkins wrote: Lee Jenkins wrote: Hi all, I had a project successfully building on both Windows and Linux. I added SQLite support and while everything compiles fine on Windows, now on the linux box, Lazarus simply says: Error: Error while linking No descriptions, just that. There are probably more error messages, but maybe they were skipped and not shown in the message window. Can you reproduce the issue and send all messages please? You can get all messages with right click on messages and use Save all messages to file. Then I can extend the filter to show these messages. /usr/bin/ld: cannot find -lsqlite3 Error: Error while linking Which brings me to another question: What is the difference between the build process on linux vs. windows that requires that the sqlite development packages be installed? The only thing I needed on Windows was the single sqlite3.dll file. My assumption was that all was needed was the .so file on the linux machine, which was obviously wrong. The devel package installs the .h files (which FPC does not need) and sets a link from unspecific .so file to the current .so version. In short words: It sets a default. Mattias, I'm not sure I follow you here, no doubt because I'm still learning linux. I tried creating a hard link named sqlite3 and pointed it to the version of the .so I had download from sqlite's website. Tried placing it various directories such as /bin, /usr/bin, /sbin, etc, but still need the dev package which I yummed. Ah the joys of learning :-) -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New IDE images - sneak preview (3 of 3)
Graeme Geldenhuys wrote: On 4/29/07, Vincent Snijders [EMAIL PROTECTED] wrote: Why did you use the {} symbols in comment selection. The current implementation adds // and comments the complete line. You may consider this a limitation, that you cannot just comment a word, but if you use // in the icon, it wouldn't raise false expectations. The {} are well know comment symbols, even though the Lazarus implementation uses the // symbols. The actual reason for using the {} is so I can use the same image style for Uncomment. Braces with a line though it. I thought it would look really strange having /// (the // comment with a red /). The other option was the // symbols with a \ line through them, but the braces with a / line just looked better. Not that it matters much, but GExperts installed in my D6 use the same {..} to represent block commenting/un-commenting. One is blue, one is red. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Converting Strings to Currency
John Meyer wrote: I tried a search at lazarus.freepascal.org, and it didn't get anywhere, so if somebody could help me out by telling me how I convert a string (specifically, from a TEdit control) to a currency and versey vicey, I'd appreciate it. Maybe StrToFloat(AString); ?? -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Burkhard Carstens wrote: Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? This is not a bug. It is caused by a change in fpc. Assignments to fields of structured properties are not allowed anymore (since r7250). e.g.: property prop : trec read frec; instance.prop.a:=5; Seems like you have to introduce more properties in the class or work with tmpvars in the code: tmp:=instance.prop; tmp.a:=5; instance.prop:=tmp; Hi, I'm just curious why this was changed. Was it to promote better coding practices or a more practical reason? Again, just curious. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Zeos Lib Question
Hi everyone, I know that zeos has its own message board, but I posted this question there about a week ago with no responses. Basically, I'm wondering if anyone is using zeos for Sqlite access and have had problems with driver not found error on Windows with SQLite 3? The following code produces the error: Conn := TZConnection.Create(Self); Conn.Protocol := 'sqlite-3'; Conn.Catalog := 'M:\MySQLiteDir Conn.Database := 'M:\MySQLiteDir\test.s3db'; Conn.Connected := True; A copy of the sqlite3.dll file is located in the same directory (On Windows) as the application. Looks like I'm not getting the config correct, but I've tried several variations of the above code and still get the error. Thanks a bunch, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to
Vincent Snijders wrote: Lee Jenkins schreef: Burkhard Carstens wrote: Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? This is not a bug. It is caused by a change in fpc. Assignments to fields of structured properties are not allowed anymore (since r7250). e.g.: property prop : trec read frec; instance.prop.a:=5; Seems like you have to introduce more properties in the class or work with tmpvars in the code: tmp:=instance.prop; tmp.a:=5; instance.prop:=tmp; Hi, I'm just curious why this was changed. Was it to promote better coding practices or a more practical reason? If your property is declared as: property MyProp: TMyRec read GetMyRec write FMyRec; then instance.MyProp.B := 5; writeln(instance.MyProp.B); would not write 5. Thanks Vincent. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Linux WriteLn - Staionary Output - how is done?
Hi all, I'm wondering how to emulate the static console output seen with some linux applications such as yum. More specifically, static output without going to another line or appending to existing text already written such as this: Getting File: somefile.txt [=] 50% I hope that I explained my question well enough. Thanks! -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Linux WriteLn - Staionary Output - how is done?
Lee Jenkins wrote: Hi all, I'm wondering how to emulate the static console output seen with some linux applications such as yum. More specifically, static output without going to another line or appending to existing text already written such as this: Getting File: somefile.txt [=] 50% I hope that I explained my question well enough. Thanks! Thanks all, I'll take a look at the crt unit. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New features since Delphi 7...
Graeme Geldenhuys wrote: Hi, Here is some interesting Delphi features I found title: New since Delphi New Delphi language features since Delphi 7... http://dn.codegear.com/article/34324 Would anyone mind explaining this to me? I don't get it. Routines can now be marked with the inline directive. This tells the compiler that, instead of actually calling the routine, it should emit code that includes the routine at the call site. Sorry, but the only thing that kept me out of college...was highschool. ;) -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New features since Delphi 7...
Micha Nelissen wrote: Lee Jenkins wrote: Routines can now be marked with the inline directive. This tells the compiler that, instead of actually calling the routine, it should emit code that includes the routine at the call site. http://en.wikipedia.org/wiki/Inline_expansion Neat. Thanks all. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Remobjects Supports Freepascal?
This is very welcome news for me. http://www.remobjects.com/product/page.asp?id={E1DB912D-BD45-4B74-9AC4-550E3CD3738F} -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Remobjects Supports Freepascal?
Bisma Jayadi wrote: This is very welcome news for me. http://www.remobjects.com/product/page.asp?id={E1DB912D-BD45-4B74-9AC4-550E3CD3738F} I just knew that someday there will be more and more Delphi component providers support FPC/Lazarus due to active development of FPC/Lazarus and lack of Borland/CG interest to non-Windows platform. And someday, Borland/CG will have no options except support FPC/Lazarus because they'll be far behind FPC/Lazarus for non-Windows platform. FPC as a compiler is a mature and stable product. Morfik and Pixel obviously shows its power. What I've been waiting to jump to FPC vehicle is AtoZed's Intraweb. :-D From Borland/CG, I'm thinking that someday they will offer Delphi for Pascal IDE with FPC as an alternative compiler to compete with (or terminate) unofficial CrossFPC. ;) -Bee- Is CrossFPC still being developed? I had read somewhere that it was stalled again. Personally, I've come to like Lazarus quite a bit and am very appreciative of the Laz's developers efforts. Of course, I'm still using D6 on windows and Laz is pretty comparable. If only there was a way to better promote Lazarus/FPC. Recently, I've been doing quite a bit of development on Linux and I swear, I get a lot of Pascal? That's still in use? or I remember that from high school! or Yes, that was used back when the world was flat. OP needs a major marketing overhaul IMO. Here is my pitch: Object Pascal. Strong Like C. Easy like VB. ;) -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus keyword completion addon
Graeme Geldenhuys wrote: On 5/22/07, Mattias Gaertner [EMAIL PROTECTED] wrote: Not yet. But this is easy to implement. The above examples (being/end) are triggered by pressing 'return'. Of course not all templates should be triggered by pressing 'return', so every template need an own set of triggers. What about other triggers? For example space, tab, semicolon, ... 'Space' must definitely be a trigger as well (in the future). Especially if we want to implement 'auto spellcheck' and 'auto fixing of case for variables and identifiers' in the IDE. That would be very, very nice to have: Case Correction. I know that its not integral, but I am a stickler for case consistency and a feature like that would help me save time by not having to hit shift so much. Case correction is also help to avoid spelling mistake for identifiers since when you hit space, it corrects and you know its correct. Just my opinion. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Once Code Compile Anywhere .... ????
Allies Xposs wrote: Thanks all... Im confuse .. How to di This ? (Once Code Compile Anywhere).. Im Use LAzarus under WIndows, but... i want compile my code can RUN IN LINUX... How...?? In addition to what the others said, consider using cvs to manage your cross platform project/source files. It will make things a lot easier. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Threads and Forms
Hi all, I need to build a GUI application where a spawned thread will open a socket, receive messages and the controls on the form (TStringGride, etc) will need to be updated with values received from the socket. Should I use a critical section for this? I remember that Delphi has a method for interacting with the main thread from other threads, is this supported in Laz/FPC? Thanks, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Threads and Forms
Luca Olivetti wrote: En/na Lee Jenkins ha escrit: Hi all, I need to build a GUI application where a spawned thread will open a socket, receive messages and the controls on the form (TStringGride, etc) will need to be updated with values received from the socket. Should I use a critical section for this? I remember that Delphi has a method for interacting with the main thread from other threads, is this supported in Laz/FPC? Synchronize(method) will execute method in the context of the main thread. Bye Thanks to all. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Thunderbird Integration?
Has anyone experience with Thunderbird Integration using Laz/Fpc? All I need to do at the moment is validate a contact against thunderbird from a Laz/FPC program. Thanks, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Report Tools for Lazarus
Jesus Reyes wrote: --- Joao Morais [EMAIL PROTECTED] escribió: Graeme Geldenhuys wrote: On 09/06/07, Joao Morais [EMAIL PROTECTED] wrote: I am using FreeReport with Delphi and building reports in runtime against a business class model. I am using a wrapper to the TUserDefinedDataSet (don't remember the exact name) class. This has been This sounds like what ReportBuilder does in Delphi. A very powerful feature for reporting and allows you to report from just about anything. At runtime you inject the data you need and to the reporting engine it looks like a normal Dataset. Does LazReport have that TUserDefinedDataset class? I hope so! =) Since LazReport is based on FreeReport, the answer probably is yes. I can confirm that, yes LazReport has TfrUserDataset components so one can have a custom data cursor, in fact, in 0.9.4 version there is a sample showing exactly this functionality. Sample is in Samples/UserDs directory. Jesus Reyes A. From the documentation on sf.net: Frequently you may find the need to extract data from other sources, not having a relation to databases (for example, file, array or string grid). This is the purpose of the TfrUserDataset component, it generates the events OnFirst, OnNext, OnCheckEOF to handle navigation in this type of data. You should also create event handlers for the OnGetValue and OnEnterRectangle events of the TfrReport component. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] form embedded in another form
Christian Ulrich wrote: Graeme Geldenhuys schrieb: Hi, As the subject says... Is this supported under Lazarus? And under Linux and Windows platforms. Official not but i use it for 2 years. with an little trick in win32 and in linux it works. I currently have a TabControl on a form. As I change the tabs I want to embed different forms. Here is the code I have so far. Under Linux (GTK1) it works find. Under Windows the TabControl doesn't paint correctly and I can only change one tab before the GUI freezes up. I have to kill the application from the Task Manager. Anybody got this work under Lazarus? Am I missing some property settings? --- procedure TModuleHeaderForm.TabControl1Change(Sender: TObject); begin FreeAndNil(FEmbededForm); case TabControl1.TabIndex of 0: CreateEmbededForm(TPanelHeader); 1: CreateEmbededForm(TPanelDetail); 2: CreateEmbededForm(TPanelOutcome); 3: CreateEmbededForm(TPanelSlide); end; end; procedure TModuleHeaderForm.CreateEmbededForm(AForm: TFormClassType); begin FEmbededForm := AForm.Create(self); FEmbededForm.BorderStyle := bsNone; FEmbededForm.Parent := TabControl1; FEmbededForm.Align := alClient; FEmbededForm.Show; end; Christian, Can you elaborate on the trick you used for Win32? I may need to do this same thing soon. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] form embedded in another form
Christian Ulrich wrote: Can you elaborate on the trick you used for Win32? I may need to do this same thing soon. i have documentated in the bugreport http://www.freepascal.org/mantis/view.php?id=1052 thers also an patch for the lcl that inserts an internal workaround but nobody wants to apply it Thanks, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] TListView - Items not showing up
Hi all, Lazarus 0.9.20 Does the TListView work differently than in Delphi? I'm adding items to a TListView and while I can see that there are items, the text appears to be invisible or not being painted. I've tried setting the font.color, etc to different colors as well. for iCount := 0 To sl.Count -1 do begin item := LV.Items.Add; // check to see if it is marked offline with a * character. sTemp := sl[iCount]; if (POS('*', sTemp) 0) then begin sTemp := AnsiReplaceText(sTemp, '*', ''); bOffLine := true; end else bOffLine := false; // write out device name to Phone Device column item.Caption := sTemp; if (not bOffLine) then item.SubItems.Add('---') else item.SubItems.Add('XX Unavailable XX'); item.SubItems.add(''); item.SubItems.Add(''); item.SubItems.Add(''); end; -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TListView - Items not showing up
Lee Jenkins wrote: Hi all, Lazarus 0.9.20 Does the TListView work differently than in Delphi? I'm adding items to a TListView and while I can see that there are items, the text appears to be invisible or not being painted. I've tried setting the font.color, etc to different colors as well. for iCount := 0 To sl.Count -1 do begin item := LV.Items.Add; // check to see if it is marked offline with a * character. sTemp := sl[iCount]; if (POS('*', sTemp) 0) then begin sTemp := AnsiReplaceText(sTemp, '*', ''); bOffLine := true; end else bOffLine := false; // write out device name to Phone Device column item.Caption := sTemp; if (not bOffLine) then item.SubItems.Add('---') else item.SubItems.Add('XX Unavailable XX'); item.SubItems.add(''); item.SubItems.Add(''); item.SubItems.Add(''); end; Never mind. My fault it was not working. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] CodeTools and a GUI Class Builder
Graeme Geldenhuys wrote: On 15/06/07, Al Boldi [EMAIL PROTECTED] wrote: A good starting point would probably be a DBTable-To-Class importer. tiOPF already has something link this - well kinda. The tool is called tiSQLEditor. You write and execute you SQL statement and see the result screen. In that screen you can then generate different sets of code for BOM, Visitors, MapRowToObject, etc and the code gets placed in the Clipboard, ready to paste into you IDE's editor. Does CodeTools offer the necessary functions to implement this easily? Well looking at the examples, I would say yes. The Class Builder will use feature that are already used by the Lazarus IDE, just in a slighly different way. Things like Code Completion and Refactoring, etc.. I've already created all the skeleton dialogs I would need. Now it's time to plug in the CodeTools functions. :-) Graeme. What's the learning curve like with tiPPF? I checked it out a while back but was short on time for studying it. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Borland Kylix Trolltech
Graeme Geldenhuys wrote: Hi, I take it this is an old announcement? Thought the date of the announcement (as per the webpage) is June 2007. http://trolltech.com/company/newsroom/announcements/0054?searchterm=borland+linux Regards, - Graeme - snip We are fully committed to Linux. /snip And I am fully committed to doing the lawn this weekend... ;) -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] CodeTools and a GUI Class Builder
Graeme Geldenhuys wrote: On 16/06/07, Lee Jenkins [EMAIL PROTECTED] wrote: What's the learning curve like with tiPPF? I checked it out a while back but was short on time for studying it. No doubt there is a learning curve. The tiOPF framework is big, but it's no different compared to someone that's new to the LCL or VCL. It take a while to get to know the things you are going to need first and then keep learning new features as you get more familiar with the framework. I'm currently bringing the documentation up to date. All the docs where written for tiOPF ver.1. A few things have changed in tiOPF ver.2, but for the better. Easier unit and class names, lots of code cleanup, etc. but the basic functionality is still the same. To work with the framework, I would say you have to work through the Concept Documentation - Chapters 1, 2 and 3 and actually write the code examples. This will lay the groundwork of how the framework was built and how the Visitor pattern is used. The Visitor pattern is the hart of the framework. Then for any other support questions you can always post them to the support newsgroup (see the website for details). The support newsgroup also has a 5+ year history which is a goldmine of information. Regards, - Graeme - _ Nice. Thanks for the info, Graeme. I'll take a look again. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Working with XML: crosscompatibility
Luiz Americo Pereira Camara wrote: Alvise Nicoletti wrote: Hi... I have to parse xml both with Lazarus on linux (server) and Delphi on Windows (client). Actually, with Lazarus, I'm using the DOM, ReadXML, WriteXML units. Is there something that I can use in Delphi with the same code? Or, otherwise, is there some XML component compatible for both Delphi and Lazarus? Some time ago i ported the fpc dom unit to delphi. It was just a matter of changing the places of const sections, no change was made at all, if i remenber well. I can send to you but is a bit outdated. A better option is to try to compile the most recent fpc dom version, probably will be easy. Luiz And if that doesn't work for you (which would be nice to be able to use the same code base in delphi and FPC/Laz) I would recommend looking at OmniXML for delphi. I've used it for a couple of years now and it works well. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Linux/Printing Question
Hi all, This is quite a bit OT since the only thing related to Lazarus is that I will use to write the software. One of my company's main products does a lot of prep notifications to various printers on the network. For a single order (sale), prep instructions can be sent to up to 6 different printers. One of the things that has always been a problem with doing this kind of critical printing in windows has been the lack of status or way of querying printers (many are on print servers). I remember there was a way to send a fake print job and monitor using the Win32 API, but I had difficulty getting reliable printer status and it doesn't seem to work very well. Is this kind of printer monitoring possible in Linux? We are thinking about putting together a kind of Linux Appliance to do this and move the printing portion away from Windows, assuming printer status is obtainable on Linux like outlined above. Thanks for input. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] report writer 4 Lazarus?
Heine Ferreira wrote: Hi Does Lazarus have a report writer? If not, is there any free or low cost report writer out there that would work with Lazarus? I have tried to post this in the forum, but there was no response. I only know of three report writers that are free. LogiXML - for web based reports. Jasper Reports - for Java. Report Manager - I used it with VB6 and it works with Delphi 5 and upwards. It also works with dot net. I tried it on a couple of reports and found it rather clumsy and buggy. Does anyone know of anything else out there? I am looking for a report writer that would work well on Windows. May be I'm too fussy, but I am used to good report writing tools like Crystal and SQL Server reporting services. Crystal is rather expensive or you must buy Visual Studio and the free version of SQL Server is too limited and too hungry for memory. Thanks Heine Ferreira LazReport is based on freereport, I think. http://lazreport.sourceforge.net/ I believe Freereport was the ancestor of FastReport. Someone can correct me if I'm wrong. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Set output file on Windows?
wile64 wrote: 2007/11/5, Lee Jenkins [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi all, Where in lazarus can I set the path to output the generated executable file to? I thought it might be Project Project Objects Target File Name, but that It's good, example ..\..\myprojectexe and for files compiled : Project Compiler Options Unit Output directory Hmm. I tried this and it didn't work, unfortunately. The odd thing is now my local Firebird server won't run. I get a freepascal runtime error message when I try to run FirebirdSQL !!! Anyone have any idea what would cause that? Not sure if its related or not, but didn't manifest itself until after I was playing with lazarus and file output path. I uninstalled FPC/Lazarus to see that would fix it, but no luck. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Set output file on Windows?
Lee Jenkins wrote: wile64 wrote: 2007/11/5, Lee Jenkins [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi all, Where in lazarus can I set the path to output the generated executable file to? I thought it might be Project Project Objects Target File Name, but that It's good, example ..\..\myprojectexe and for files compiled : Project Compiler Options Unit Output directory Hmm. I tried this and it didn't work, unfortunately. The odd thing is now my local Firebird server won't run. I get a freepascal runtime error message when I try to run FirebirdSQL !!! Anyone have any idea what would cause that? Not sure if its related or not, but didn't manifest itself until after I was playing with lazarus and file output path. I uninstalled FPC/Lazarus to see that would fix it, but no luck. -- Here's a screenshot of the error in case any can offer a suggestion, otherwise, I might have to reinstall Windows xp (2cd time in 5 months)... http://www.leebo.dreamhosters.com/images/misc/error_start_firebird.png Thanks, -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives