[lazarus] Form options to not hide, and other stuff

John August johna at babel.apana.org.au
Sat Dec 22 21:22:36 EST 2001


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

> > > 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.

> > 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.

> > 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






More information about the Lazarus mailing list