Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-05

Newbie questions

26 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bill de Carle

Hello everyone. I recently discovered free pascal and Lazarus and I want to thank everyone who went to all that trouble to make life easier for us folks who need a fast way to write a simple Windows program. I have some questions I haven't been able to find answers for. Perhaps someone on this mailing list can help or at least tell me where to look?

Question 1:
Thanks to Lazarus I have a basic application running nicely on Windows XP and Win95. I added another button on the form - so when the user clicks on it the program will quickly back up all the data files by copying them from a folder on a networked computer to a folder on the current computer. I don't know all the filenames, but I can select them by using wildcards in a filespec. The old console COPY command would work perfectly for this, but I can't shut down the running Windows GUI application so I have to find a way to copy the files from within the Lazarus UNIT1 module when the backup button is clicked.

I Googled and found out there is a function in shellAPI that should do this: shfileoperation(). I'm trying to figure out how to use it from a Lazarus application. The shellAPI function passes a parameter of type LPSHFileopstruct. So I made a procedure which defines a variable of that type and fills in the parameters (pointers to From and To filepaths etc), then invokes the shfileoperation function to actually do the copying. My code looks something like this...

unit Unit1;
{$mode objfpc}{$H+}
interface

uses
Classes, SysUtils, LResources, Forms, Controls, Graphics,

   Dialogs, ExtCtrls, StdCtrls, CheckLst, DbCtrls, shellAPI;

[..]

implementation
procedure filecopy;
var
	fos:LPSHFileopstructa;
	p1,p2:pchar;
        result:boolean;
begin
;
;
fos.wFunc:=FO_COPY;
fos.pFROM:=p1;
fos.pTO:=p2;
fos.fflags:=FOF_SILENT or FOF_NOCONFIRMATION;
result:=shfileoperationa(fos)=0;
end;

When I try to compile it from Lazarus the FPC tells me I have an illegal qualifier on
line: fos.pFunc:=FO_COPY - but I'm pretty sure pFunc is the correct qualifier. I don't know where to look to find the source code for that shfileoperation function
or the LPSHFileopstructa struct as implemented by Lazarus. Has anyone done this
already and made it work? I've tried the fileopstructw and fileopstruct versions but
they all have one problem or another. I presume fileopstructw is for "wide" filenames?

Question 2:
In my lazarus-generated data input window the user can hit the tab key to move to the
next edit window or combobox while filling out the form. That works fine. How can I
make it move the cursor from one box to the next by hitting the space bar instead of
the tab key, and how can I "place" the cursor in the appropriate box to start the next
data entry from within the Lazarus unit1 module so the user doesn't have to use the
mouse?

Question 3:
After the last box is filled in, it would be convenient to just hit the ENTER key instead
of using the mouse to click the "Submit" button. I have no idea at all how to ask Lazarus
to do this.

Sorry for all the questions. I have never used Delphi or tried any Windows API programming
until a few days ago, so I don't know where to find this information on the web.
Thanks for any tips,
Bill

Reply by email

Paul Ishenin
to Bill de Carle
Bill de Carle wrote
fos.wFunc:=FO_COPY;

...

Show quoted text 11 lines
When I try to compile it from Lazarus the FPC tells me I have an illegal qualifier on line: fos.pFunc:=FO_COPY - but I'm pretty sure pFunc is the correct qualifier. I don't know where to look to find the source code for that shfileoperation function or the LPSHFileopstructa struct as implemented by Lazarus. Has anyone done this already and made it work? I've tried the fileopstructw and fileopstruct versions but they all have one problem or another. I presume fileopstructw is for "wide" filenames?

1. since fos is a pointer to a record you should aceess its member with ^. in objfpc mode. So just write it so:
fos^.pFunc := FO_COPY;

And I see another problem in your code. Since fos is a pointer you need to allocate it with GetMem, and deallocated later with FreeMem.

