Sign in Join

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

Mailing lists / lazarus / 2000-05

Can someone help?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Chris Moody

Hi all,

I started playing around with fpc, to see if I could make a Windowed app. I tried the following code in both Windows and Linux, and both of them give me some odd errors.

When I try to build the project, I am told that System/SysLinux doesn't exist (although I tell the compiler exactly where to look, using the -Fu option)

Also, if I asked ppc386 to just look at the unit, it complained also, I'm assuming because I didn't know exactly how a file that describes a form gets put together.

Below is the code for the unit that describes the form, can someone tell me the order in how it should appear in the file? And also tell me how do I get the system to recognize System and LinuxSystem?

Thanks,

Chris
----------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00001.bin
Type: application/octet-stream
Size: 1005 bytes
Desc: "Unit1.pp"
Url : http://localhost/pipermail/lazarus/attachments/20000502/e0fedb05/bin00001.bin

Reply by email

Shane Miller

To design a form, just look at the examples directory. The basics are

TForm1 = class(TForm)
   Button1 : TButton;
private
  Procedure Button1Click(Sender : TObject);
public
constructor Create(AOwner : TComponent);
end;
var
Form1 : TForm;
implementation
Constructor TForm1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
   Button1 := TButton.Create;
   with Button1 do
    Begin
       parent := Self;  //set to the form
       Caption := 'Test Button';
       Visible := True;
       OnClick := @Button1Click;
    end;
end;
Procedure TForm1.Button1Click(sender : Tobject);
Begin
Form1.Caption := 'Button Clicked';
End;

To create a new form is easy because you don't need to assign the parent and such because technocally there isn't one. You do have to call it's create but that's usually done in the Application.CreateForm(..) procedure....

This help any?

Shane

>> 05/03/00 09:22AM >>>

Hi Marc,

I followed your suggestion, and now fpc doesn't complain about not being able to find units. Now I just need to figure out how to correctly tell it how to design a form :-)

Chris

Earlier message 56 lines
----- Original Message ----- From: "Marc Weustink" To: ; "Lazarus Mail" Sent: Tuesday, May 02, 2000 4:19 PM Subject: Re: [lazarus] Can someone help? > At 15:51 02-05-2000 -0700, Chris Moody wrote: > >Hi all, > > > >I started playing around with fpc, to see if I could make a Windowed app. I > >tried the following code in both Windows and Linux, and both of them give me > >some odd errors. > > > >When I try to build the project, I am told that System/SysLinux doesn't > >exist (although I tell the compiler exactly where to look, using the -Fu > >option) > > This won't work (or you have have to include all locations) > > >Also, if I asked ppc386 to just look at the unit, it complained also, I'm > >assuming because I didn't know exactly how a file that describes a form gets > >put together. > > > >Below is the code for the unit that describes the form, can someone tell me > >the order in how it should appear in the file? And also tell me how do I get > >the system to recognize System and LinuxSystem? > > If you want to compile things without makefile, make sure your rtl and fcl > dir are made. > Copy the .o and .ppu files from ./rtl/linux and ./fcl/linux to ./units/linux > Point the compiler to this units dir (-Fu commandline or ppc386.cfg). Make > sure you dont refer to the rtl or fcl dir. > > Marc > > > > > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Marc Weustink
to Chris Moody: I started playing around with fpc, to see if I could make a Windowed app. I tried the…
Chris Moody wrote 9 lines
Hi all, I started playing around with fpc, to see if I could make a Windowed app. I tried the following code in both Windows and Linux, and both of them give me some odd errors. When I try to build the project, I am told that System/SysLinux doesn't exist (although I tell the compiler exactly where to look, using the -Fu option)

This won't work (or you have have to include all locations)

Show quoted text 7 lines
Also, if I asked ppc386 to just look at the unit, it complained also, I'm assuming because I didn't know exactly how a file that describes a form gets put together. Below is the code for the unit that describes the form, can someone tell me the order in how it should appear in the file? And also tell me how do I get the system to recognize System and LinuxSystem?

If you want to compile things without makefile, make sure your rtl and fcl dir are made.
Copy the .o and .ppu files from ./rtl/linux and ./fcl/linux to ./units/linux Point the compiler to this units dir (-Fu commandline or ppc386.cfg). Make sure you dont refer to the rtl or fcl dir.

Marc

Reply by email

Chris Moody
to Marc Weustink

Hi Marc,

I followed your suggestion, and now fpc doesn't complain about not being able to find units. Now I just need to figure out how to correctly tell it how to design a form :-)

Chris

Earlier message 51 lines
----- Original Message ----- From: "Marc Weustink" To: ; "Lazarus Mail" Sent: Tuesday, May 02, 2000 4:19 PM Subject: Re: [lazarus] Can someone help? > At 15:51 02-05-2000 -0700, Chris Moody wrote: > >Hi all, > > > >I started playing around with fpc, to see if I could make a Windowed app. I > >tried the following code in both Windows and Linux, and both of them give me > >some odd errors. > > > >When I try to build the project, I am told that System/SysLinux doesn't > >exist (although I tell the compiler exactly where to look, using the -Fu > >option) > > This won't work (or you have have to include all locations) > > >Also, if I asked ppc386 to just look at the unit, it complained also, I'm > >assuming because I didn't know exactly how a file that describes a form gets > >put together. > > > >Below is the code for the unit that describes the form, can someone tell me > >the order in how it should appear in the file? And also tell me how do I get > >the system to recognize System and LinuxSystem? > > If you want to compile things without makefile, make sure your rtl and fcl > dir are made. > Copy the .o and .ppu files from ./rtl/linux and ./fcl/linux to ./units/linux > Point the compiler to this units dir (-Fu commandline or ppc386.cfg). Make > sure you dont refer to the rtl or fcl dir. > > Marc > > > > > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus

Reply by email