Sign in Join

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

Mailing lists / lazarus / 2001-12

Form options to not hide, and other stuff

11 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Peter Vreman
> I also had problems compiling from the CVS ! Fortunately, I just ran > make enough times, and each time around it had fewer errors. It was > disconcerting. There is a bug in the current compiler. (The fpc rpm from the lazarus site has not this

bug 0815).

If recompiling the whole IDE (or compiling it the first time) a make fails, because fpc

complains about incompatible method/procs. Which is obviously wrong, since you can simply do a second make, and the fpc compiles fine.

But I never have to 'make' it more than two times. So, I think, you have another bug. Plz send me the errors. Perhaps I find out why.

The problems with TStream.Seek() in the 1.0.5 compiler are fixed

Reply by email

Mattias Gaertner
to Peter Vreman
GMT Peter Vreman wrote 12 lines
> > I also had problems compiling from the CVS ! Fortunately, I just ran > > make enough times, and each time around it had fewer errors. It was > > disconcerting. > There is a bug in the current compiler. (The fpc rpm from the lazarus site has not this bug 0815). > If recompiling the whole IDE (or compiling it the first time) a make fails, because fpc complains about incompatible method/procs. Which is obviously wrong, since you can simply do a second make, and the fpc compiles fine. > But I never have to 'make' it more than two times. So, I think, you have another bug. > Plz send me the errors. Perhaps I find out why. The problems with TStream.Seek() in the 1.0.5 compiler are fixed

Good to know.
Although that is not the make error.

Mattias

Reply by email

John August
to John August: I'm converting a program from Delphi to Lazarus for designing drains, Drainmaker. No…
Mattias Gaertner wrote 8 lines
On Sun, 9 Dec 2001 22:42:53 +1100 John August wrote: > I'd like to have new forms not cover the old ones, because I have a > separate form for the graphical work area. Does this involve the > "dock" stuff in the form, or how does it work ? Docking is not implemented yet. You have to position the forms manually. See runparamsopts.pas for an example. There the form is positioned in the form's constructor.

You are talking about "SetBounds" ? Where is some documentation on it ? Is it a lazarus, or a ppc function ?

Show quoted text 10 lines
> I also need to put in the code to link the different forms together. Is > there a way of automating this ? In the demo, you have to do the various > options for the different elements of the bench form array, The demo creates 59 forms and each one has a different component set. I don't see how you can automate this. Perhaps you mean a 'Wizard Wizard'? > but in visual components that seems done already. What do you mean?

With the source I am using, there seem to be no explicit creation code which sets up a heirachy, with the various forms and components being created and allocated to a parent.

But perhaps I misunderstand what is going on in Delphi.

Show quoted text 6 lines
> There's trouble using the visual lazarus environment. When I try to open > a new project, it crashes, Does this mean, you can't open any old project AND you can't create any new project?

Since I've added the compiler path, I can create a new project. However, when I try to open a given project, there's an error :

forms.pp - finalization section
[TMainIDE.Destroy] A
[TMainIDE.Destroy] B -> inherited Destroy...
An unhandled exception occurred at 0x4023AE72 :
Access violation
0x4023AE72 main, line 234 of graphics.pplcllinux.pp 0x401D050B main, line 234 of graphics.pplcllinux.pp 0x401FE3E3 main, line 234 of graphics.pplcllinux.pp 0x401FC4D3 main, line 234 of graphics.pplcllinux.pp 0x4023845D main, line 234 of graphics.pplcllinux.pp 0x40238FF0 main, line 234 of graphics.pplcllinux.pp 0x401E17CA main, line 234 of graphics.pplcllinux.pp 0x0820D0F0 main, line 234 of graphics.pplcllinux.pp 0x4037E460 main, line 234 of graphics.pplcllinux.pp

An unhandled exception occurred at 0x6E617453 :
Access violation
0x6E617453 main, line 234 of graphics.pplcllinux.pp 0x00000001
0x081EB6EC main, line 234 of graphics.pplcllinux.pp

So I still cannot get it to work ! But, never mind, I can manage with separate files.

Show quoted text 7 lines
> and when I try a build all, it it puts out > : "error : a directory in "" does not exist or is a dangling symlink. > I can give more information if this is not an obvious beginner problem. You have not set the compiler path. (Environment->General->Files) I have added some code, so that there will be a better error message. Also, the IDE will now search in a few places for the compiler.

OK, it does compile now. I have difficulty loading files into my own project, and replacing the default "unit1.pas". But, it does start compiling.

Show quoted text 9 lines
> I also had problems compiling from the CVS ! Fortunately, I just ran > make enough times, and each time around it had fewer errors. It was > disconcerting. There is a bug in the current compiler. (The fpc rpm from the lazarus site has not this bug 0815). If recompiling the whole IDE (or compiling it the first time) a make fails, because fpc complains about incompatible method/procs. Which is obviously wrong, since you can simply do a second make, and the fpc compiles fine. But I never have to 'make' it more than two times. So, I think, you have another bug. Plz send me the errors. Perhaps I find out why.

Er ... now it compiles without problem, and I'd have to search for the links and sub directories where I've linked files in. Sorry, I'm not keen to do that :(

Show quoted text 5 lines
> I'm not on the list, but if you could fill me in here, it would be > appreciated. Ok. I hope, further replies will also send to ""

Thanks for your comments.

I'm also trying to get the arc function going, without any luck. Do you have any demonstration programs incorporating it ?

I hope to put up the source for a rectangular drain maker soon, so if you're curious, you'll then be able to see what I'm up to.

Thanks,

John August

Reply by email

Mattias Gaertner
to John August: I'm converting a program from Delphi to Lazarus for designing drains, Drainmaker. No…
> Docking is not implemented yet. You have to position the forms manually. See runparamsopts.pas for an example. There the form is positioned in the form's constructor. You are talking about "SetBounds" ? Where is some documentation on it ? Is it a lazarus, or a ppc function ?

Sorry, there is no documentation yet. But it is the same procedure as in Delphi: Every TControl has this:

    procedure SetBounds(aLeft, aTop, aWidth, aHeight : integer);

All interfaces of the lazarus component library can be found in the lcl dir. Just grep:

grep -in "setbounds" <lazarusdir>/lcl/*

Show quoted text 5 lines
With the source I am using, there seem to be no explicit creation code which sets up a heirachy, with the various forms and components being created and allocated to a parent. But perhaps I misunderstand what is going on in Delphi.

The Parent property defines the visual hierachy. In Delphi6 this is shown in the component tree above the object inspector. But currently the form editing in the L. ide is buggy and thus you have to do it yourself in source. (As soon as the lcl has a nice treeview, I will create a component tree, since I missed this thing since Delphi4).

Since I've added the compiler path, I can create a new project. However, when I try to open a given project, there's an error : forms.pp - finalization section

This line indicates, that the program was halted. The error must be above this line. If there is no useful message, activate the IDE_DEBUG define in <lazarusdir>/include/ide.inc and do a 'make cleanall all'.

OK, it does compile now. I have difficulty loading files into my own project, and replacing the default "unit1.pas".

What difficulties?

Er ... now it compiles without problem, and I'd have to search for the links and sub directories where I've linked files in. Sorry, I'm not keen to do that :(

linked files?

I'm also trying to get the arc function going, without any luck. Do you have any demonstration programs incorporating it ?

Sorry, Arc is not implemented yet.

I hope, further replies will also send to ""

Mattias

Reply by email

John August

I'm converting a program from Delphi to Lazarus for designing drains, Drainmaker. No profit in this program !

I'd like to have new forms not cover the old ones, because I have a separate form for the graphical work area. Does this involve the "dock" stuff in the form, or how does it work ?

I also need to put in the code to link the different forms together. Is there a way of automating this ? In the demo, you have to do the various options for the different elements of the bench form array, but in visual components that seems done already.

There's trouble using the visual lazarus environment. When I try to open a new project, it crashes, and when I try a build all, it it puts out : "error : a directory in "" does not exist or is a dangling symlink. I can give more information if this is not an obvious beginner problem.

I also had problems compiling from the CVS ! Fortunately, I just ran make enough times, and each time around it had fewer errors. It was disconcerting.

I'm not on the list, but if you could fill me in here, it would be appreciated.

Thanks,

John August I may not have a floating point processor, but I can overclock the CPU.

Reply by email

Shane Miller

If you don't want new forms that appear to cover old ones then you'll have to code that manually. There isn't anything in Lazarus to do that.

Linking forms together: Are you referring to placing one forms controls onto another form so it's like docking? If so, just set the controls parent on form2 to form1.

The error """ does not exist" and the dangling symlink error is caused by you not specifying the compiler. DId you go into the optios in LAzarus and specify the location to your compiler?

When compiling with CVS, do a MAKE CLEAN ALL. SOmetimes you manually need to remove all *.o and *.ppu files to get the command line version to work. If old .o and .ppu files exist sometimes the commandline gives odd errors.

Hope this helps.
Shane

>> 12/08/01 06:40PM >>>

I'm converting a program from Delphi to Lazarus for designing drains, Drainmaker. No profit in this program !

I'd like to have new forms not cover the old ones, because I have a separate form for the graphical work area. Does this involve the "dock" stuff in the form, or how does it work ?

I also need to put in the code to link the different forms together. Is there a way of automating this ? In the demo, you have to do the various options for the different elements of the bench form array, but in visual components that seems done already.

There's trouble using the visual lazarus environment. When I try to open a new project, it crashes, and when I try a build all, it it puts out : "error : a directory in "" does not exist or is a dangling symlink. I can give more information if this is not an obvious beginner problem.

I also had problems compiling from the CVS ! Fortunately, I just ran make enough times, and each time around it had fewer errors. It was disconcerting.

I'm not on the list, but if you could fill me in here, it would be appreciated.

Thanks,

John August I may not have a floating point processor, but I can overclock the CPU. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Mattias Gaertner
to John August: I'm converting a program from Delphi to Lazarus for designing drains, Drainmaker. No…
I'd like to have new forms not cover the old ones, because I have a separate form for the graphical work area. Does this involve the "dock" stuff in the form, or how does it work ?

Docking is not implemented yet. You have to position the forms manually. See runparamsopts.pas for an example. There the form is positioned in the form's constructor.

I also need to put in the code to link the different forms together. Is there a way of automating this ? In the demo, you have to do the various options for the different elements of the bench form array,

The demo creates 59 forms and each one has a different component set. I don't see how you can automate this. Perhaps you mean a 'Wizard Wizard'?

but in visual components that seems done already.

What do you mean?

There's trouble using the visual lazarus environment. When I try to open a new project, it crashes,

Does this mean, you can't open any old project AND you can't create any new project?

and when I try a build all, it it puts out : "error : a directory in "" does not exist or is a dangling symlink. I can give more information if this is not an obvious beginner problem.

You have not set the compiler path. (Environment->General->Files) I have added some code, so that there will be a better error message. Also, the IDE will now search in a few places for the compiler.

I also had problems compiling from the CVS ! Fortunately, I just ran make enough times, and each time around it had fewer errors. It was disconcerting.

There is a bug in the current compiler. (The fpc rpm from the lazarus site has not this bug 0815). If recompiling the whole IDE (or compiling it the first time) a make fails, because fpc complains about incompatible method/procs. Which is obviously wrong, since you can simply do a second make, and the fpc compiles fine. But I never have to 'make' it more than two times. So, I think, you have another bug. Plz send me the errors. Perhaps I find out why.

I'm not on the list, but if you could fill me in here, it would be appreciated.

Ok. I hope, further replies will also send to ""

Mattias

Reply by email

Mattias Gaertner
to John August: I'm converting a program from Delphi to Lazarus for designing drains, Drainmaker. No…
Show quoted text 10 lines
> > Since I've added the compiler path, I can create a new project. However, > > when I try to open a given project, there's an error : > > > > forms.pp - finalization section > > This line indicates, that the program was halted. The error must be above this line. OK, here's the stuff prior : [...]

The bug happens inside the gtk, so there was no useful debugging message. Can u describe/send me a simple example, where the bug shows up?

Show quoted text 9 lines
> > OK, it does compile now. I have difficulty loading files into my own > > project, and replacing the default "unit1.pas". > > What difficulties? I open a file, unit1.pp, and the "unit1" which sits in the Lazarus source editor is still there, so you have unit1 and unit1(2) in the source editor. The problem is to get the form in unit1(2) compile and connect to other stuff, without the Form1 in the default code interfering.

Interfering in the IDE or in the code?

If they interfere in the IDE, then this is a bug. Plz send me a short description, how they interfere or what are you trying to do. The IDE creates forms in a different way than a normal LCL application. It should simply be blind for form names. Unitnames should also be no problem, because the IDE distinguish units by the full filename. The short names "unit1" and "unit1(2)" are irrelevant abbreviations for the source editor.

If they interfere in the code, then you have two units with the same name in one program.

You delete the lines and the compiler complains about stuff not being there,

What stuff?

and I cannot work out how to unload the default unit1 code.

Unloading in the IDE is simply closing the file.
Removing the used unit1 from the main source can be done by Project->Remove from project. When you created an LCL application, then the main source is hidden. You can open it by View->Units... or by open the file. Normally you don't need this file, because you can edit it via the Project menu, just like Delphi.

Show quoted text 6 lines
> Sorry, Arc is not implemented yet. Could you give me an example of another X Window function which is linked to Lazarus, and a "roadmap" of the files concerned ? I'd rather not fiddle with Lazarus source, but please give me a little assistance here, and I'll make the effort myself.

In this case the roadmap will be much bigger than the code. 90% of the explanation will handle the widget independency of the LCL. I will add the arc function tomorrow.

Mattias

Reply by email

John August
to John August: I'm converting a program from Delphi to Lazarus for designing drains, Drainmaker. No…

Hi, I've been busy at a Community Activity Technology Geek Workshop. But I'm still working at the code ...

Show quoted text 6 lines
> > Docking is not implemented yet. You have to position the forms manually. See runparamsopts.pas for an example. There the form is positioned in the form's constructor. > Every TControl has this: procedure SetBounds(aLeft, aTop, aWidth, aHeight : integer);

OK, got this working. The code I'd grabbed from the demo included position screen centre, this was puzzling, but its OK now I've deleted that.

Show quoted text 8 lines
> With the source I am using, there seem to be no explicit creation code > which sets up a heirachy, with the various forms and components being > created and allocated to a parent. > > But perhaps I misunderstand what is going on in Delphi. The Parent property defines the visual hierachy. In Delphi6 this is shown in the component tree above the object inspector. But currently the form editing in the L. ide is buggy and thus you have to do it yourself in source. (As soon as the lcl has a nice treeview, I will create a component tree, since I missed this thing since Delphi4).

OK, fair enough.

Show quoted text 6 lines
> Since I've added the compiler path, I can create a new project. However, > when I try to open a given project, there's an error : > > forms.pp - finalization section This line indicates, that the program was halted. The error must be above this line.

OK, here's the stuff prior :

Gtk-CRITICAL **: file gtkrange.c: line 250 (gtk_range_get_adjustment): assertion `range != NULL' failed. Gtk-CRITICAL **: file gtkrange.c: line 250 (gtk_range_get_adjustment): assertion `range != NULL' failed. GTKAPIWidget_Init END Gtk-CRITICAL **: file gtkrange.c: line 250 (gtk_range_get_adjustment): assertion `range != NULL' failed. GTKAPIWidget_new END [TgtkObject.CreateComponent] csFixed B An unhandled exception occurred at 0x4023AE72 : Access violation 0x4023AE72 main, line 234 of graphics.pplcllinux.pp 0x69622F72 main, line 234 of graphics.pplcllinux.pp An unhandled exception occurred at 0x0815CAFA : Access violation 0x0815CAFA 0x3020200C main, line 234 of graphics.pplcllinux.pp 0x00000000 forms.pp - finalization section (etc.) -- > > OK, it does compile now. I have difficulty loading files into my own > > project, and replacing the default "unit1.pas". > > What difficulties? I open a file, unit1.pp, and the "unit1" which sits in the Lazarus source editor is still there, so you have unit1 and unit1(2) in the source editor. The problem is to get the form in unit1(2) compile and connect to other stuff, without the Form1 in the default code interfering. You delete the lines and the compiler complains about stuff not being there, and I cannot work out how to unload the default unit1 code. > > Er ... now it compiles without problem, and I'd have to search for the > > links and sub directories where I've linked files in. Sorry, I'm not keen > > to do that :( > > linked files? I mean, I make a link from directories in lazarus source to locations in /usr/lib/, and now I'd have to find them and delete them to bring the situation to the raw uncompiled state. > > I'm also trying to get the arc function going, without any luck. Do you > > have any demonstration programs incorporating it ? > > Sorry, Arc is not implemented yet. OK, so the blank section was no code, not just a placeholder where other code was inserted during compilation. OK, for X Window you have the man page : XDrawArc(display, d, gc, x, y, width, height, angle1, angle2) So, it seems you'd only have to link it into the X Window attributes of the screen you're working on. Could you give me an example of another X Window function which is linked to Lazarus, and a "roadmap" of the files concerned ? I'd rather not fiddle with Lazarus source, but please give me a little assistance here, and I'll make the effort myself. Thanks, -- John August

Reply by email