Or even better if you will use record instead of pointer to a record (LPSHFileopstructa) as fos and pass @fos to the shfileoperationa. I have not seen where LPSHFileopstructa is declared but it should be declared as

LPSHFileopstructa = ^SomeRecord; Use SomeRecord instead of LPSHFileopstructa as type for fos and use @fos as an argument to the shfileoperationa.

Another problem is that you are using windows API - this is not cross platform way - you will not be able to compile the same code on linux or mac. If you want to copy one file from path_a to path_b then I can suggest you to use streams.

For example (I am writing it here without any check):

procedure MyCopyFile(FileNameFrom, FileNameTo: String);
var
   SFrom, STo: TStream;
   P: PAnsiChar;
begin
   SFrom := TFileStream.Create(FileNameFrom, fmOpenRead);
   STo := TFileStream.Create(FileNameTo, fmCreate);
   P := GetMem(SFrom.Size);
   SFrom.Read(P^, SFrom.Size);
   STo.Write(P^, SFFrom.Size);
   FreeMem(P);
   SFrom.Free;
   STo.Free;
end;
Show quoted text 12 lines
Question 2: In my lazarus-generated data input window the user can hit the tab key to move to the next edit window or combobox while filling out the form. That works fine. How can I make it move the cursor from one box to the next by hitting the space bar instead of the tab key, and how can I "place" the cursor in the appropriate box to start the next data entry from within the Lazarus unit1 module so the user doesn't have to use the mouse?

You can turn KeyPreview of your Form to True and add OnKeyPress handler. In your OnKeyPress handler make a check for space key and focus control you like.

For example:

TForm1.Form1KeyPress(Sender: TObject; var Key: Char);
begin
   if Key = 32 then
     PerformTab(True);
end;
Show quoted text 7 lines
Question 3: After the last box is filled in, it would be convenient to just hit the ENTER key instead of using the mouse to click the "Submit" button. I have no idea at all how to ask Lazarus to do this.

Turn on "Default" property of your "Submit" button. It will catch ENTER itself.

Best regards,
Paul Ishenin.

Reply by email

nataraj
to Paul Ishenin

Hi All

I need to write Gui Apps for an ARM linux which runs on a device which is very much like a Pocket PC.

I successfully tried out WxWidgets with pure X11, without Gtk and others. These applications are written using C language.

Are there a gui compos in Lazarus which use only X11/ Xlib? Again I dont want to use dynamic libs. Will static linking using Xlib amount to lots of size?

regards

Nataraj

Reply by email

Bill de Carle
to Paul Ishenin: ... 1. since fos is a pointer to a record you should aceess its member with ^. in objfpc…
Paul Ishenin wrote 6 lines
1. since fos is a pointer to a record you should aceess its member with ^. in objfpc mode. So just write it so: fos^.pFunc := FO_COPY; And I see another problem in your code. Since fos is a pointer you need to allocate it with GetMem, and deallocated later with FreeMem.

Thank you Paul. I made the necessary changes, recompiled and voila! it worked first time.
Just out of curiosity, how did you know fos was a pointer? I have not been able to find where LPSHFileopstructa is defined either. Is this documented somewhere or does the type identifier give us the clue? Not knowing otherwise, do all Windows API calls work that way?

Another problem is that you are using windows API - this is not cross platform way - you will not be able to compile the same code on linux or mac. If you want to copy one file from path_a to path_b then I can suggest you to use streams.

Fortunately I don't need to compile on linux or mac. I wanted to transfer a group of files as in: COPY Z:\VA3NRR*.txt C:\BACKUP and this shfileoperation seemed to be the most straightforward way to do it. I'll look into using Stream.

Show quoted text 24 lines
> Question 2: > In my lazarus-generated data input window the user can hit the tab > key to move to the > next edit window or combobox while filling out the form. That works > fine. How can I > make it move the cursor from one box to the next by hitting the space > bar instead of > the tab key, and how can I "place" the cursor in the appropriate box > to start the next > data entry from within the Lazarus unit1 module so the user doesn't > have to use the > mouse? You can turn KeyPreview of your Form to True and add OnKeyPress handler. In your OnKeyPress handler make a check for space key and focus control you like. For example: TForm1.Form1KeyPress(Sender: TObject; var Key: Char); begin if Key = 32 then PerformTab(True); end;

Thanks again. I had to use: if Key=' ' (suppose if key=chr(32) would work also). Where did you learn about the PerformTab(True)? Is there a list of all those things available somewhere?

Show quoted text 10 lines
> > Question 3: > After the last box is filled in, it would be convenient to just hit > the ENTER key instead > of using the mouse to click the "Submit" button. I have no idea at > all how to ask Lazarus > to do this. Turn on "Default" property of your "Submit" button. It will catch ENTER itself.

Works exactly the way I wanted. Where does one find out these things? It's like I'm still groping around in a dark room. Eventually I'll figure it all out. Thanks a million, Bill

Reply by email

Lee Jenkins
to nataraj: Hi All I need to write Gui Apps for an ARM linux which runs on a device which is very…
nataraj wrote 16 lines
Hi All I need to write Gui Apps for an ARM linux which runs on a device which is very much like a Pocket PC. I successfully tried out WxWidgets with pure X11, without Gtk and others. These applications are written using C language. Are there a gui compos in Lazarus which use only X11/ Xlib? Again I dont want to use dynamic libs. Will static linking using Xlib amount to lots of size? regards Nataraj

fpGUI I think draws itself using the OS's underlying API's. And its maturing very nicely from what I can tell. Probably what I'll use when I start WinCE development in about 6 months or so.

Warm Regards, Lee

Reply by email

Lee Jenkins
to Bill de Carle: Thank you Paul. I made the necessary changes, recompiled and voila! it worked first time.
Bill de Carle wrote 6 lines
Works exactly the way I wanted. Where does one find out these things? It's like I'm still groping around in a dark room. Eventually I'll figure it all out. Thanks a million, Bill

I think most people that use Lazarus have some experience with Delphi and Lazarus emulates delphi rather nicely. If you can get your hands on a copy of Delphi help files that would help you a lot. Also, I include the keywords "delphi" and "lazarus" when I'm googling for information an examples .

Warm Regards, Lee "When my company started out, we were really, really, really, really small. Now...we're just really small."

Reply by email

Paul Ishenin
to Bill de Carle: Thank you Paul. I made the necessary changes, recompiled and voila! it worked first time.
Bill de Carle wrote 5 lines
Just out of curiosity, how did you know fos was a pointer? I have not been able to find where LPSHFileopstructa is defined either. Is this documented somewhere or does the type identifier give us the clue? Not knowing otherwise, do all Windows API calls work that way?

1. you can guess pointer by that type name: LP - dont know exact mean, but suppose something like long pointer. It is usual winapi naming.
2. It was not a big problem to understand that you have problem with pointer since compiler told you that. Invalid qualifier means that you use '.' but should use '^.' :)

You can turn that behaviour off by adding {$mode delphi} at the begining of your unit.

Thanks again. I had to use: if Key=' ' (suppose if key=chr(32) would work also). Where did you learn about the PerformTab(True)? Is there a list of all those things available somewhere?

I'm lazarus developer and I know this things or know where to find (look at sources near VK_TAB handling) :)

Show quoted text 5 lines
Works exactly the way I wanted. Where does one find out these things? It's like I'm still groping around in a dark room. Eventually I'll figure it all out. Thanks a million, Bill

Last one is a well known delphi feature.

Lazarus is delphi compatible in most things. You can get any delphi book, read it and then try it on lazarus. You can read delphi/lazarus documentation. And the best knowledge you will get from sources (lazarus sources ofcource).

Best regards,
Paul Ishenin.

Reply by email

Graeme Geldenhuys
to Bill de Carle: Thank you Paul. I made the necessary changes, recompiled and voila! it worked first time.

2008/5/6 Bill de Carle :

Works exactly the way I wanted. Where does one find out these things?

Paul is very cleaver! ;-)

You can also try the following website to give you some pointers: http://www.delphibasics.co.uk/

Also remember that you can navigate the source code in the LCL (Lazarus Component Library) almost like a web browser. Ctrl+RightClick on for example TForm and it will take you to the definition of TForm class. You can Ctrl+RightClick on many things. Method names, variables, class names etc... Browsing the source code of the LCL is a good way to find information as well.

You can also browse the existing help online. Not everything is completely documented, but you can find a lot of information. The RTL is well documented.

RTL - Free Pascal Run Time Library
http://lazarus-ccr.sourceforge.net/docs/rtl

FCL - Free Component Library
http://lazarus-ccr.sourceforge.net/docs/fcl

LCL - Lazarus Component Library
http://lazarus-ccr.sourceforge.net/docs/lcl

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys

2008/5/6 Graeme Geldenhuys :

Also remember that you can navigate the source code in the LCL (Lazarus Component Library) almost like a web browser. Ctrl+RightClick

Sorry, minor correction. You can browse any code (RTL, FCL, RTL and even your own code) and you must use Ctrl+LeftClick instead. :)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to nataraj: Hi All I need to write Gui Apps for an ARM linux which runs on a device which is very…

2008/5/6 nataraj :

Are there a gui compos in Lazarus which use only X11/ Xlib? Again I dont want to use dynamic libs. Will static linking using Xlib amount to lots of size?

Felipe is right. fpGUI should do the trick, but it hasn't been tested on mobile devices. The current fpGUI talks directly to XLib and does not require glibc or GTK. It does use Xft however for anti-aliased fonts - not sure if your ARM device has Xft installed. It should be very easy to revert back to the old XLib font support if you require it. After all, fpGUI used to use that first, before I changed it to the prettier Xft font support.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Lee Jenkins
to nataraj: Hi All I need to write Gui Apps for an ARM linux which runs on a device which is very…
nataraj wrote 11 lines
Hi All I need to write Gui Apps for an ARM linux which runs on a device which is very much like a Pocket PC. I successfully tried out WxWidgets with pure X11, without Gtk and others. These applications are written using C language. Are there a gui compos in Lazarus which use only X11/ Xlib? Again I dont want to use dynamic libs. Will static linking using Xlib amount to lots of size?

Do you mind if I ask which device you are using? I thought to use WinCE but a nice linux device would be appealing for a project I have coming up.

Warm Regards, Lee "When my company started out, we were really, really, really, really small. Now...we're just really small."

Reply by email

Sam Liddicott

I can't answer for him, but I just got am XDA exec and am in the process of putting titchy mobile linux on it.

Sam

Earlier message 31 lines
-----Original Message----- From: Lee Jenkins Sent: 06 May 2008 21:42 To: General mailing list Subject: Re: [Lazarus] Lazarus on ARM Linux questions, compos using Xlib nataraj wrote: > Hi All > > I need to write Gui Apps for an ARM linux which runs on a device which > is very much like a Pocket PC. > > I successfully tried out WxWidgets with pure X11, without Gtk and > others. These applications are written using C language. > > Are there a gui compos in Lazarus which use only X11/ Xlib? > Again I dont want to use dynamic libs. Will static linking using Xlib > amount to lots of size? Do you mind if I ask which device you are using? I thought to use WinCE but a nice linux device would be appealing for a project I have coming up. -- Warm Regards, Lee "When my company started out, we were really, really, really, really small. Now...we're just really small."

Reply by email

Lee Jenkins
to Sam Liddicott
Sam Liddicott wrote 8 lines
I can't answer for him, but I just got am XDA exec and am in the process of putting titchy mobile linux on it. Sam Do you mind if I ask which device you are using? I thought to use WinCE but a nice linux device would be appealing for a project I have coming up.

Sweet, like this one?

http://cgi.ebay.com/NEW-O2-XDA-EXEC-WiFi-FREE-Bluetooth-Headset-included_W0QQitemZ130216868443QQihZ003QQcategoryZ3312QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

TinyURL:
http://tinyurl.com/593snc

Warm Regards, Lee "When my company started out, we were really, really, really, really small. Now...we're just really small."

Reply by email

Sam Liddicott

Yep.

Sam

Earlier message 35 lines
-----Original Message----- From: Lee Jenkins Sent: 07 May 2008 02:52 To: General mailing list Subject: Re: [Lazarus] Lazarus on ARM Linux questions, compos using Xlib Sam Liddicott wrote: > I can't answer for him, but I just got am XDA exec and am in the process of putting titchy mobile linux on it. > > Sam > > > Do you mind if I ask which device you are using? I thought to use WinCE but a > nice linux device would be appealing for a project I have coming up. > Sweet, like this one? http://cgi.ebay.com/NEW-O2-XDA-EXEC-WiFi-FREE-Bluetooth-Headset-included_W0QQitemZ130216868443QQihZ003QQcategoryZ3312QQssPageNameZWDVWQQrdZ1QQcmdZViewItem TinyURL: http://tinyurl.com/593snc -- Warm Regards, Lee "When my company started out, we were really, really, really, really small. Now...we're just really small."

Reply by email

Martin Schreiber
to Felipe Monteiro de Carvalho: We are writting a fpgui interface for Lazarus, but it's still are very, very initial…
Felipe Monteiro de Carvalho wrote
There is also msegui, but as far as I remember it has some dependency on glibc, so I have serious doubts if it would run in arm without modifications.

Koenraad Lelong managed to run a MSEgui application on an arm-linux device, see the thread "MSE gui for arm-linux" from 2007-12-26 in NNTP: news://news.grid-sky.com/public.mseide-msegui.talk

He used the i386-linux libc bindings IIRC.
MSEgui does not use many libc routines. The reason for using libc in MSEgui is Kylix compatibility (Kylix has no baseunix) and locale support. It is planned to either {$ifdef} libc calls in MSEgui for FPC version or to implement MSEgui specific multi platform libc bindings. MSEgui works with and without xft.

Martin

Reply by email

Luca Olivetti
to Lee Jenkins: Sweet, like this one? http://cgi.ebay.com/NEW-O2-XDA-EXEC-WiFi-FREE-Bluetooth-Headset-incl…

En/na Lee Jenkins ha escrit:

Show quoted text 13 lines
Sam Liddicott wrote: > I can't answer for him, but I just got am XDA exec and am in the process of putting titchy mobile linux on it. > > Sam > > > Do you mind if I ask which device you are using? I thought to use WinCE but a > nice linux device would be appealing for a project I have coming up. > Sweet, like this one? http://cgi.ebay.com/NEW-O2-XDA-EXEC-WiFi-FREE-Bluetooth-Headset-included_W0QQitemZ130216868443QQihZ003QQcategoryZ3312QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

Why coax Linux in an expensive device made for windows mobile, when you can get a cheaper one made for Linux like the nokia n800/n810? (beware: it has some closed hardware, like the wifi chip, and I didn't have time yet to play with lazarus/fpc on mine).
It's not a phone, but the screen resolution is slightly better (800x480).

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007

Reply by email

Sam Liddicott

The reason is the one you gave - it's not a phone.

Please excuse darn stinkin' pocket outlooks top-posting.

Sam

Earlier message 32 lines
-----Original Message----- From: Luca Olivetti Sent: 07 May 2008 09:29 To: General mailing list Subject: Re: [Lazarus] Lazarus on ARM Linux questions, compos using Xlib En/na Lee Jenkins ha escrit: > Sam Liddicott wrote: >> I can't answer for him, but I just got am XDA exec and am in the process of putting titchy mobile linux on it. >> >> Sam >> >> >> Do you mind if I ask which device you are using? I thought to use WinCE but a >> nice linux device would be appealing for a project I have coming up. >> > > Sweet, like this one? > > http://cgi.ebay.com/NEW-O2-XDA-EXEC-WiFi-FREE-Bluetooth-Headset-included_W0QQitemZ130216868443QQihZ003QQcategoryZ3312QQssPageNameZWDVWQQrdZ1QQcmdZViewItem Why coax Linux in an expensive device made for windows mobile, when you can get a cheaper one made for Linux like the nokia n800/n810? (beware: it has some closed hardware, like the wifi chip, and I didn't have time yet to play with lazarus/fpc on mine). It's not a phone, but the screen resolution is slightly better (800x480). Bye -- Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007

Reply by email

Bill de Carle
to Paul Ishenin: ... 1. since fos is a pointer to a record you should aceess its member with ^. in objfpc…
Paul Ishenin wrote 12 lines
[..] You can turn KeyPreview of your Form to True and add OnKeyPress handler. In your OnKeyPress handler make a check for space key and focus control you like. For example: TForm1.Form1KeyPress(Sender: TObject; var Key: Char); begin if Key = 32 then PerformTab(True); end;

Although this works, it should be noted that the results are not identical when using the space bar and the tab key. The tab key simply moves the cursor to the next input box whereas the space bar first appends a space character to the end of the text in the edit box, then performs the tab function. This can raise an issue because the graphical representation of a space character is visually indistinguishable from "no character" so the user can't see that it is there - but the trailing space character counts as part of the length of the edit.text string and is involved when comparing strings. So if someone uses TAB to enter (in this case amateur radio callsigns which contain no imbedded spaces) and another user hits the space bar to do it, although the edit box values *look* identical in both cases the two entered strings aren't technically equal, which makes a casual check for duplicate callsign entry fail. In the above example we are presumably previewing the keystroke *before* it gets to the widgetprocessor, but it looks like the space character has already been appended to the text field by the time the onkeypress handler sees it. I don't know if this is an oversight or if it has to be done that way because that's how Delphi did it?

On another point, I see the UpDown widget doesn't work exactly as expected. Normally one would expect the value (.position) to increase then the uparrow
is clicked and decrease when the downarrow is clicked. That happens most of the time in the current implementation but it seems that whenever the direction changes the first click in the new direction actually performs the *old* operation first before changing the direction. For example, with a starting value of 0, if we upclick three times in a row the value goes to 1, 2, 3 just as expected. If we now click on the downarrow the value goes to
4 instead of 2. Subsequent clicks on the downarrow work as expected. I see there is a website for viewing bugs but haven't found a place to report such things. Is there an official bug-logging place?

Bill

Reply by email

Paul Ishenin
to Bill de Carle
Bill de Carle wrote 22 lines
At 09:39 PM 5/5/2008, Paul Ishenin wrote: > [..] > You can turn KeyPreview of your Form to True and add OnKeyPress handler. > In your OnKeyPress handler make a check for space key and focus control > you like. > > For example: > > TForm1.Form1KeyPress(Sender: TObject; var Key: Char); > begin > if Key = 32 then > PerformTab(True); > end; > Although this works, it should be noted that the results are not identical when using the space bar and the tab key. The tab key simply moves the cursor to the next input box whereas the space bar first appends a space character to the end of the text in the edit box, then performs the tab function.
[skip]
replace you code with:
if Key = #32 then
begin
  PerformTab(True);
  Key := #0;
end;
Show quoted text 14 lines
On another point, I see the UpDown widget doesn't work exactly as expected. Normally one would expect the value (.position) to increase then the uparrow is clicked and decrease when the downarrow is clicked. That happens most of the time in the current implementation but it seems that whenever the direction changes the first click in the new direction actually performs the *old* operation first before changing the direction. For example, with a starting value of 0, if we upclick three times in a row the value goes to 1, 2, 3 just as expected. If we now click on the downarrow the value goes to 4 instead of 2. Subsequent clicks on the downarrow work as expected. I see there is a website for viewing bugs but haven't found a place to report such things. Is there an official bug-logging place?

