Re: [fpc-pascal] fpGUI Toolkit v0.7-rc1 for FPC 2.4
Roland Schaefer het geskryf: > > level, I'd say using DFB is sort of on a par with using Xlib, only > easier to handle. Besides the init procedures it acatually feels more This is what I understood about directfb too [the little that I read about directfb]. > I'm maintaining FPC-bindings for DFB. Right now, they work with the 1.4 > line of DFB binaries only. If anyone has a need for 1.2 bindings (which Umm, I'm running Ubuntu 8.04.2 LTS (long term support) release and it comes with libdirectfb 1.0.1. I'll be upgrading to the next LTS release due end of April - hopefully that will include a more up to date version of directfb, otherwise I'll be in contact with you. ;-) Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Error: Illegal qualifier in converting Delphi unit
Your suggestion worked - what is the secret? Does the array[0..0 have some relevance here?] On 14 March 2010 23:01, Howard Page-Clark wrote: > On 14/3/10 6:11, Frank Church wrote: >> >> Hi guys, >> >> I am trying to compile the TVersionInfo component by Anders Melander >> at http://melander.dk/articles/versioninfo/. >> >> It defines the structure below >> >> type >> TTranslationRec = packed record >> case Integer of >> 0: ( >> LanguageID: WORD; >> CharsetID: WORD); >> 1: ( >> TranslationID: DWORD); >> end; >> PTranslationRec = ^TTranslationRec; >> TTranslationTable = array[0..0] of TTranslationRec; >> PTranslationTable = ^TTranslationTable; >> >> >> which causes the compiler error >> >> VersionInfo.pas(141,37) Error: Illegal qualifier >> >> function TVersionInfo.GetCharset(Index: integer): WORD; >> begin >> Result := TranslationTable[Index].CharsetID; >> end; >> >> Is there a way to convert for Free Pascal compatibility? > > try: > > result := TranslationTable[Index]^.CharsetID > > Howard > ___ > fpc-pascal maillist - fpc-pas...@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Frank Church === http://devblog.brahmancreations.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Error: Illegal qualifier in converting Delphi unit
On 14/3/10 6:11, Frank Church wrote: Hi guys, I am trying to compile the TVersionInfo component by Anders Melander at http://melander.dk/articles/versioninfo/. It defines the structure below type TTranslationRec = packed record case Integer of 0: ( LanguageID: WORD; CharsetID: WORD); 1: ( TranslationID: DWORD); end; PTranslationRec = ^TTranslationRec; TTranslationTable = array[0..0] of TTranslationRec; PTranslationTable = ^TTranslationTable; which causes the compiler error VersionInfo.pas(141,37) Error: Illegal qualifier function TVersionInfo.GetCharset(Index: integer): WORD; begin Result := TranslationTable[Index].CharsetID; end; Is there a way to convert for Free Pascal compatibility? try: result := TranslationTable[Index]^.CharsetID Howard ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] including libraies ?
- Original Message - From: "Terry A. Haimann" To: Sent: Monday, March 15, 2010 9:11 AM Subject: [fpc-pascal] including libraies ? I tried to write a little utility to submit a command to the At Facility. The code to do this is as follows: program TestPrg; Uses Classes, Process; Var i:Integer; Cmd, Pre, Post, StrVar, SwStr:String; MyProcess: TProcess; SOut, EOut, StdStrLst: TStringList; Begin StdStrLst := TStringlist.Create; SOut := TStringlist.Create; EOut := TStringlist.Create; EOut := TStringlist.Create; MyProcess := TProcess.Create(nil); MyProcess.CommandLine := 'at now'; MyProcess.Options := MyProcess.Options + [poUsePipes]; MyProcess.Execute; StdStrLst.Clear; StdStrLst.Add('awk -F":" ''{print $1"\t"$3"\t"$4}'' /etc/passwd | sort');StdStrLst.SaveToStream(MyProcess.Input);StdStrLst.Clear; StdStrLst.Add(chr(4)); StdStrLst.SaveToStream(MyProcess.Input); SOut.LoadFromStream(MyProcess.Output); For i:=1 to SOut.Count Do WriteLn(SOut.Strings[i]); EOut.LoadFromStream(MyProcess.StdErr); For i:=1 to EOut.Count Do WriteLn(EOut.Strings[i]); End. Running this code from a Lazarus test program works with out any problems. When running it from a Free Pascal (non gui,) the program finishes normally, but nothing gets submitted to the AT Facility. uses Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Process; Someone on the Lazarus List recommend I add SysUtils to my utility program. I am not sure how to do this. SysUtils has many included files in there and they are all in other directories, none of which are in my path. I am sure there is some simple method here that I am totally ignorant of. HI Terry, you should be able to just include SysUtils in your uses clause without any issues. The compiler should be able to find that unit (and others needed) automatically... {code} Uses Classes, Process,SysUtils; {code} cheers, Paul ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] including libraies ?
I tried to write a little utility to submit a command to the At Facility. The code to do this is as follows: program TestPrg; Uses Classes, Process; Var i:Integer; Cmd, Pre, Post, StrVar, SwStr:String; MyProcess: TProcess; SOut, EOut, StdStrLst: TStringList; Begin StdStrLst := TStringlist.Create; SOut := TStringlist.Create; EOut := TStringlist.Create; EOut := TStringlist.Create; MyProcess := TProcess.Create(nil); MyProcess.CommandLine := 'at now'; MyProcess.Options := MyProcess.Options + [poUsePipes]; MyProcess.Execute; StdStrLst.Clear; StdStrLst.Add('awk -F":" ''{print $1"\t"$3"\t"$4}'' /etc/passwd | sort'); StdStrLst.SaveToStream(MyProcess.Input); StdStrLst.Clear; StdStrLst.Add(chr(4)); StdStrLst.SaveToStream(MyProcess.Input); SOut.LoadFromStream(MyProcess.Output); For i:=1 to SOut.Count Do WriteLn(SOut.Strings[i]); EOut.LoadFromStream(MyProcess.StdErr); For i:=1 to EOut.Count Do WriteLn(EOut.Strings[i]); End. Running this code from a Lazarus test program works with out any problems. When running it from a Free Pascal (non gui,) the program finishes normally, but nothing gets submitted to the AT Facility. uses Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Process; Someone on the Lazarus List recommend I add SysUtils to my utility program. I am not sure how to do this. SysUtils has many included files in there and they are all in other directories, none of which are in my path. I am sure there is some simple method here that I am totally ignorant of. Thanks in advance, TH ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpGUI Toolkit v0.7-rc1 for FPC 2.4
On 14.03.2010 19:01, Graeme Geldenhuys wrote: >> You may want to look at directfb instead of working with the >> framebuffer directly. > > That is actually what I was going to look at first. As far as I > understand DirectFB is bit higher level than /dev/fb directly, so > should make implementation a bit easier. It's not only on a much higher level, but it also provides hardware-acceleration where drivers are available. On low-end embedded devices this can be crucial for acceptable performance. As for the level, I'd say using DFB is sort of on a par with using Xlib, only easier to handle. Besides the init procedures it acatually feels more like using SDL, but with richer functionality. You even get native support for windowing, multi-application support, etc. It's definitely much more comfortable than /dev/fb! I'm maintaining FPC-bindings for DFB. Right now, they work with the 1.4 line of DFB binaries only. If anyone has a need for 1.2 bindings (which is the version that ships with most GNU/Linux distributions these days), I'd actually provide such bindings. So, if anyone is seriously interested, please come forward. Cheers Roland ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Error: Illegal qualifier in converting Delphi unit
Hi guys, I am trying to compile the TVersionInfo component by Anders Melander at http://melander.dk/articles/versioninfo/. It defines the structure below type TTranslationRec = packed record case Integer of 0: ( LanguageID: WORD; CharsetID: WORD); 1: ( TranslationID: DWORD); end; PTranslationRec = ^TTranslationRec; TTranslationTable = array[0..0] of TTranslationRec; PTranslationTable = ^TTranslationTable; which causes the compiler error VersionInfo.pas(141,37) Error: Illegal qualifier function TVersionInfo.GetCharset(Index: integer): WORD; begin Result := TranslationTable[Index].CharsetID; end; Is there a way to convert for Free Pascal compatibility? -- Frank Church === http://devblog.brahmancreations.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpGUI Toolkit v0.7-rc1 for FPC 2.4
On 14 March 2010 13:33, Henry Vermaak wrote: >> >> if you manage to make fpGUI usable for framebuffer devices you will >> win a nice niche (Small console applications or even hand held like >> devices where X server is overkill) > > This would be very nice, indeed. Well, that is the plan for fpGUI. I have some use cases for fpGUI on linux framebuffer too. > You may want to look at directfb instead of working with the > framebuffer directly. That is actually what I was going to look at first. As far as I understand DirectFB is bit higher level than /dev/fb directly, so should make implementation a bit easier. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpGUI Toolkit v0.7-rc1 for FPC 2.4
On 14 March 2010 10:04, Jorge Aldo G. de F. Junior wrote: > > if you manage to make fpGUI usable for framebuffer devices you will > win a nice niche (Small console applications or even hand held like > devices where X server is overkill) This would be very nice, indeed. > i want to enhace my current programs (they use text menus, with readln > and similar ugly things) without having to resort to XOrg (its hard to > place a xserver on a routerboard). > > i will keep investigating... You may want to look at directfb instead of working with the framebuffer directly. Henry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpGUI Toolkit v0.7-rc1 for FPC 2.4
found some code to work with framebuffer on linux (/dev/fb) but im stuck at changing video modes and etc... its not as easy as i thought (you cant just say "i want 800x600") and pixel manipulating is similar to the old DOS/Vesa1.2 ways... im checking your code for the low level core routines, if you are interested i found code about linuxfb here : http://bugs.freepascal.org/view.php?id=12288 (im not the author) if you manage to make fpGUI usable for framebuffer devices you will win a nice niche (Small console applications or even hand held like devices where X server is overkill) i want to enhace my current programs (they use text menus, with readln and similar ugly things) without having to resort to XOrg (its hard to place a xserver on a routerboard). i will keep investigating... ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal