Sign in Join

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

Mailing lists / lazarus / 2003-06

CVS updates

42 messages · 7 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner

Hi,

There is a new menu editor from Martin Patik.
It is more similar to Delphis menu editor and supports templates.

Mattias

Reply by email

Mattias Gaertner

Hi all,

lazarus now supports datamodules and there is a little progress in the debugger.

- datamodules
A DataModule is a pascal unit with a TDataModule. TDataModule itself is a very basic component, but the IDE lets you edit it similar to a form. You can put any non TControl components on a datamodule. A datamodule is useful for all those components which are shared between all the forms of an application. For example your database components. TDataModule was added temporarly to forms.pp in the LCL, because the FCL does not have it. Michael V.C. will add it to the FCL in the next days, but it won't make it in fpc 1.0.8, which will become the recommended compiler for lazarus in a few days (when the packages arrive).
- fixed inserting code in front of delphi comments
- added 'Open Unit' to popupmenu of component palette
- 'stop' debugging now stops without showing error message
- source marks and breakpoints are now in sync
- fixed saving bookmarks of leftmost editor
- added enable/disable/delete all breakpoints of same source to breakpoints dialog

Mattias

Reply by email

Mattias Gaertner

Hi all,

Some users already talked about this: The lazarus version was increased to 0.9.0 beta. The plan is to announce it as soon as the fpc 1.0.8 is released and we can provide some lazarus packages for it. I hope it will happen soon ...

- Fonts of TControls are now readonly in OI
- fixed aligning and anchoring controls
- fixed tab stops for TWinControls
- implemented TLabeledEdit (the label is hidden in the OI, because the streaming is not yet implemented)
- breakpoints can now be set while compiling
- implemented hints for breakpoints in the source editor
- implemented menu items for source marks for popupmenu of source editor. (right click on a breakpoint icon)
- when debugger stops in code without debuginfo, the source editor now shows the last stack frame with debuginfo
- Setting the Working Directory in the run parameters now works

Mattias

Reply by email

Mattias Gaertner

Hi all,

- External tools now works with short filenames. They are searched in the environment variable PATH.
- added bash script highlighter from Tom Lisjac
- implemented context format for diff
- fixed initial size of TEdit, TMaskEdit, TTrackBar
- added OnChangeBounds to TControl. This event is called immediately after the OnResize event, but also if the component was moved. The event is not yet
published.
- added handler lists to TControl for OnResize and OnChangeBounds. You can now associate an arbitrary number of methods with an OnResize, OnChangeBounds
event. The handler lists are much more efficient and simpler to use than poking in the message queues. They are also type safe at compile time.
- fixed TUpDown. It uses the ChangeBounds handler of the associated control to update its own bounds.
- TUpDown: can now also be aligned to the top and to the bottom of the associated control.
- LCL now uses streamed clientwith/height for child anchors. Needed for theme
and interface independent akRight,akBottom
- Moved TColorButton to dialogs.pp and added it to 'Misc' components

Mattias

Reply by email

Marco van de Voort
to Michael Van Canneyt: Not entirely unexpected :-) IMHO this should be added later on, Delphi 6/7 offers also a…
Show quoted text 15 lines
On Wed, 18 Jun 2003, Marco van de Voort wrote: Not entirely unexpected :-) > P.s. 5 Is it possible to change the selectbox of the Object Inspector to > a select-tree, or don't we have this widget? Or is there something > else to directly see/manipulate the component hierarchy of the > form? IMHO this should be added later on, Delphi 6/7 offers also a 'component treeview' based on the GetChildren call in TComponent, but separate from the object inspector. It doesn't really have the room for it: Sometimes all of the properties hardly fit on the screen, and a treeview takes a lot of room...

Personally I think this is ok, I don't need that treeview all the time. At least not for plain editing.

I'd
- indeed keep the _editing_ of the component hierachy a separate window on demand only.
- make it possible to have the object Inspector, form-edit and that component hierarchy editor in one screen though.
- try to change the object inspector drop down box to show a treeview. For inspection (not editing) only.

(
just FYI JBuilder uses a different approach:

- the source file window has tabs on the bottom. Source gives the src editor, tab "design" the form editor.
- When in the form editor is enabled, the list where you can select methods in the current class changes to this treeview
)

Reply by email

Mattias Gaertner
to Mattias Gaertner: On Wed, 18 Jun 2003 15:14:58 +0200 (CEST) How did you move? What files? Mattias
Show quoted text 30 lines
> > > > The opened debug window remains empty. > > > > Output in main window becomes: > > > > inking /fpc/lazproj/project1 > > 116 Lines compiled, 0.6 sec > > [TCompiler.Compile] end > > [TDebugManager.DoInitDebugger] A > > [TCmdLineDebugger] Debug PID: 751 > > TApplication.HandleException Access violation > > (gdb) > > > > But I'll hunt for {$ifdef linux} and {$ifdef unix} conditionals and > > check them myself. If that doesn't reveal anything, I can always try > > to debug it then. > > > > --- > > Another problem: moving a project makes the IDE not find files. > > How did you move? mv * /new/directory > > There are absolute paths in the project1.lpi file causing this. > > What files? form1 (unit1.pas and .lrs were absolute), form2 (unit2.pas and .lrs) weren't.

The lpi only uses absolute filenames if the file is not in the project directory. Can you give the full filenames?

Mattias

Show quoted text 14 lines
P.s. 1 The copy and pasting for groupboxes works fine and is workable for a groupbox. P.s. 2 except for RadioGroups. If I drag a button and/or textfield on a radiogroup, the parent->child thing goes ok, but when run, I can't click the button or edit the tf. P.s. 3 when I enter an empty string for a RadioGroup item, and put a tf on it, (on the place where normally text would go) I can't always select the tf after. I did some resizing of the RG, so that might be related. P.s. 4 Dragging and dropping works much better when you X to local system. P.s. 5 Is it possible to change the selectbox of the Object Inspector to a select-tree, or don't we have this widget? Or is there something else to directly see/manipulate the component hierarchy of the form?

Reply by email

Marco van de Voort
to Marco van de Voort: Opdated, rebuilt, the problems are less pronounced. The opened debug window remains empty.
But I'll hunt for {$ifdef linux} and {$ifdef unix} conditionals and check them myself. If that doesn't reveal anything, I can always try to debug it then.

The problem is the fd_set call cmdlinedebugger.pp:waitforhandles. The handle that is added is negative.

That handle traces back to the tprocess object, so that one works for FreeBSD, but the handle is not ok.

That in turn seems to be created using "createpipestreams" and is named FParentInputStream;
in process.inc:47, which calls AssignPipe which is in linux.

I quick checked that, and that implementation seems sane, but I have to rebuild FPC with debug info first before I can further get into that.

?MarcoV is confused here?

Traceback

(value of output.handle filedescriptor = -1077940440 in waitforhandles)

Program received signal SIGBUS, Bus error.
$082fb778 in _LINUX$$_FD_SET$LONGINT$FDSET ()
(gdb) (gdb)
bt
#0 $082fb778 in _LINUX$$_FD_SET$LONGINT$FDSET ()
#1 $080843a5 in WAITFORHANDLES (AHANDLES=$bfbfef1c, highAHANDLES=0) at cmdlinedebugger.pp:130
#2 $08084af5 in TCMDLINEDEBUGGER__READLINE (APEEK=false, this=$288514a4) at cmdlinedebugger.pp:309
#3 $08084831 in TCMDLINEDEBUGGER__READLINE (this=$288514a4) at cmdlinedebugger.pp:246
#4 $080864e8 in TGDBMIDEBUGGER__INIT (this=$288514a4) at gdbmidebugger.pp:767
#5 $080bf98a in TDEBUGMANAGER__DOINITDEBUGGER (this=$28826964) at debugmanager.pas:1334
#6 $08262e76 in TMAINIDE__DOINITPROJECTRUN (this=$287c8024) at main.pp:5619 #7 $082631c7 in TMAINIDE__DORUNPROJECT (this=$287c8024) at main.pp:5656 #8 $08256849 in TMAINIDE__MNURUNPROJECTCLICKED (SENDER=$288208c4, this=$287c8024) at main.pp:2259
#9 $082b2aae in TCONTROL__CLICK (this=$288208c4) at control.inc:1385 #10 $0829d759 in TSPEEDBUTTON__CLICK (this=$288208c4) at speedbutton.inc:74 #11 $082b2a12 in TCONTROL__WMLBUTTONUP (MESSAGE=
{MSG = 514, KEYS = 1, XPOS = 10, YPOS = 9, POS = {X = 10, Y = 9}, RESULT = 0}, this=$288208c4)
at control.inc:1346
#12 $083211f5 in _SYSBSD$$_$$_TOBJECT_$$_DISPATCH$$$$ () #13 $082b268c in TCONTROL__WNDPROC (THEMESSAGE=
{MSG = 514, WPARAM = 1, LPARAM = 589834, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 10, LPARAMHI = 9, RESULTLO = 0, RESULTHI = 0}, this=$288208c4) at control.inc:1112
#14 $082b1a29 in TCONTROL__PERFORM (MSG=514, WPARAM=1, LPARAM=589834, this=$288208c4)
at control.inc:639
#15 $082ade07 in TWINCONTROL__ISCONTROLMOUSEMSG (THEMESSAGE= {MSG = 514, KEYS = 1, XPOS = 71, YPOS = 33, POS = {X = 71, Y = 33}, RESULT = 0}, this=$28812224)
at wincontrol.inc:1109
#16 $082ae974 in TWINCONTROL__WNDPROC (MESSAGE=
{MSG = 514, WPARAM = 1, LPARAM = 2162759, RESULT = 0, WPARAMLO = 1, WPARAMHI = 0, LPARAMLO = 71, LPARAMHI = 33, RESULTLO = 0, RESULTHI = 0}, this=$28812224) at wincontrol.inc:1481
#17 $0827210a in DELIVERMESSAGE (TARGET=$28812224, AMESSAGE=void) at gtkproc.inc:1175
#18 $08278152 in DELIVERMOUSEUPMESSAGE (WIDGET=$855fc00, EVENT=$854d018, AWINCONTROL=$28812224)
at gtkcallback.inc:1376
#19 $082781e3 in GTKMOUSEBTNRELEASE (WIDGET=$855fc00, EVENT=$854d018, DATA=$28812224)
at gtkcallback.inc:1422
#20 $2848dc62 in gtk_marshal_BOOL__POINTER () from /usr/X11R6/lib/libgtk12.so.2
#21 $284be334 in gtk_handlers_run () from /usr/X11R6/lib/libgtk12.so.2 #22 $284bd750 in gtk_signal_real_emit () from /usr/X11R6/lib/libgtk12.so.2 #23 $284bb76b in gtk_signal_emit () from /usr/X11R6/lib/libgtk12.so.2 #24 $284f2da8 in gtk_widget_event () from /usr/X11R6/lib/libgtk12.so.2 #25 $2848dbad in gtk_propagate_event () from /usr/X11R6/lib/libgtk12.so.2 #26 $2848cc9a in gtk_main_do_event () from /usr/X11R6/lib/libgtk12.so.2 #27 $2853ce16 in gdk_event_dispatch () from /usr/X11R6/lib/libgdk12.so.2 #28 $285aef22 in g_main_dispatch () from /usr/local/lib/libglib12.so.3 #29 $285af52b in g_main_iterate () from /usr/local/lib/libglib12.so.3 #30 $285af5e8 in g_main_iteration () from /usr/local/lib/libglib12.so.3 #31 $2848c87a in gtk_main_iteration_do () from /usr/X11R6/lib/libgtk12.so.2 #32 $082d33d4 in TGTKOBJECT__WAITMESSAGE (this=$84e3c14) at gtkobject.inc:1148
#33 $082a5559 in TAPPLICATION__IDLE (this=$84e3a94) at application.inc:282 #34 $082a60c4 in TAPPLICATION__HANDLEMESSAGE (this=$84e3a94) at application.inc:679
#35 $082a6234 in TAPPLICATION__RUN (this=$84e3a94) at application.inc:769 #36 $08325ecc in main () at lazarus.pp:80

Reply by email

Marco van de Voort
to Mattias Gaertner: On Tue, 17 Jun 2003 17:41:41 +0200 (CEST) Some components invoke too many invalidates. I…
Show quoted text 12 lines
> and it worked (even with remote X, though I got a lot of > > NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX > NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX > NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX > NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX > NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX > > messages), Some components invoke too many invalidates. I had not yet the time to fix it.

If it is known it is ok. I used Lazarus over a remote X connection (from the university to my home machine), and that works fine, except that dragging and dropping feels somewhat painful.

Show quoted text 11 lines
> but then I wanted to compile, and it wanted to compile for > Linux. Ridiculous! :) > Can FreeBSD/NetBSD/OpenBSD be added? The first two already run Lazarus, > and OpenBSD will probably from the next version (when they become ELF) > > These are all reasonably supported in FPC 1.0.8 Fixed

Building works, but running says

Target OS: FreeBSD/ELF for i386
Compiling /usr/home/marcov/project1.lpr
sysbsd.pp(5,1) Hint: Conditional I386 was set at startup in last compilation of sysbsd.pp linux.pp(6,13) Hint: Conditional I386 was set at startup in last compilation of linux.pp math.pp(6,13) Hint: Conditional I386 was set at startup in last compilation of math.pp Assembling project1
Linking /usr/home/marcov/project1
14 Lines compiled, 0.6 sec
[TCompiler.Compile] end
[TDebugManager.DoInitDebugger] A
[TCmdLineDebugger] Debug PID: 15337
[TCmdLineDebugger.Getoutput] Error waiting
[TDebugManager.OnDebuggerChangeState] state: dsError Ooops, the debugger entered the error state
Warning: /fpc/fixes/fpc/rtl/bsd: No such file or directory. Warning: /fpc/fixes/fpc/rtl/bsd/i386: No such file or directory. (gdb)

Gtk-CRITICAL **: file gtkstyle.c: line 3474 (gtk_paint_shadow): assertion tyle != NULL' failed.

And I get a "debugger error".

If it is normal for Linux, then there is no problem. Otherwise, please say so, and I'll try to debug the BSD behaviour.

Reply by email

Marco van de Voort
to Marc Weustink: + From: Marco van de Voort + Sent: woensdag 18 juni 2003 13:27 [Snip] + I actually…
Show quoted text 15 lines
+ I actually dragged and dropped a form, and all went pretty well. + + The only real problem is that dropping something on a form, and then + drag it on a "group" box doesn't make the component embedded, but + it simply disappears under/over. + + When trying to get widgets out of a groupbox, there's the same problem. + The widget remains in the groupbox, only its location is invisible. This is normal (Delphi) behaviour. A control is member of only one container (from, panel, groupbox etc.) and stays there. Coordinates of the control are also relative to its container. By dragging, you move the control, you're not reparent it. To reparent controls, use cut and paste, or edit the .lfm file.

Ok. So that is a difference between Delphi and JBuilder :-)

I'll practice with it...

Reply by email

Marco van de Voort
to Marc Weustink: Ow, BTW, if you get more debugger errors, open the debugoutput window (View-Debug…
Ow, BTW, if you get more debugger errors, open the debugoutput window (View-Debug windows-debugoutput, rightmouse clears output) before running and send (the last lines of) the output.

Opdated, rebuilt, the problems are less pronounced.

The opened debug window remains empty.

Output in main window becomes:

inking /fpc/lazproj/project1
116 Lines compiled, 0.6 sec
[TCompiler.Compile] end
[TDebugManager.DoInitDebugger] A
[TCmdLineDebugger] Debug PID: 751
TApplication.HandleException Access violation
(gdb)

But I'll hunt for {$ifdef linux} and {$ifdef unix} conditionals and check them myself. If that doesn't reveal anything, I can always try to debug it then.

---
Another problem: moving a project makes the IDE not find files. There are absolute paths in the project1.lpi file causing this.

Reply by email

Marc Weustink
to Marco van de Voort: Yes. 1.0.6+ knows Unix IIRC, but only with later 1.0.7's BSDs stopped defining "linux"…

+ From: Marco van de Voort
+ Sent: woensdag 18 juni 2003 13:27

[Snip]

+ I actually dragged and dropped a form, and all went pretty well. +
+ The only real problem is that dropping something on a form, and then
+ drag it on a "group" box doesn't make the component embedded, but
+ it simply disappears under/over.
+
+ When trying to get widgets out of a groupbox, there's the same problem.
+ The widget remains in the groupbox, only its location is invisible.

This is normal (Delphi) behaviour. A control is member of only one container (from, panel, groupbox etc.) and stays there. Coordinates of the control are also relative to its container. By dragging, you move the control, you're not reparent it.
To reparent controls, use cut and paste, or edit the .lfm file.

Marc

Reply by email

Unknown author
to Mattias Gaertner: On Wed, 18 Jun 2003 18:57:47 +0200 (W. Europe Daylight Time) This will will raise other…
Mattias Gaertner wrote 25 lines
On Wed, 18 Jun 2003 18:57:47 +0200 (W. Europe Daylight Time) Michael Van Canneyt wrote: > > > The lpi only uses absolute filenames if the file is not in the project > > directory. Can you give the full filenames? > > Delphi always uses filenames relative to the project directory. > SysUtils contains a function ExtractRelativePath() which does this for > you. This will will raise other problems. For example ExtractRelativepath('/home/bla/','/tmp/some.txt') results in '../../tmp/some.txt'. Moving the project to /home/ will not find the file any longer. The purpose of relative filenames is, that the project and all its files can be transferred easily to another location. Normally this means moving the project directory. The ExtractRelativepath will only help, if you spread your project over several directories: /home/projects/projectdir/project1.lpi /home/projects/otherdir/unit1.pas

I suppose that 99% of all projects will be one directory containing the project file, and all other files in directories. Lazarus itself is such a project.

So for 99% of all cases, using the relative path helps in keeping your project moveable.

This is useful for instance if you have 2 branches in CVS. If you check out the branches in different directories
/home/me/projects/myproject (+ subdirs)

Check out two copies, one for each branch:
/home/me/projects/myproject-main
/home/me/projects/myproject_fixes

If you keep relative paths, this will work. With absolute paths, you must rename all files.

I think that keeping relative paths is a solution. If you use files totally outside the project dir, then the IDE can simply store the absolute path. But all subdirectories should be as relative paths. It is a small check to do this, finally. If extractrelativepath starts with .., just use the absolute path. In all other cases, use the relative path.

Michael.

Reply by email

Mattias Gaertner
to Mattias Gaertner: On Wed, 18 Jun 2003 18:57:47 +0200 (W. Europe Daylight Time) This will will raise other…
Show quoted text 53 lines
On Wed, 18 Jun 2003, Mattias Gaertner wrote: > On Wed, 18 Jun 2003 18:57:47 +0200 (W. Europe Daylight Time) > Michael Van Canneyt wrote: > > > > > > The lpi only uses absolute filenames if the file is not in the > > > project directory. Can you give the full filenames? > > > > Delphi always uses filenames relative to the project directory. > > SysUtils contains a function ExtractRelativePath() which does this for > > you. > > This will will raise other problems. > For example ExtractRelativepath('/home/bla/','/tmp/some.txt') results in > '../../tmp/some.txt'. Moving the project to /home/ will not find the > file any longer. > The purpose of relative filenames is, that the project and all its files > can be transferred easily to another location. Normally this means > moving the project directory. > > The ExtractRelativepath will only help, if you spread your project over > several directories: > > /home/projects/projectdir/project1.lpi > /home/projects/otherdir/unit1.pas I suppose that 99% of all projects will be one directory containing the project file, and all other files in directories. Lazarus itself is such a project. So for 99% of all cases, using the relative path helps in keeping your project moveable. This is useful for instance if you have 2 branches in CVS. If you check out the branches in different directories /home/me/projects/myproject (+ subdirs) Check out two copies, one for each branch: /home/me/projects/myproject-main /home/me/projects/myproject_fixes If you keep relative paths, this will work. With absolute paths, you must rename all files. I think that keeping relative paths is a solution. If you use files totally outside the project dir, then the IDE can simply store the absolute path. But all subdirectories should be as relative paths. It is a small check to do this, finally. If extractrelativepath starts with .., just use the absolute path. In all other cases, use the relative path.

?
Is this not the same as simply cutting the project directory from the filename?

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner: On Wed, 18 Jun 2003 15:14:58 +0200 (CEST) How did you move? What files? Mattias
Show quoted text 21 lines
> > The opened debug window remains empty. > > Output in main window becomes: > > inking /fpc/lazproj/project1 > 116 Lines compiled, 0.6 sec > [TCompiler.Compile] end > [TDebugManager.DoInitDebugger] A > [TCmdLineDebugger] Debug PID: 751 > TApplication.HandleException Access violation > (gdb) > > But I'll hunt for {$ifdef linux} and {$ifdef unix} conditionals and check > them myself. If that doesn't reveal anything, I can always try to > debug it then. > > --- > Another problem: moving a project makes the IDE not find files. How did you move?

mv * /new/directory

> There are absolute paths in the project1.lpi file causing this. What files?

form1 (unit1.pas and .lrs were absolute), form2 (unit2.pas and .lrs) weren't.

P.s. 1 The copy and pasting for groupboxes works fine and is workable for a groupbox.
P.s. 2 except for RadioGroups. If I drag a button and/or textfield on a radiogroup, the parent->child thing goes ok, but when run, I can't click the button or edit the tf.
P.s. 3 when I enter an empty string for a RadioGroup item, and put a tf on it, (on the place where normally text would go) I can't always select the tf after. I did some resizing of the RG, so that might be related.
P.s. 4 Dragging and dropping works much better when you X to local system. P.s. 5 Is it possible to change the selectbox of the Object Inspector to a select-tree, or don't we have this widget? Or is there something else to directly see/manipulate the component hierarchy of the form?

Reply by email

Michael Van Canneyt
to Marco van de Voort
Marco van de Voort wrote 42 lines
> > > > The opened debug window remains empty. > > > > Output in main window becomes: > > > > inking /fpc/lazproj/project1 > > 116 Lines compiled, 0.6 sec > > [TCompiler.Compile] end > > [TDebugManager.DoInitDebugger] A > > [TCmdLineDebugger] Debug PID: 751 > > TApplication.HandleException Access violation > > (gdb) > > > > But I'll hunt for {$ifdef linux} and {$ifdef unix} conditionals and check > > them myself. If that doesn't reveal anything, I can always try to > > debug it then. > > > > --- > > Another problem: moving a project makes the IDE not find files. > > How did you move? mv * /new/directory > > There are absolute paths in the project1.lpi file causing this. > > What files? form1 (unit1.pas and .lrs were absolute), form2 (unit2.pas and .lrs) weren't. P.s. 1 The copy and pasting for groupboxes works fine and is workable for a groupbox. P.s. 2 except for RadioGroups. If I drag a button and/or textfield on a radiogroup, the parent->child thing goes ok, but when run, I can't click the button or edit the tf. P.s. 3 when I enter an empty string for a RadioGroup item, and put a tf on it, (on the place where normally text would go) I can't always select the tf after. I did some resizing of the RG, so that might be related. P.s. 4 Dragging and dropping works much better when you X to local system.

Not entirely unexpected :-)

P.s. 5 Is it possible to change the selectbox of the Object Inspector to a select-tree, or don't we have this widget? Or is there something else to directly see/manipulate the component hierarchy of the form?

IMHO this should be added later on, Delphi 6/7 offers also a 'component treeview' based on the GetChildren call in TComponent, but separate from the object inspector. It doesn't really have the room for it: Sometimes all of the properties hardly fit on the screen, and a treeview takes a lot of room...

Michael.

Reply by email

Marco van de Voort
to Marc Weustink: + From: Marco van de Voort + Sent: woensdag 18 juni 2003 13:43 + > + I actually dragged…
Show quoted text 23 lines
+ From: Marco van de Voort + Sent: woensdag 18 juni 2003 13:43 + > + I actually dragged and dropped a form, and all went pretty well. + > + + > + The only real problem is that dropping something on a form, and then + > + drag it on a "group" box doesn't make the component embedded, but + > + it simply disappears under/over. + > + + > + When trying to get widgets out of a groupbox, there's the + > + same problem. + > + The widget remains in the groupbox, only its location is invisible. + > + > This is normal (Delphi) behaviour. A control is member of only + > one container (from, panel, groupbox etc.) and stays there. + > Coordinates of the control are also relative to its container. + > By dragging, you move the control, you're not reparent it. + > To reparent controls, use cut and paste, or edit the .lfm file. + + Ok. So that is a difference between Delphi and JBuilder :-) I've never used JBuilder. I've only seen it in a pre 1.0 alpha stage and on the CDs I got with D4 :)

I had to for school. I did use Delphi a few times, but apparently not enough to not mix them up :-)

Reply by email

Mattias Gaertner
to Marc Weustink: Ow, BTW, if you get more debugger errors, open the debugoutput window (View-Debug…
Show quoted text 25 lines
> > Ow, BTW, if you get more debugger errors, open the debugoutput window > (View-Debug windows-debugoutput, rightmouse clears output) before > running and send (the last lines of) the output. Opdated, rebuilt, the problems are less pronounced. The opened debug window remains empty. Output in main window becomes: inking /fpc/lazproj/project1 116 Lines compiled, 0.6 sec [TCompiler.Compile] end [TDebugManager.DoInitDebugger] A [TCmdLineDebugger] Debug PID: 751 TApplication.HandleException Access violation (gdb) But I'll hunt for {$ifdef linux} and {$ifdef unix} conditionals and check them myself. If that doesn't reveal anything, I can always try to debug it then. --- Another problem: moving a project makes the IDE not find files.

How did you move?

There are absolute paths in the project1.lpi file causing this.

What files?

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner: On Wed, 18 Jun 2003 16:24:46 +0200 (CEST) The lpi only uses absolute filenames if the…
Mattias Gaertner wrote 36 lines
On Wed, 18 Jun 2003 16:24:46 +0200 (CEST) (Marco van de Voort) wrote: > > > > > > The opened debug window remains empty. > > > > > > Output in main window becomes: > > > > > > inking /fpc/lazproj/project1 > > > 116 Lines compiled, 0.6 sec > > > [TCompiler.Compile] end > > > [TDebugManager.DoInitDebugger] A > > > [TCmdLineDebugger] Debug PID: 751 > > > TApplication.HandleException Access violation > > > (gdb) > > > > > > But I'll hunt for {$ifdef linux} and {$ifdef unix} conditionals and > > > check them myself. If that doesn't reveal anything, I can always try > > > to debug it then. > > > > > > --- > > > Another problem: moving a project makes the IDE not find files. > > > > How did you move? > > mv * /new/directory > > > > There are absolute paths in the project1.lpi file causing this. > > > > What files? > > form1 (unit1.pas and .lrs were absolute), form2 (unit2.pas and .lrs) > weren't. The lpi only uses absolute filenames if the file is not in the project directory. Can you give the full filenames?

Delphi always uses filenames relative to the project directory. SysUtils contains a function ExtractRelativePath() which does this for you.

Michael.

Reply by email

Marco van de Voort
to Marco van de Voort: mv * /new/directory form1 (unit1.pas and .lrs were absolute), form2 (unit2.pas and .lrs)…
Show quoted text 12 lines
weren't. P.s. 1 The copy and pasting for groupboxes works fine and is workable for a groupbox. P.s. 2 except for RadioGroups. If I drag a button and/or textfield on a radiogroup, the parent->child thing goes ok, but when run, I can't click the button or edit the tf. P.s. 3 when I enter an empty string for a RadioGroup item, and put a tf on it, (on the place where normally text would go) I can't always select the tf after. I did some resizing of the RG, so that might be related.

This last one was clear when I was playing a bit.

Lazarus sets "blank" as text for an empty entry. (where I wanted to place my textfield).

Somehow that "blank" didn't display properly until I managed to move the tf, so probably when clicking, the "blank" text (and therefore the TRadioGroup) got selected, not the tf. Overlapping regions probably.

Reply by email

Mattias Gaertner
to Mattias Gaertner: On Wed, 18 Jun 2003 16:24:46 +0200 (CEST) The lpi only uses absolute filenames if the…
Show quoted text 7 lines
> The lpi only uses absolute filenames if the file is not in the project > directory. Can you give the full filenames? Delphi always uses filenames relative to the project directory. SysUtils contains a function ExtractRelativePath() which does this for you.

This will will raise other problems.
For example ExtractRelativepath('/home/bla/','/tmp/some.txt') results in '../../tmp/some.txt'. Moving the project to /home/ will not find the file any longer.
The purpose of relative filenames is, that the project and all its files can be transferred easily to another location. Normally this means moving the project directory.

The ExtractRelativepath will only help, if you spread your project over several directories:

/home/projects/projectdir/project1.lpi
/home/projects/otherdir/unit1.pas

But this is a bad idea for several reasons. If you put a unit into another directory, then the IDE expects, that the unit is not solely part of the project and so it does not apply all project settings to the otherdir (In other words: find declaration will not always work).

If you want to share unit1.pas between several projects, then you should create a package for it. If unit1.pas is not shared then it is recommended that you save the project as

/home/projects/project1.lpi

This way the

/home/projects/otherdir/unit1.pas

will be stored as

otherdir/unit1.pas

in the lpi file.

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner: On Wed, 18 Jun 2003 16:24:46 +0200 (CEST) The lpi only uses absolute filenames if the…
Show quoted text 14 lines
On Wed, 18 Jun 2003 16:24:46 +0200 (CEST) (Marco van de Voort) wrote: > mv * /new/directory > > > > There are absolute paths in the project1.lpi file causing this. > > > > What files? > > form1 (unit1.pas and .lrs were absolute), form2 (unit2.pas and .lrs) > weren't. The lpi only uses absolute filenames if the file is not in the project directory. Can you give the full filenames?

- I started "lazarus" in /fpc/projects/lazarus and then after creating a project I chose /home/marcov/lazproj as patch for each file I had to save.

- Some entering/exiting lazarus later, I started lazarus opened/home/marcov/lazproj/project1.lpr, and added the second form. I don't know in what dir I was when I started lazarus, so this _could_ be /home/marcov.

- I moved everything in /home/marcov/lazproj to /fpc/lazproj, loading unit1 when loading the project gave an error that it couldn't find /home/marcov/lazproj/unit1.pas. I corrected that in the lpr by removing the /home/marcov/lazproj paths from the line with "unit1.pas" and "unit1.lrs"

So it could be related to creating the project when startup in dir X, but then saving it to dir Y.

I tried to duplicate it, but couldn't, so I probably did something else wrong.

P.s. a lazarus made with DEBUG=1 GPFs on startup.

Reply by email

Marco van de Voort
to Mattias Gaertner: - External tools now works with short filenames. They are searched in the environment…

I was very enthusiastically dragging and dropping a nice Lazarus screen, and it worked (even with remote X, though I got a lot of

NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX

messages), but then I wanted to compile, and it wanted to compile for Linux. Ridiculous!

Can FreeBSD/NetBSD/OpenBSD be added? The first two already run Lazarus, and OpenBSD will probably from the next version (when they become ELF)

These are all reasonably supported in FPC 1.0.8

Reply by email

Marc Weustink
to Mattias Gaertner: On Tue, 17 Jun 2003 17:41:41 +0200 (CEST) Some components invoke too many invalidates. I…

At 20:07 17-6-2003 +0200, Marco van de Voort wrote:

[Snip]

Show quoted text 16 lines
[TDebugManager.DoInitDebugger] A [TCmdLineDebugger] Debug PID: 15337 [TCmdLineDebugger.Getoutput] Error waiting [TDebugManager.OnDebuggerChangeState] state: dsError Ooops, the debugger entered the error state Warning: /fpc/fixes/fpc/rtl/bsd: No such file or directory. Warning: /fpc/fixes/fpc/rtl/bsd/i386: No such file or directory. (gdb) Gtk-CRITICAL **: file gtkstyle.c: line 3474 (gtk_paint_shadow): assertion tyle != NULL' failed. And I get a "debugger error". If it is normal for Linux, then there is no problem. Otherwise, please say so, and I'll try to debug the BSD behaviour.

Ehh... debugger errors are not normal, it often shows that gdb presented a result I didn't expect.
You got the debug PID, so GDB started. Then you got an error while waiting.... I guess I have some Linux specific code there.

Hmmm... Changed the Linux directive to Unix, seems to work here (and I hope for bsd, I guess it also knows kill and select :-)

Marc

Reply by email

Mattias Gaertner
to Marc Weustink: + From: Marco van de Voort + Sent: woensdag 18 juni 2003 13:27 [Snip] + I actually…
Show quoted text 20 lines
> > + I actually dragged and dropped a form, and all went pretty well. > + > + The only real problem is that dropping something on a form, and then > + drag it on a "group" box doesn't make the component embedded, but > + it simply disappears under/over. > + > + When trying to get widgets out of a groupbox, there's the same > problem.+ The widget remains in the groupbox, only its location is > invisible. > > This is normal (Delphi) behaviour. A control is member of only one > container(from, panel, groupbox etc.) and stays there. Coordinates of > the control are also relative to its container. By dragging, you move > the control, you're not reparent it. > To reparent controls, use cut and paste, or edit the .lfm file. Ok. So that is a difference between Delphi and JBuilder :-) I'll practice with it...

stop, stop, stop

I just implemented the copy/paste for components. Please update before you do that, otherwise you will get quite unpleasant results.

Mattias

Reply by email

Marc Weustink
to Marco van de Voort: If it is known it is ok. I used Lazarus over a remote X connection (from the university…
Marc Weustink wrote 28 lines
At 20:07 17-6-2003 +0200, Marco van de Voort wrote: [Snip] >[TDebugManager.DoInitDebugger] A >[TCmdLineDebugger] Debug PID: 15337 >[TCmdLineDebugger.Getoutput] Error waiting >[TDebugManager.OnDebuggerChangeState] state: dsError >Ooops, the debugger entered the error state >Warning: /fpc/fixes/fpc/rtl/bsd: No such file or directory. >Warning: /fpc/fixes/fpc/rtl/bsd/i386: No such file or directory. >(gdb) > >Gtk-CRITICAL **: file gtkstyle.c: line 3474 (gtk_paint_shadow): assertion >tyle != NULL' failed. > >And I get a "debugger error". > >If it is normal for Linux, then there is no problem. Otherwise, please >say so, and I'll try to debug the BSD behaviour. Ehh... debugger errors are not normal, it often shows that gdb presented a result I didn't expect. You got the debug PID, so GDB started. Then you got an error while waiting.... I guess I have some Linux specific code there. Hmmm... Changed the Linux directive to Unix, seems to work here (and I hope for bsd, I guess it also knows kill and select :-)

Ow, BTW, if you get more debugger errors, open the debugoutput window (View-Debug windows-debugoutput, rightmouse clears output) before running and send (the last lines of) the output.

Marc

Reply by email

Marco van de Voort
to Marc Weustink: [Snip] Ehh... debugger errors are not normal, it often shows that gdb presented a result…
Show quoted text 26 lines
[Snip] >[TDebugManager.DoInitDebugger] A >[TCmdLineDebugger] Debug PID: 15337 >[TCmdLineDebugger.Getoutput] Error waiting >[TDebugManager.OnDebuggerChangeState] state: dsError >Ooops, the debugger entered the error state >Warning: /fpc/fixes/fpc/rtl/bsd: No such file or directory. >Warning: /fpc/fixes/fpc/rtl/bsd/i386: No such file or directory. >(gdb) > >Gtk-CRITICAL **: file gtkstyle.c: line 3474 (gtk_paint_shadow): assertion >tyle != NULL' failed. > >And I get a "debugger error". > >If it is normal for Linux, then there is no problem. Otherwise, please >say so, and I'll try to debug the BSD behaviour. Ehh... debugger errors are not normal, it often shows that gdb presented a result I didn't expect. You got the debug PID, so GDB started. Then you got an error while waiting.... I guess I have some Linux specific code there. Hmmm... Changed the Linux directive to Unix, seems to work here (and I hope for bsd, I guess it also knows kill and select :-)

Yes. 1.0.6+ knows Unix IIRC, but only with later 1.0.7's BSDs stopped defining "linux" iirc. Stupid that I didn't think of that.

I actually dragged and dropped a form, and all went pretty well.

The only real problem is that dropping something on a form, and then drag it on a "group" box doesn't make the component embedded, but it simply disappears under/over.

When trying to get widgets out of a groupbox, there's the same problem. The widget remains in the groupbox, only its location is invisible.

Reply by email

Marc Weustink
to Marco van de Voort: Ok. So that is a difference between Delphi and JBuilder :-) I'll practice with it...

+ From: Marco van de Voort
+ Sent: woensdag 18 juni 2003 13:43

+ > + I actually dragged and dropped a form, and all went pretty well.
+ > +
+ > + The only real problem is that dropping something on a form, and then
+ > + drag it on a "group" box doesn't make the component embedded, but
+ > + it simply disappears under/over.
+ > +
+ > + When trying to get widgets out of a groupbox, there's the
+ > + same problem.
+ > + The widget remains in the groupbox, only its location is invisible.
+ >
+ > This is normal (Delphi) behaviour. A control is member of only
+ > one container (from, panel, groupbox etc.) and stays there.
+ > Coordinates of the control are also relative to its container.
+ > By dragging, you move the control, you're not reparent it.
+ > To reparent controls, use cut and paste, or edit the .lfm file. +
+ Ok. So that is a difference between Delphi and JBuilder :-)

I've never used JBuilder. I've only seen it in a pre 1.0 alpha stage and on the CDs I got with D4 :)

Marc

Reply by email

Mattias Gaertner
to Mattias Gaertner: - External tools now works with short filenames. They are searched in the environment…
Show quoted text 12 lines
I was very enthusiastically dragging and dropping a nice Lazarus screen, and it worked (even with remote X, though I got a lot of NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX NOTE: TDesigner.PaintControl E control painted twice: Listbox1:TLISTBOX messages),

Some components invoke too many invalidates. I had not yet the time to fix it.

but then I wanted to compile, and it wanted to compile for Linux. Ridiculous!

:)

Can FreeBSD/NetBSD/OpenBSD be added? The first two already run Lazarus, and OpenBSD will probably from the next version (when they become ELF) These are all reasonably supported in FPC 1.0.8

Fixed

Mattias

Reply by email

Unknown author
to Mattias Gaertner: On Wed, 18 Jun 2003 20:08:10 +0200 (CEST) ? Is this not the same as simply cutting the…
Mattias Gaertner wrote 60 lines
On Wed, 18 Jun 2003 20:08:10 +0200 (CEST) wrote: > > > On Wed, 18 Jun 2003, Mattias Gaertner wrote: > > > On Wed, 18 Jun 2003 18:57:47 +0200 (W. Europe Daylight Time) > > Michael Van Canneyt wrote: > > > > > > > > > The lpi only uses absolute filenames if the file is not in the > > > > project directory. Can you give the full filenames? > > > > > > Delphi always uses filenames relative to the project directory. > > > SysUtils contains a function ExtractRelativePath() which does this for > > > you. > > > > This will will raise other problems. > > For example ExtractRelativepath('/home/bla/','/tmp/some.txt') results in > > '../../tmp/some.txt'. Moving the project to /home/ will not find the > > file any longer. > > The purpose of relative filenames is, that the project and all its files > > can be transferred easily to another location. Normally this means > > moving the project directory. > > > > > The ExtractRelativepath will only help, if you spread your project over > > several directories: > > > > /home/projects/projectdir/project1.lpi > > /home/projects/otherdir/unit1.pas > > I suppose that 99% of all projects will be one directory containing > the project file, and all other files in directories. Lazarus itself > is such a project. > > So for 99% of all cases, using the relative path helps in keeping your > project moveable. > > This is useful for instance if you have 2 branches in CVS. If you check > out the branches in different directories > /home/me/projects/myproject (+ subdirs) > > Check out two copies, one for each branch: > /home/me/projects/myproject-main > /home/me/projects/myproject_fixes > > If you keep relative paths, this will work. With absolute paths, you must > rename all files. > > I think that keeping relative paths is a solution. If you use files > totally outside the project dir, then the IDE can simply store the > absolute path. But all subdirectories should be as relative paths. It is a > small check to do this, finally. If extractrelativepath starts with .., > just use the absolute path. In all other cases, use the relative path. ? Is this not the same as simply cutting the project directory from the filename?

? Actually, yes it is :-)

But if I understood correctly, now complete filenames are used ?

Michael.

Reply by email

Mattias Gaertner
to Mattias Gaertner: On Wed, 18 Jun 2003 20:08:10 +0200 (CEST) ? Is this not the same as simply cutting the…
Show quoted text 69 lines
On Wed, 18 Jun 2003, Mattias Gaertner wrote: > On Wed, 18 Jun 2003 20:08:10 +0200 (CEST) > wrote: > > > > > > > On Wed, 18 Jun 2003, Mattias Gaertner wrote: > > > > > On Wed, 18 Jun 2003 18:57:47 +0200 (W. Europe Daylight Time) > > > Michael Van Canneyt wrote: > > > > > > > > > > > > The lpi only uses absolute filenames if the file is not in the > > > > > project directory. Can you give the full filenames? > > > > > > > > Delphi always uses filenames relative to the project directory. > > > > SysUtils contains a function ExtractRelativePath() which does this > > > > for you. > > > > > > This will will raise other problems. > > > For example ExtractRelativepath('/home/bla/','/tmp/some.txt') > > > results in'../../tmp/some.txt'. Moving the project to /home/ will > > > not find the file any longer. > > > The purpose of relative filenames is, that the project and all its > > > files can be transferred easily to another location. Normally this > > > means moving the project directory. > > > > > > > > The ExtractRelativepath will only help, if you spread your project > > > over several directories: > > > > > > /home/projects/projectdir/project1.lpi > > > /home/projects/otherdir/unit1.pas > > > > I suppose that 99% of all projects will be one directory containing > > the project file, and all other files in directories. Lazarus itself > > is such a project. > > > > So for 99% of all cases, using the relative path helps in keeping your > > project moveable. > > > > This is useful for instance if you have 2 branches in CVS. If you > > check out the branches in different directories > > /home/me/projects/myproject (+ subdirs) > > > > Check out two copies, one for each branch: > > /home/me/projects/myproject-main > > /home/me/projects/myproject_fixes > > > > If you keep relative paths, this will work. With absolute paths, you > > must rename all files. > > > > I think that keeping relative paths is a solution. If you use files > > totally outside the project dir, then the IDE can simply store the > > absolute path. But all subdirectories should be as relative paths. It > > is a small check to do this, finally. If extractrelativepath starts > > with .., just use the absolute path. In all other cases, use the > > relative path. > > ? > Is this not the same as simply cutting the project directory from the > filename? ? Actually, yes it is :-) But if I understood correctly, now complete filenames are used ?

The IDE cuts the project directory from the filenames, before saving the lpi. I don't know why Marco has some files, that were not cut. It seems, the unit was not in the project directory, as he saved. But why?

Mattias

Reply by email

Marc Weustink
to Marco van de Voort: It seems so. the pipe() syscall is succesful according to ktrace, and the…

+ From: Marco van de Voort
+ Sent: donderdag 19 juni 2003 1:02
+
+ > >
+ > >?MarcoV is confused here?
+ >
+ > Not only you, I've been looking and I don't get why the fd is negative.
+ > Besides that, the system created a dup for it whithout an error
+ (otherwise
+ > wwe wouldn't have a PID), so what's going on here ?
+ >
+ > Does a simple call to AssignPipe work ?
+
+ It seems so. the pipe() syscall is succesful according to ktrace,

The call might :) but does it return non negative fds ?

+ and the fcl/tests/testproc program works. However, again with ktrace I see a few
+ close()'s that silently go wrong at the end.
+
+ However this was on my laptop with a lot of old cruft (and a slow building
+ of a snapshot, I'm at home preparing for exams). +
+ In the weekend I'll probably find some time to delve deeper into
+ this using my Athlon.

OK

Marc

Reply by email

Mattias Gaertner
to Marc Weustink: Not only you, I've been looking and I don't get why the fd is negative. Besides that, the…
Show quoted text 35 lines
> > > >?MarcoV is confused here? > > Not only you, I've been looking and I don't get why the fd is negative. > Besides that, the system created a dup for it whithout an error > (otherwise wwe wouldn't have a PID), so what's going on here ? > > Does a simple call to AssignPipe work ? It seems so. the pipe() syscall is succesful according to ktrace, and the fcl/tests/testproc program works. However, again with ktrace I see a few close()'s that silently go wrong at the end. However this was on my laptop with a lot of old cruft (and a slow building of a snapshot, I'm at home preparing for exams). In the weekend I'll probably find some time to delve deeper into this using my Athlon. P.s. 1 I saw there isn't a demo for the treetest yet? P.s. 2 I tried to compile Tony's checkbook tracker, but: - I had to fix some {$ifdef linux}. In general, to everybody; if you don't care about 1.0.4 and below compability, use ifdef unix. There are less linux specific calls than Unix-generic calls. - I missed files, both custom components (in some "custom" dir) and in the generic lazarus dir. I know that they were in the lazarus dir because ... - Checkbook tracker's lpi file is also full of absolute paths. To lazarus, fpc source dirs, custom component dirs etc etc. Most seem to be generate by auto finding them via the searchpaths. Maybe if found via a certain include dir, they should read {$LAZARUSDIR}/dir/to/file or so when written to file. So when saving file-paths, you look if there are partial matches with every dir-path in includes, units etc.

The lpi file is also a session file. You can reduce the saved info in the project options.
But for publishing projects, there is a far more comfortable way: Project->Publish Project
This will create a copy of the project directory, the lpi file is cleaned and the new directory can automatically be zipped. There is also a 'publish' feature for packages.

Mattias

Reply by email

Marco van de Voort
to Marc Weustink: Not only you, I've been looking and I don't get why the fd is negative. Besides that, the…
Show quoted text 8 lines
> >?MarcoV is confused here? Not only you, I've been looking and I don't get why the fd is negative. Besides that, the system created a dup for it whithout an error (otherwise wwe wouldn't have a PID), so what's going on here ? Does a simple call to AssignPipe work ?

It seems so. the pipe() syscall is succesful according to ktrace, and the fcl/tests/testproc program works. However, again with ktrace I see a few close()'s that silently go wrong at the end.

However this was on my laptop with a lot of old cruft (and a slow building of a snapshot, I'm at home preparing for exams).

In the weekend I'll probably find some time to delve deeper into this using my Athlon.

P.s. 1 I saw there isn't a demo for the treetest yet?

P.s. 2
I tried to compile Tony's checkbook tracker, but:
- I had to fix some {$ifdef linux}. In general, to everybody; if you don't care about 1.0.4 and below compability, use ifdef unix. There are less linux specific calls than Unix-generic calls.
- I missed files, both custom components (in some "custom" dir) and in the generic lazarus dir. I know that they were in the lazarus dir because ...
- Checkbook tracker's lpi file is also full of absolute paths. To lazarus, fpc source dirs, custom component dirs etc etc. Most seem to be generate by auto finding them via the searchpaths. Maybe if found via a certain include dir, they should read {$LAZARUSDIR}/dir/to/file or so when written to file. So when saving file-paths, you look if there are partial matches with every dir-path in includes, units etc.

Reply by email

Mattias Gaertner
to Marco van de Voort: mv * /new/directory form1 (unit1.pas and .lrs were absolute), form2 (unit2.pas and .lrs)…
Show quoted text 21 lines
> weren't. > > > P.s. 1 The copy and pasting for groupboxes works fine and is workable > for a groupbox. > P.s. 2 except for RadioGroups. If I drag a button and/or textfield on a > radiogroup, the parent->child thing goes ok, but when run, > I can't click the button or edit the tf. > P.s. 3 when I enter an empty string for a RadioGroup item, and put > a tf on it, (on the place where normally text would go) I can't > always select the tf after. I did some resizing of the RG, so > that might be related. This last one was clear when I was playing a bit. Lazarus sets "blank" as text for an empty entry. (where I wanted to place my textfield). Somehow that "blank" didn't display properly until I managed to move the tf, so probably when clicking, the "blank" text (and therefore the TRadioGroup) got selected, not the tf. Overlapping regions probably.

Before I forget:
gtk does not allow all combinations of layering widgets. In this case: a radiobutton and a textfield will never work perfect when overlapped. If you really want a radiogroup with custom components instead of radiobuttons, then the recommended way is to create a new component. It's not very difficult to write it. If there is enough interest I can write it.

Mattias

Reply by email

Marc Weustink
to Marco van de Voort: Opdated, rebuilt, the problems are less pronounced. The opened debug window remains empty.
Marco van de Voort wrote 19 lines
> > But I'll hunt for {$ifdef linux} and {$ifdef unix} conditionals and check > them myself. If that doesn't reveal anything, I can always try to > debug it then. The problem is the fd_set call cmdlinedebugger.pp:waitforhandles. The handle that is added is negative. That handle traces back to the tprocess object, so that one works for FreeBSD, but the handle is not ok. That in turn seems to be created using "createpipestreams" and is named FParentInputStream; in process.inc:47, which calls AssignPipe which is in linux. I quick checked that, and that implementation seems sane, but I have to rebuild FPC with debug info first before I can further get into that. ?MarcoV is confused here?

Not only you, I've been looking and I don't get why the fd is negative. Besides that, the system created a dup for it whithout an error (otherwise wwe wouldn't have a PID), so what's going on here ?

Does a simple call to AssignPipe work ?

Marc

Reply by email

Mattias Gaertner
to Mattias Gaertner: - Added a new component: TPairSplitter TPairSplitter is a control with a splitter in the…
Show quoted text 7 lines
[..] > Left to do: [..] > - other formats (jpg, png) ... Just curious, does the package system take care of library dependancies?

It takes care of linker options. The rest is up to the linker and the compiler.
For instance, if a package has -lpng in the linker options (package options->usage), all projects depending on it, will be compiled with this option. You can see the inherited options in Compiler Options->Inheritance.

IOW assume Lazarus uses some library for that (libpng, libjpg spring to mind), and the component is available, will the lazarus app link to libpng only when I use that control?

AFAIK giving the linker (ld) a -l option to use a lib means, the lib will be used only if a function in the application uses the lib.

Mattias

Reply by email

Jesus Reyes
to Mattias Gaertner: - Added a new component: TPairSplitter TPairSplitter is a control with a splitter in the…

--- Mattias Gaertner escribi�: > Hi all,

Show quoted text 28 lines
- Added a new component: TPairSplitter TPairSplitter is a control with a splitter in the middle and client areas at both sides. The splitter can be dragged by the user and the client areas are resized automatically. You can change the type (horizontal, vertical) at any time. You can find it in the IDE component palette under 'Additional'. - TBitmap can now load XPixmap (.xpm) and windows bitmap (.bmp) streams. - implemented TCanvas.OnChanged+OnChanging events - TBitmap now stores the original stream in TBitmapImage - TBitmap now saves the original stream if the image is kept unchanged - TPixmap is cleaned up and the workarounds were eliminated - The property editors for TPicture/TBitmap/TButtonGlyph were changed to use TBitmap. This means, you can now load .xpm/.bmp files in the designer. (only tested with TImage, TSpeedButton, TBitBtn) Left to do: - Share TBitmapImage between TBitmaps - load/save TBitmap from/to clipboard - save changed TPixmap as xpm stream - palettes and depth conversion - other formats (jpg, png) ... Mattias

Nice Update!.

I have played with the new TPairSplitter, It seems that I cannot remove the component once I dropped it, the IDE loops trying to remove:

[TDesigner.RemoveComponentAndChilds] C
Pairsplitterside2:TPAIRSPLITTERSIDE
[TDesigner.RemoveComponentAndChilds]
Pairsplitterside2:TPAIRSPLITTERSIDE
[TDesigner.RemoveComponentAndChilds] C
Pairsplitterside2:TPAIRSPLITTERSIDE
[TDesigner.RemoveComponentAndChilds]
Pairsplitterside2:TPAIRSPLITTERSIDE
...

I have to edit the lfm file to manually remove the component.

Also, the first time I drop a TPairSplitter component, I cant insert any component on either the left or the right side, only until I save the project, close and re-open lazarus, it allows new componentes to be inserted!.

Regards.

Jesus Reyes A.

_________________________________________________________ Do You Yahoo!?
La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

Reply by email

Mattias Gaertner

Hi all,

- Added a new component: TPairSplitter
TPairSplitter is a control with a splitter in the middle and client areas at both sides. The splitter can be dragged by the user and the client areas are resized automatically. You can change the type (horizontal, vertical) at any time. You can find it in the IDE component palette under 'Additional'.
- TBitmap can now load XPixmap (.xpm) and windows bitmap (.bmp) streams.
- implemented TCanvas.OnChanged+OnChanging events
- TBitmap now stores the original stream in TBitmapImage
- TBitmap now saves the original stream if the image is kept unchanged
- TPixmap is cleaned up and the workarounds were eliminated
- The property editors for TPicture/TBitmap/TButtonGlyph were changed to use TBitmap. This means, you can now load .xpm/.bmp files in the designer.
(only tested with TImage, TSpeedButton, TBitBtn)

Left to do:
- Share TBitmapImage between TBitmaps
- load/save TBitmap from/to clipboard
- save changed TPixmap as xpm stream
- palettes and depth conversion
- other formats (jpg, png) ...

Mattias

Reply by email

Mattias Gaertner
to Mattias Gaertner
Show quoted text 47 lines
--- Mattias Gaertner escribi�: > Hi all, > > - Added a new component: TPairSplitter > TPairSplitter is a control with a splitter in the middle > and client areas at both sides. The splitter can be dragged > by the user and the client areas are resized automatically. > You can change the type (horizontal, vertical) at any time. > You can find it in the IDE component palette under 'Additional'. > - TBitmap can now load XPixmap (.xpm) and windows bitmap (.bmp) > streams. > - implemented TCanvas.OnChanged+OnChanging events > - TBitmap now stores the original stream in TBitmapImage > - TBitmap now saves the original stream if the image is > kept unchanged > - TPixmap is cleaned up and the workarounds were eliminated > - The property editors for TPicture/TBitmap/TButtonGlyph were > changed to use TBitmap. This means, you can now load .xpm/.bmp > files in the designer. > (only tested with TImage, TSpeedButton, TBitBtn) > > Left to do: > - Share TBitmapImage between TBitmaps > - load/save TBitmap from/to clipboard > - save changed TPixmap as xpm stream > - palettes and depth conversion > - other formats (jpg, png) ... > > > Mattias Nice Update!. I have played with the new TPairSplitter, It seems that I cannot remove the component once I dropped it, the IDE loops trying to remove: [TDesigner.RemoveComponentAndChilds] C Pairsplitterside2:TPAIRSPLITTERSIDE [TDesigner.RemoveComponentAndChilds] Pairsplitterside2:TPAIRSPLITTERSIDE [TDesigner.RemoveComponentAndChilds] C Pairsplitterside2:TPAIRSPLITTERSIDE [TDesigner.RemoveComponentAndChilds] Pairsplitterside2:TPAIRSPLITTERSIDE ... I have to edit the lfm file to manually remove the component.

fixed

Also, the first time I drop a TPairSplitter component, I cant insert any component on either the left or the right side, only until I save the project, close and re-open lazarus, it allows new componentes to be inserted!.

fixed

Mattias

Reply by email

Jesus Reyes
to Mattias Gaertner: - Added a new component: TPairSplitter TPairSplitter is a control with a splitter in the…

--- Mattias Gaertner escribi�: > Hi all,

Show quoted text 28 lines
- Added a new component: TPairSplitter TPairSplitter is a control with a splitter in the middle and client areas at both sides. The splitter can be dragged by the user and the client areas are resized automatically. You can change the type (horizontal, vertical) at any time. You can find it in the IDE component palette under 'Additional'. - TBitmap can now load XPixmap (.xpm) and windows bitmap (.bmp) streams. - implemented TCanvas.OnChanged+OnChanging events - TBitmap now stores the original stream in TBitmapImage - TBitmap now saves the original stream if the image is kept unchanged - TPixmap is cleaned up and the workarounds were eliminated - The property editors for TPicture/TBitmap/TButtonGlyph were changed to use TBitmap. This means, you can now load .xpm/.bmp files in the designer. (only tested with TImage, TSpeedButton, TBitBtn) Left to do: - Share TBitmapImage between TBitmaps - load/save TBitmap from/to clipboard - save changed TPixmap as xpm stream - palettes and depth conversion - other formats (jpg, png) ... Mattias

Nice Update!.

I have played with the new TPairSplitter, It seems that I cannot remove the component once I dropped it, the IDE loops trying to remove:

[TDesigner.RemoveComponentAndChilds] C
Pairsplitterside2:TPAIRSPLITTERSIDE
[TDesigner.RemoveComponentAndChilds]
Pairsplitterside2:TPAIRSPLITTERSIDE
[TDesigner.RemoveComponentAndChilds] C
Pairsplitterside2:TPAIRSPLITTERSIDE
[TDesigner.RemoveComponentAndChilds]
Pairsplitterside2:TPAIRSPLITTERSIDE
...

I have to edit the lfm file to manually remove the component.

Also, the first time I drop a TPairSplitter component, I cant insert any component on either the left or the right side, only until I save the project, close and re-open lazarus, it allows new componentes to be inserted!.

Regards.

Jesus Reyes A.

_________________________________________________________ Do You Yahoo!?
La mejor conexi�n a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

Reply by email