Open http://mantis.freepascal.org/, create and account there - you'll be reporter then. Select lazarus project and press "Report Issue" link.

Best regards,
Paul Ishenin.

Reply by email

Luca Olivetti
to Bill de Carle: Although this works, it should be noted that the results are not identical when using the…

En/na Bill de Carle ha escrit:

Show quoted text 14 lines
> For example: > > TForm1.Form1KeyPress(Sender: TObject; var Key: Char); > begin > if Key = 32 then > PerformTab(True); > end; Although this works, it should be noted that the results are not identical when using the space bar and the tab key. The tab key simply moves the cursor to the next input box whereas the space bar first appends a space character to the end of the text in the edit box, then performs the tab function.

You can try (untested)

     if Key = #32 then Key:=#9

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007

Reply by email

nataraj
to Lee Jenkins: Do you mind if I ask which device you are using? I thought to use WinCE but a nice linux…

Hi

I am using a ATMEL ARM9 9263 evaluation kit. Linux works perfectly well, got touch screen driver working fine.

regards

Nataraj

Lee Jenkins wrote 20 lines
nataraj wrote: > Hi All > > I need to write Gui Apps for an ARM linux which runs on a device which > is very much like a Pocket PC. > > I successfully tried out WxWidgets with pure X11, without Gtk and > others. These applications are written using C language. > > Are there a gui compos in Lazarus which use only X11/ Xlib? > Again I dont want to use dynamic libs. Will static linking using Xlib > amount to lots of size? > Do you mind if I ask which device you are using? I thought to use WinCE but a nice linux device would be appealing for a project I have coming up.

Reply by email

nataraj
to Graeme Geldenhuys: 2008/5/6 nataraj : Felipe is right. fpGUI should do the trick, but it hasn't been tested…

Hi

Do I star with pure FPC or lazarus?

regards

Nataraj

Graeme Geldenhuys wrote 31 lines
2008/5/6 nataraj : > Are there a gui compos in Lazarus which use only X11/ Xlib? > Again I dont want to use dynamic libs. Will static linking using Xlib > amount to lots of size? > Felipe is right. fpGUI should do the trick, but it hasn't been tested on mobile devices. The current fpGUI talks directly to XLib and does not require glibc or GTK. It does use Xft however for anti-aliased fonts - not sure if your ARM device has Xft installed. It should be very easy to revert back to the old XLib font support if you require it. After all, fpGUI used to use that first, before I changed it to the prettier Xft font support. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Graeme Geldenhuys
to nataraj

2008/5/10 nataraj :

Do I star with pure FPC or lazarus?

I use Lazarus as my IDE, but don't create LCL (Lazarus Component Library) based applications with it. Also the LCL-fpGUI widget set is still in alpha stage of development, so you can't use that either - you need to use fpGUI directly.

In Lazarus, you create a Free Pascal application. The Project Inspector should show no required packages (if you see LCL, you choose the wrong project type). Get the source of fpGUI (SubVersion repository is on SourceForge.net). Then open the fpgfx_package.lpk in the src/corelib/x11 directory and compile. Then open the fpgui_package.lpk and the src/gui directory and compile. Now add fpgui_package.lpk as required package to you open project in Lazarus's Project Inspector. In the fpgui/trunk/extras/code_templates/ directory, there is code templates to get a fpGUI project started.

To visually design your forms, you need to compile the <fpgui>/examples/apps/uidesigner/ project. You can't use the Lazarus built-in form designer as it's LCL specific.

For more details or support, you can join the fpGUI support newsgroup. See the website
below for details (the server seems down at the moment, but in 8 hours I'll be able to reboot the server and get it up and running again).

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email