Re: [Lazarus] Auto scrollbar in forms, has the logic changed?

2008-08-29 Thread Luca Olivetti
En/na Mattias Gaertner ha escrit:
 On Thu, 28 Aug 2008 20:33:44 +0200 (CEST)
 Luca Olivetti [EMAIL PROTECTED] wrote:
 
 With a recent svn (from last week) most of my forms acquired unwanted
 scrollbars.
 I corrected the problem by making them a couple of pixels bigger
 (though that made the contained components slightly off-center), but
 what was changed to cause it?
 
 FPC, Lazarus version? OS? Do you know the lazarus revision of the
 change?

The current one is 16233 with fpc 2.2.2, the previous was a snapshot  of 
svn 15358 and fpc 2.2.3 (however close to the release of 2.2.2, so it 
should be practically identical to 2.2.2).
Both on win32.
I don't know which release changed it.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto scrollbar in forms, has the logic changed?

2008-08-29 Thread Luca Olivetti
En/na Vincent Snijders ha escrit:
 Luca Olivetti schreef:
 With a recent svn (from last week) most of my forms acquired unwanted
 scrollbars.
 I corrected the problem by making them a couple of pixels bigger (though
 that made the contained components slightly off-center), but what was
 changed to cause it?
 
 Maybe because the default for the TForm.AutoScroll property changed from 
 false to true.

Probably, however in a test form with a panel I get the scrollbar even 
if I set it to false (and both VertScrollBar.visible and 
HorzScrollBar.visible are false), both at design time and at runtime.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Word of warning when sharing code between Delphi and FPC

2008-08-29 Thread Graeme Geldenhuys
Hi Everybody,

I have been battling with some code in tiOPF that causes problems when
compiled with Delphi 2007, but not with Delphi 7 and FPC.
After some head scratching, we found the problem.

I use {$IFDEF DEBUG} quite often in my code, to hide things like
writeln() statemens. I then have a commented DEBUG define at the top
of the unit, so I can enable it per unit when required. That's just
how I work...  ;-)

Anyway in Delphi 2007 there are two compilable states, Release and
Debug, with one of those terms automatically added to the options at
compile time.  Debug mode is the default, which means the DEBUG define
is ALWAYS defined - and what caused the problem! writeln() statements
fail in a Windows GUI application because StdOut is not available.

Just thought I might share this experience with you guys - to minimize
future head scratching. ;-)

Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto scrollbar in forms, has the logic changed?

2008-08-29 Thread Luca Olivetti
En/na Luca Olivetti ha escrit:
 En/na Vincent Snijders ha escrit:
 Luca Olivetti schreef:
 With a recent svn (from last week) most of my forms acquired unwanted
 scrollbars.
 I corrected the problem by making them a couple of pixels bigger (though
 that made the contained components slightly off-center), but what was
 changed to cause it?

 Maybe because the default for the TForm.AutoScroll property changed 
 from false to true.
 
 Probably, however in a test form with a panel I get the scrollbar even 
 if I set it to false (and both VertScrollBar.visible and 
 HorzScrollBar.visible are false), both at design time and at runtime.

Here's an interesting detail: once AutoScroll has been set to true, 
there's no turning back, even if you set it to false you get the 
scrollbars. I try and it happened also in the previous version, however 
since the default was false it didn't trigger this problem.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Word of warning when sharing code between Delphi and FPC

2008-08-29 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]:

 Hi Everybody,

 I have been battling with some code in tiOPF that causes problems when
 compiled with Delphi 2007, but not with Delphi 7 and FPC.
 After some head scratching, we found the problem.

 I use {$IFDEF DEBUG} quite often in my code, to hide things like
 writeln() statemens. I then have a commented DEBUG define at the top
 of the unit, so I can enable it per unit when required. That's just
 how I work...  ;-)

 Anyway in Delphi 2007 there are two compilable states, Release and
 Debug, with one of those terms automatically added to the options at
 compile time.  Debug mode is the default, which means the DEBUG define
 is ALWAYS defined - and what caused the problem! writeln() statements
 fail in a Windows GUI application because StdOut is not available.

 Just thought I might share this experience with you guys - to minimize
 future head scratching. ;-)

Will FPC do the same in Delphi mode?

Mattias

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Mantis question

2008-08-29 Thread Graeme Geldenhuys
Hi,

I just saw Mantis notice in my inbox

-
http://bugs.freepascal.org/view.php?id=11933

2008-08-28 18:44 Mattias GaertnerWidgetsetGTK, GTK 2, Win32,
WinCE, Carbon, QT, fpGUI =
-

I've seen this before. The bug report doesn't relate to a specific
widget set. I created that bug report and I specifically tried to
deselect all widgetsets (using Firefox browser) and I couldn't. When I
create a new bug report, GTK is by default selected (which I think is
wrong) and I can't deselect it. So I then went to the next extreme and
selected all widgetsets.

@Mattias
How did you deselect all widgetsets?

Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto scrollbar in forms, has the logic changed?

2008-08-29 Thread Mattias Gärtner
Zitat von Luca Olivetti [EMAIL PROTECTED]:

 En/na Mattias Gaertner ha escrit:
  On Thu, 28 Aug 2008 20:33:44 +0200 (CEST)
  Luca Olivetti [EMAIL PROTECTED] wrote:
 
  With a recent svn (from last week) most of my forms acquired unwanted
  scrollbars.
  I corrected the problem by making them a couple of pixels bigger
  (though that made the contained components slightly off-center), but
  what was changed to cause it?
 
  FPC, Lazarus version? OS? Do you know the lazarus revision of the
  change?

 The current one is 16233 with fpc 2.2.2, the previous was a snapshot  of
 svn 15358 and fpc 2.2.3 (however close to the release of 2.2.2, so it
 should be practically identical to 2.2.2).
 Both on win32.
 I don't know which release changed it.

Please create a bug report with an example.
It would help if you could determine the svn revision of the regression. Find
binary search you could find out easily.

Mattias

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Feature Request with code tools

2008-08-29 Thread Reenen Laurie
Hi everyone,

I now spent a lot of time customizing my spaces after and before (on
Environment -  Code Tools Options - Spaces), just the way I like it.

Now I want a feature to Select a piece of code, and then Apply the
current *code tool options *on the selected code.  Because all my old code
doesn't look as neat.

Obviously if you are working on SVN, and your options differ from other
developers, you shouldn't be applying it to all the code...

Does this sound like a not so hard to implement feature request?  I am
guessing that the code used to alter the example source code in the
options form should be able to be applied on the selected code in the
implementation of the feature.  But I have recently tried to dig around in
the source editor, and the implementation is quite above my programming
skills.

Regards,
-Reenen
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Word of warning when sharing code between Delphi and FPC

2008-08-29 Thread Michael Van Canneyt


On Fri, 29 Aug 2008, Mattias Gärtner wrote:

 Zitat von Graeme Geldenhuys [EMAIL PROTECTED]:
 
  Hi Everybody,
 
  I have been battling with some code in tiOPF that causes problems when
  compiled with Delphi 2007, but not with Delphi 7 and FPC.
  After some head scratching, we found the problem.
 
  I use {$IFDEF DEBUG} quite often in my code, to hide things like
  writeln() statemens. I then have a commented DEBUG define at the top
  of the unit, so I can enable it per unit when required. That's just
  how I work...  ;-)
 
  Anyway in Delphi 2007 there are two compilable states, Release and
  Debug, with one of those terms automatically added to the options at
  compile time.  Debug mode is the default, which means the DEBUG define
  is ALWAYS defined - and what caused the problem! writeln() statements
  fail in a Windows GUI application because StdOut is not available.
 
  Just thought I might share this experience with you guys - to minimize
  future head scratching. ;-)
 
 Will FPC do the same in Delphi mode?


No. It's an IDE feature. Something like 'named compiler options'. 
The Delphi compiler by itself doesn't do anything. It just gets the -DDebug
and whatever flags from the IDE.

Michael.___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Seeking to resolve LCL in DLL problems

2008-08-29 Thread Duncan Parsons

Hi


Im looking at trying to resolve the issue of forms not working properly in DLLs, and thought canvassing opinions from those more intimately aquainted with the source might be beneficial. I know its not slated to be recolved until post v1.0, but I cant wait that long!


What Im currently looking at is using a mechanism whereby the host application maintains a list of additional objects (whether applications or forms) to its own, and in the message-loop passes the messages to those first, before trying to process them itself.
This is similar-ish to how Delphi handles some of it (a call to SetHandle adds a ref to a process list which is checked in the message-loop), but of course the abstraction layers are different here, so something similar but different is required.


My current thinking is that when an app wants to use a form in a library, the process should be.


(i) Library is loaded, either statically or dynamically
(ii) DLL has an exported function SetHostApplication(HostApp:TApplication):TApplication; before the host app can use a form, it must call something like DLLApp:=SetHostApplication(Application); and inside the dll the application object passed should be stored (in a global or whatever is appropriate), and its own Application object should be returned. The host and the dll now both know about each other.
(iii) After calling SetHostApplication, the received DLLApp is registered into an internal list in TApplication - lets call it fChildApps - using a procedure RegisterChildApp(DLLApp);...
(iv) In the Hosts message-loop it iterates fChildApps calling a procedure to attempt to process the current message [if its keyboard or mouse related]. If it is handled, the host proceeds to the next message, if not it handles it itself. At the end of the loop, a call should be made to each of the fChildApps.ProcessMessages which calls the relevant Widgetset.AppProcessMessages.
(v) When a dll is done, if dynamically unloaded, a call should be made to UnRegisterChildApp.


Hmmm - looks complicated!


What Im currently wrestlting with is where the message handling should take place. Using the new PrcoessAsyncCallQueue is probably not the place to do it, since the mechanism is different. Ideally it would be nice to wrap stuff up on a high level, but pragmatically thats not going to happen, since each OS handles stuff differently, so each widgetsets AppProcessMessages is the place to implement the details of it. It may even be worth having an AppProcessSingleMessage..


OK, Im starting to ramble, so back to the point. 


Essentially Im propsoing a system of callbacks, where a dll is registered with the host, and the host feeds messages back as appropriate. It will need to be implemented at both TApplication and TWidgetSet level, and do it gracefully. Also it will require a clear head on the part of end developers, but if the process can be stripped back to Host calls a single procedure to register/unregister a dll, and the dll writer accepts responsibility to export a function (or maybe two) then it could probably be streamlined quite well.


Caveats will need to be taken care of, like an application not being able to register itself in its callback/child list. Messages should probably passed TApplication to TApplication, so that each message can be handled by the lower level widgetsets correctly (it could well be that a GTK application could load a dll using QT, etc). This will add function calling overheads so care will be needed not to kill performance...


It could be that TApplications are the wrong thing to be holding, and that just the TForms are what should be registered, but the danger here is of forms being freed without the DLL developer remembering to UnRegister the form, so doing it at the TApplication level should take care of that.


When implemented, a new item could then be added to the repository for Library with Forms, which has the correct exports already in place, reducing the developer error..


Right - who thinks what? :-)


Duncan Parsons


___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Word of warning when sharing code between Delphi and FPC

2008-08-29 Thread Graeme Geldenhuys
On Fri, Aug 29, 2008 at 9:27 AM, Mattias Gärtner
[EMAIL PROTECTED] wrote:

 Will FPC do the same in Delphi mode?


It's nothing todo with the compiler, it's the IDE that injects
'-dDebug' when the project is compiled in Debug mode.  I would guess
(though not tested), that '-dRelease' is injected when Release mode is
used in the IDE.


Regards,
 - Graeme -


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

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request with code tools

2008-08-29 Thread Graeme Geldenhuys
2008/8/29 Reenen Laurie [EMAIL PROTECTED]:
 Hi everyone,

 I now spent a lot of time customizing my spaces after and before (on
 Environment -  Code Tools Options - Spaces), just the way I like it.

I've done the same, but found a easier solution in the end


 Now I want a feature to Select a piece of code, and then Apply the
 current code tool options on the selected code.  Because all my old code
 doesn't look as neat.

I've asked for this as well, but I think something like this will only
appear once the Jedi Code Formatter is integrated into the IDE.

BTW:
That is my 'easier' solution. I setup the IDE to format the code as
close as possible to what I like - it doesn't have to be perfect.  I
then routinely run Jedi Code Formatter (JCF) over my units to fix up
any formatting.  So time back, I went step-by-step through all the JCF
options (there are plenty) to create a perfect profile for my code.
JCF is pretty awesome, and works perfectly under Linux with WINE, even
though it's a Windows application.  JCF is available on SourceForge.


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request with code tools

2008-08-29 Thread Reenen Laurie
Thanks, that sounds like a great solution!

Regards,
-Reenen

On Fri, Aug 29, 2008 at 10:05 AM, Graeme Geldenhuys [EMAIL PROTECTED]
 wrote:

 2008/8/29 Reenen Laurie [EMAIL PROTECTED]:
  Hi everyone,
 
  I now spent a lot of time customizing my spaces after and before (on
  Environment -  Code Tools Options - Spaces), just the way I like it.

 I've done the same, but found a easier solution in the end


  Now I want a feature to Select a piece of code, and then Apply the
  current code tool options on the selected code.  Because all my old code
  doesn't look as neat.

 I've asked for this as well, but I think something like this will only
 appear once the Jedi Code Formatter is integrated into the IDE.

 BTW:
 That is my 'easier' solution. I setup the IDE to format the code as
 close as possible to what I like - it doesn't have to be perfect.  I
 then routinely run Jedi Code Formatter (JCF) over my units to fix up
 any formatting.  So time back, I went step-by-step through all the JCF
 options (there are plenty) to create a perfect profile for my code.
 JCF is pretty awesome, and works perfectly under Linux with WINE, even
 though it's a Windows application.  JCF is available on SourceForge.


 Regards,
  - Graeme -


 ___
 fpGUI - a cross-platform Free Pascal GUI toolkit
 http://opensoft.homeip.net/fpgui/
 ___
 Lazarus mailing list
 Lazarus@lazarus.freepascal.org
 http://www.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
o__
,_./ _
(_)_\(_)___
...speed is good
___
I believe five out of four people have a problem with fractions.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request with code tools

2008-08-29 Thread Michael Van Canneyt


On Fri, 29 Aug 2008, Graeme Geldenhuys wrote:

 2008/8/29 Reenen Laurie [EMAIL PROTECTED]:
  Hi everyone,
 
  I now spent a lot of time customizing my spaces after and before (on
  Environment -  Code Tools Options - Spaces), just the way I like it.
 
 I've done the same, but found a easier solution in the end
 
 
  Now I want a feature to Select a piece of code, and then Apply the
  current code tool options on the selected code.  Because all my old code
  doesn't look as neat.
 
 I've asked for this as well, but I think something like this will only
 appear once the Jedi Code Formatter is integrated into the IDE.
 
 BTW:
 That is my 'easier' solution. I setup the IDE to format the code as
 close as possible to what I like - it doesn't have to be perfect.  I
 then routinely run Jedi Code Formatter (JCF) over my units to fix up
 any formatting.  So time back, I went step-by-step through all the JCF
 options (there are plenty) to create a perfect profile for my code.
 JCF is pretty awesome, and works perfectly under Linux with WINE, even
 though it's a Windows application.  JCF is available on SourceForge.

If the source is available, why don't you recompile it for Linux ?

Michael.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a Wizard (InstallShield type) interface

2008-08-29 Thread Michael Van Canneyt


On Fri, 29 Aug 2008, Graeme Geldenhuys wrote:

 Hi,
 
 May applications, but mostly installations packages like InstallShield
 use a Wizard style interface. Start application, click Next, Next,
 Next, Finish. :-)
 
 How do you create such a Wizard interface?
 
  * Is in a lot of forms, displayed over eachother?
  * Is it a tab type component, with the tabs set to invisible?
  * Does it use one Form and a bunch of Frames?
  * ???
 
 Anybody have some hints on this? How to recreate such an GUI interface.

At work, we routinely use a TPageControl with all tabs set to invisible.
The TTabsheet pages are filled with TFrames (actually, there is always
a TWizardFrame, and all TFrames descend from this) - to ensure the various 
steps are truly independent.

It keeps it RAD, and lets the various tabs be developed independently.
TWizardFrame has methods and properties such as 'NextButtonEnabled' 
'PreviousButtonEnabled', 
'NextButtonCaption' and so in, making the wizard itself pretty generic.

Michael.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Auto scrollbar in forms, has the logic changed?

2008-08-29 Thread Luca Olivetti
En/na Mattias Gärtner ha escrit:

 Please create a bug report with an example.

http://bugs.freepascal.org/view.php?id=11991

 It would help if you could determine the svn revision of the regression. Find
 binary search you could find out easily.

The default of AutoScroll was changed in revision 15375, however, if you 
see my other follow-up, the problem (changing AutoScroll from true to 
false has no effect) was present before but it was no apparent since the 
default was false.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a Wizard (InstallShield type) interface

2008-08-29 Thread Burkhard Carstens
Am Freitag, 29. August 2008 10:29 schrieb Michael Van Canneyt:
 On Fri, 29 Aug 2008, Graeme Geldenhuys wrote:
  Hi,
 
  May applications, but mostly installations packages like
  InstallShield use a Wizard style interface. Start application,
  click Next, Next, Next, Finish. :-)
 
  How do you create such a Wizard interface?
 
   * Is in a lot of forms, displayed over eachother?
   * Is it a tab type component, with the tabs set to invisible?
   * Does it use one Form and a bunch of Frames?
   * ???
 
  Anybody have some hints on this? How to recreate such an GUI
  interface.

 At work, we routinely use a TPageControl with all tabs set to
 invisible. The TTabsheet pages are filled with TFrames (actually,
 there is always a TWizardFrame, and all TFrames descend from this) -
 to ensure the various steps are truly independent.

 It keeps it RAD, and lets the various tabs be developed
 independently. TWizardFrame has methods and properties such as
 'NextButtonEnabled' 'PreviousButtonEnabled', 'NextButtonCaption' and
 so in, making the wizard itself pretty generic.

Unfortunately, this does not work with gtk1, at least it didn't a year 
ago when I ported my wizard app from D7 to lazarus. It was impossible 
to hide the tabs, and worse: I couldn't find a way to prevent selecting 
a page by clicking the tabs (i.e. user could circumvent the next 
button) ..

regards
 Burkhard

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Seeking to resolve LCL in DLL problems

2008-08-29 Thread Marco van de Voort
On Fri, Aug 29, 2008 at 08:55:56AM +0100, Duncan Parsons wrote:

(please turn off the html stuff)

 (i)nbsp;nbsp; Library is loaded, either statically or dynamicallybr /
 (ii)nbsp; DLL has an exported function 
 'SetHostApplication(HostApp:TApplication):TApplication;' before the host app 
 can use a form, it must call something like 
 DLLApp:=SetHostApplication(Application); and inside the dll the application 
 object passed should be stored (in a global or whatever is appropriate), and 
 its own Application object should be returned. The host and the dll now both 
 know about each other.br /
 (iii) After calling SetHostApplication, the received DLLApp is registered 
 into an internal list in TApplication - let's call it fChildApps - using a 
 procedure RegisterChildApp(DLLApp);...br /
 (iv)nbsp; In the Host's message-loop it iterates fChildApps calling a 
 procedure to attempt to process the current message [if it's keyboard or 
 mouse related]. If it is handled, the host proceeds to the next message, if 
 not it handles it itself. At the end of the loop, a call should be made to 
 each of the fChildApps.ProcessMessages which calls the relevant 
 Widgetset.AppProcessMessages.br /
 (v)nbsp;nbsp; When a dll is done, if dynamically unloaded, a call should be 
 made to UnRegisterChildApp.

 Hmmm - looks complicated!

And that is the easy part. Because what happens if you deallocate an object
in the mainprogram that is allocated in the lib using a different
memmanager?

or if you do

if x is ty then

when X was allocated in the lib, and ty is from context of the main program. ?

See http://wiki.freepascal.org/packages

So in short, any interaction that trancends the most simplistic definition of C 
api
is not possible between mainprogram and DLL.
 
 Right - who thinks what? :-)

That you used packages on Delphi, and never understood what they are about
;-)
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a Wizard (InstallShield type) interface

2008-08-29 Thread Reenen Laurie
On Windows, I use InnoSetup to create those wizards.  And I am very happy
with it.

I have not used Nullsoft or any other compiler creator, but Inno has a very
good balance between power and ease.

Regards,
-Reenen

On Fri, Aug 29, 2008 at 10:29 AM, Michael Van Canneyt 
[EMAIL PROTECTED] wrote:



 On Fri, 29 Aug 2008, Graeme Geldenhuys wrote:

  Hi,
 
  May applications, but mostly installations packages like InstallShield
  use a Wizard style interface. Start application, click Next, Next,
  Next, Finish. :-)
 
  How do you create such a Wizard interface?
 
   * Is in a lot of forms, displayed over eachother?
   * Is it a tab type component, with the tabs set to invisible?
   * Does it use one Form and a bunch of Frames?
   * ???
 
  Anybody have some hints on this? How to recreate such an GUI interface.

 At work, we routinely use a TPageControl with all tabs set to invisible.
 The TTabsheet pages are filled with TFrames (actually, there is always
 a TWizardFrame, and all TFrames descend from this) - to ensure the various
 steps are truly independent.

 It keeps it RAD, and lets the various tabs be developed independently.
 TWizardFrame has methods and properties such as 'NextButtonEnabled'
 'PreviousButtonEnabled',
 'NextButtonCaption' and so in, making the wizard itself pretty generic.

 Michael.
 ___
 Lazarus mailing list
 Lazarus@lazarus.freepascal.org
 http://www.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
o__
,_./ _
(_)_\(_)___
...speed is good
___
I believe five out of four people have a problem with fractions.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request with code tools

2008-08-29 Thread Graeme Geldenhuys
On Fri, Aug 29, 2008 at 10:30 AM, Michael Van Canneyt
[EMAIL PROTECTED] wrote:

 If the source is available, why don't you recompile it for Linux ?


please read the comments in the feature request.
  http://bugs.freepascal.org/view.php?id=11933

JCF relies on many Jedi Code Library (JCL) features and functions.
Jedi Code Formatter now has the correct license to integrate with
Lazarus, but JCL doesn't.  Plus, I have no idea how compilable Jedi
Code Library is with FPC.


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a Wizard (InstallShield type) interface

2008-08-29 Thread Graeme Geldenhuys
On Fri, Aug 29, 2008 at 10:29 AM, Michael Van Canneyt
[EMAIL PROTECTED] wrote:
 Anybody have some hints on this? How to recreate such an GUI interface.

 At work, we routinely use a TPageControl with all tabs set to invisible.
 The TTabsheet pages are filled with TFrames (actually, there is always
 a TWizardFrame, and all TFrames descend from this) - to ensure the various
 steps are truly independent.

I would have thought this to be the easiest solution as well. A
tab/page control seems to fit the design.  Thanks for the feedback
Michael.


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Word of warning when sharing code between Delphi and FPC

2008-08-29 Thread mitya boyarintsev
how about, redirecting writeln's somethere in Delphi Debug mode?

something like that. I'm not sure if it works

initialization

{$ifndef fpc}{$ifdef debug}

AssignFile(output, 'redirstdout.txt'); Rewrite(output);

{$endif}{$endif}

finalization

{$ifndef fpc}{$ifdef debug}

CloseFile(output);

{$endif}{$endif}
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a Wizard (InstallShield type) interface

2008-08-29 Thread Graeme Geldenhuys
2008/8/29 Reenen Laurie [EMAIL PROTECTED]:
 On Windows, I use InnoSetup to create those wizards.  And I am very happy
 with it.

 I have not used Nullsoft or any other compiler creator, but Inno has a very
 good balance between power and ease.

:-)  I don't want to create a Setup, I want to create the
Wizard/Assistant interface in my own applications.


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Word of warning when sharing code between Delphi and FPC

2008-08-29 Thread Graeme Geldenhuys
2008/8/29 mitya boyarintsev [EMAIL PROTECTED]:
 how about, redirecting writeln's somethere in Delphi Debug mode?

 something like that. I'm not sure if it works

After thinking about it for a while it hit me!! The code I'm working
with is from the tiOPF project. It already has a solution via
tiLog('...message goes here...', lsDebug) calls.  tiOPF allows tiLog()
calls to output to Console, GUI or File without issues. lsDebug is one
of many log severity levels that can be set. Simply passing in a
different parameter to the program, different output methods can be
used. I can't believe I never thought of using that from the start -
so we learn.  :-)

Either way, for those developers not using tiOPF, be warned about the
global Debug define in D2007.


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Feature Request with code tools

2008-08-29 Thread Graeme Geldenhuys
On Fri, Aug 29, 2008 at 11:22 AM, Marco van de Voort [EMAIL PROTECTED] wrote:

 Start identifying what JCF uses exactly from it, and try to substitute (or
 wrap) parts of it.

Thank is exactly what Paul Ishenin started doing


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Mantis question

2008-08-29 Thread Marc Weustink
Graeme Geldenhuys wrote:
 Hi,
 
 I just saw Mantis notice in my inbox
 
 -
 http://bugs.freepascal.org/view.php?id=11933
 
 2008-08-28 18:44 Mattias GaertnerWidgetsetGTK, GTK 2, Win32,
 WinCE, Carbon, QT, fpGUI =
 -
 
 I've seen this before. The bug report doesn't relate to a specific
 widget set. I created that bug report and I specifically tried to
 deselect all widgetsets (using Firefox browser) and I couldn't. When I
 create a new bug report, GTK is by default selected (which I think is
 wrong) and I can't deselect it. So I then went to the next extreme and
 selected all widgetsets.
 
 @Mattias
 How did you deselect all widgetsets?
 

Ust CTRL+click

Marc

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a Wizard (InstallShield type) interface

2008-08-29 Thread Michael Van Canneyt


On Fri, 29 Aug 2008, Burkhard Carstens wrote:

 Am Freitag, 29. August 2008 10:29 schrieb Michael Van Canneyt:
  On Fri, 29 Aug 2008, Graeme Geldenhuys wrote:
   Hi,
  
   May applications, but mostly installations packages like
   InstallShield use a Wizard style interface. Start application,
   click Next, Next, Next, Finish. :-)
  
   How do you create such a Wizard interface?
  
* Is in a lot of forms, displayed over eachother?
* Is it a tab type component, with the tabs set to invisible?
* Does it use one Form and a bunch of Frames?
* ???
  
   Anybody have some hints on this? How to recreate such an GUI
   interface.
 
  At work, we routinely use a TPageControl with all tabs set to
  invisible. The TTabsheet pages are filled with TFrames (actually,
  there is always a TWizardFrame, and all TFrames descend from this) -
  to ensure the various steps are truly independent.
 
  It keeps it RAD, and lets the various tabs be developed
  independently. TWizardFrame has methods and properties such as
  'NextButtonEnabled' 'PreviousButtonEnabled', 'NextButtonCaption' and
  so in, making the wizard itself pretty generic.
 
 Unfortunately, this does not work with gtk1, at least it didn't a year 
 ago when I ported my wizard app from D7 to lazarus. It was impossible 
 to hide the tabs, and worse: I couldn't find a way to prevent selecting 
 a page by clicking the tabs (i.e. user could circumvent the next 
 button) ..

Well, the tabs can be hidden now in GTK 1 ?

Michael.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Revision 16278 can not rebuild the IDE

2008-08-29 Thread Vincent Snijders
Luiz Americo Pereira Camara schreef:
 Luiz Americo Pereira Camara wrote:
 Trying to rebuild the IDE leads to an error Fatal: Config file  is a 
 directory.
   
 One more info that can help.
 The config files are stored at a path with accented characters: 
 C:\Documents and Settings\luiz\Configurações locais\Dados de 
 aplicativos\lazarus

Fixed in r16295.

Mattias, can you review that revision?

Vincent
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE doesn't start after build with lazbuild

2008-08-29 Thread Roland Turcan
 29.8.2008 14:04 - Mattias Gärtner [EMAIL PROTECTED] 
MG Zitat von Roland Turcan [EMAIL PROTECTED]:

 Hello lazarus project!

 When I build lazarus from actual SVN or older using by lazbuild, then
 lazarus doesn't start.

MG Open a terminal and start it there:
MG cd path/to/lazarus
MG ./lazarus.app/Contents/MacOS/lazarus

MG What does it show?

That is the problem, I don't see anything. Computer gets slow and
process is loaded. I need to kill it.

Of course, I have checked files in lazarus.app and they are the same
as in lazarus' root dir.

 When I try to build it using by make clean
 all, then IDE starts and I checked if there are any packages which
 could make a trouble, but there are only default ones.
 I've tried to delete all ~/.lazarus but no difference.

MG Have you updated lazbuild?

MG make lazbuilder

I did build many times with make clean all and explicitly make
lazbuild.

I really have big headache from MacOS' version of FPC/Lazarus. I
cannot get rid of problems around porting to Mac.

Could you tell me, what I have to delete from MacOS 10.5 to clean
Lazarus/FPC out of computer completely, no settings, no units, no
symlinks, no executable and I will try to install all again. I really
think, that I did something wrong and that's the reason from these
troubles.

AFAYR, I didn't solve my problem with exception in FPC and I tried to
send two emails to Florian Kaempfl directly, but I got no answer from
him. I wanted to continue with porting to Mac, but...

 I have tried to get older FPC and older Lazarus (about end of July),
 but no difference.

 I am using MacOS X 10.5 PowerPC.

MG Mattias

Thanks in advance.

-- 
Best regards, TRoland
http://www.rotursoft.sk
http://exekutor.rotursoft.sk

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Revision 16278 can not rebuild the IDE

2008-08-29 Thread Mattias Gärtner
Zitat von Vincent Snijders [EMAIL PROTECTED]:

 Luiz Americo Pereira Camara schreef:
  Luiz Americo Pereira Camara wrote:
  Trying to rebuild the IDE leads to an error Fatal: Config file  is a
  directory.
 
  One more info that can help.
  The config files are stored at a path with accented characters:
  C:\Documents and Settings\luiz\Configurações locais\Dados de
  aplicativos\lazarus

 Fixed in r16295.

 Mattias, can you review that revision?

looking good

Mattias

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Security issue (symlink attack) in Lazarus filed on Fedora's bugzilla

2008-08-29 Thread Joost van der Sluis
Hi all,

As the packager of Lazarus in Fedora, I get notifications if someone
files a bug in Fedora's bug-tracker. 

Now someone added a bug-report with a security issue:
https://bugzilla.redhat.com/show_bug.cgi?id=460642

And indeed, if someone add a symlink like 'ln -s /tmp/fpc_patchdir /etc'
and thereafter someone with root-permissions runs the
check_fpc_dependencies.sh script with th following code in it he won't
be happy:

89 TmpDir=/tmp/fpc_patchdir
90 if [ $WithTempDir = yes ]; then
91 if [ -d $TmpDir ]; then
92   rm -rf $TmpDir/*
93 rm -r $TmpDir
94   fi

How can we fix this?

Joost.


___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE doesn't start after build with lazbuild

2008-08-29 Thread Mattias Gaertner
On Fri, 29 Aug 2008 14:24:41 +0200
Roland Turcan [EMAIL PROTECTED] wrote:

  29.8.2008 14:04 - Mattias Gärtner [EMAIL PROTECTED] 
 MG Zitat von Roland Turcan [EMAIL PROTECTED]:
 
  Hello lazarus project!
 
  When I build lazarus from actual SVN or older using by lazbuild,
  then lazarus doesn't start.
 
 MG Open a terminal and start it there:
 MG cd path/to/lazarus
 MG ./lazarus.app/Contents/MacOS/lazarus
 
 MG What does it show?
 
 That is the problem, I don't see anything. Computer gets slow and
 process is loaded. I need to kill it.

Can you start it in gdb and create a backtrace to find out, what takes
so long?

 
 Of course, I have checked files in lazarus.app and they are the same
 as in lazarus' root dir.
 
  When I try to build it using by make clean
  all, then IDE starts and I checked if there are any packages which
  could make a trouble, but there are only default ones.
  I've tried to delete all ~/.lazarus but no difference.
 
 MG Have you updated lazbuild?
 
 MG make lazbuilder
 
 I did build many times with make clean all and explicitly make
 lazbuild.

It's 'make lazbuilder' not 'make lazbuild'.
It gets confused often. I just added an alias, so that 'make lazbuild'
now works too.

 
 I really have big headache from MacOS' version of FPC/Lazarus. I
 cannot get rid of problems around porting to Mac.
 
 Could you tell me, what I have to delete from MacOS 10.5 to clean
 Lazarus/FPC out of computer completely, no settings, no units, no
 symlinks, no executable and I will try to install all again. I really
 think, that I did something wrong and that's the reason from these
 troubles.

/usr/local/bin/ppc386
/usr/local/bin/fpc
~/.fpc.cfg
/etc/fpc.cfg
/usr/local/lib/fpc
/usr/lib/fpc
~/.lazarus

 
 AFAYR, I didn't solve my problem with exception in FPC and I tried
 to send two emails to Florian Kaempfl directly, but I got no answer
 from him. I wanted to continue with porting to Mac, but...

Better ask on a forum or on a mailing list.


Mattias

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Need some help with UpdateSQL in TSQLQuery and TMySQL50Connection

2008-08-29 Thread Howard Lee Harkness
On Thu, Aug 28, 2008 at 4:37 PM, Joost van der Sluis [EMAIL PROTECTED] wrote:


 So now I understand what your problem is: actually it's not a problem
 with applyUpdates, but you want that it's called 'automagically'.

 I think you'd better place the ApplyUpdates in the after-scroll event,
 in that case. That's much easier. But your approach will also work.


Actually, I asked more than once (trying to phrase it differently each time)
Where does the call to ApplyUpdates need to be? and got similar
non-answers each time. But life goes on, and the PostgreSQL components
appear to do mostly what I had in mind.

If I should ever find time, I might look into why the MySQL components
didn't. However, time is at a premium these days, and probably always will
be. Once I finish this little side project, I will probably lose all
interest in Lazarus/FPC/PostgreSQL/MySQL anyway, and concentrate on my day
job as a high-performance graphics tools programmer using C++. The only
reason I was ever interested in Lazarus is because Delphi was the fastest,
easiest way I knew of to slap a GUI onto a trivial DB program (and the
program I was trying to write should have been REALLY trivial), and I didn't
have access to a copy of Delphi (too expensive for a one-off side project,
anyway).
-- 
Howard Lee Harkness
www.celtic-fiddler.com
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Security issue (symlink attack) in Lazarus filed on Fedora's bugzilla

2008-08-29 Thread Vincent Snijders
Joost van der Sluis schreef:
 Hi all,
 
 As the packager of Lazarus in Fedora, I get notifications if someone
 files a bug in Fedora's bug-tracker. 
 
 Now someone added a bug-report with a security issue:
 https://bugzilla.redhat.com/show_bug.cgi?id=460642
 
 And indeed, if someone add a symlink like 'ln -s /tmp/fpc_patchdir /etc'
 and thereafter someone with root-permissions runs the
 check_fpc_dependencies.sh script with th following code in it he won't
 be happy:
 
 89 TmpDir=/tmp/fpc_patchdir
 90 if [ $WithTempDir = yes ]; then
 91 if [ -d $TmpDir ]; then
 92   rm -rf $TmpDir/*
 93 rm -r $TmpDir
 94   fi
 

Somebody reported the same (or similar) issues in the debian bug tracker.

Maybe the best solution is not to package these scripts in rpm/debs, so 
that they don't enter the dangerous wild where people are running 
scripts with root permissions and add symlinks in the tmp directory.

Vincent
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Security issue (symlink attack) in Lazarus filed on Fedora's bugzilla

2008-08-29 Thread ik
You should create a temporary name or check and see where the symlink
follows before executing/removing it. So if it does not point for the
right direction, you just exit with an error.

Ido

On Fri, Aug 29, 2008 at 5:53 PM, Vincent Snijders [EMAIL PROTECTED] wrote:
 Joost van der Sluis schreef:
 Hi all,

 As the packager of Lazarus in Fedora, I get notifications if someone
 files a bug in Fedora's bug-tracker.

 Now someone added a bug-report with a security issue:
 https://bugzilla.redhat.com/show_bug.cgi?id=460642

 And indeed, if someone add a symlink like 'ln -s /tmp/fpc_patchdir /etc'
 and thereafter someone with root-permissions runs the
 check_fpc_dependencies.sh script with th following code in it he won't
 be happy:

 89 TmpDir=/tmp/fpc_patchdir
 90 if [ $WithTempDir = yes ]; then
 91 if [ -d $TmpDir ]; then
 92   rm -rf $TmpDir/*
 93 rm -r $TmpDir
 94   fi


 Somebody reported the same (or similar) issues in the debian bug tracker.

 Maybe the best solution is not to package these scripts in rpm/debs, so
 that they don't enter the dangerous wild where people are running
 scripts with root permissions and add symlinks in the tmp directory.

 Vincent
 ___
 Lazarus mailing list
 Lazarus@lazarus.freepascal.org
 http://www.lazarus.freepascal.org/mailman/listinfo/lazarus




-- 
http://ik.homelinux.org/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Security issue (symlink attack) in Lazarus filed on Fedora's bugzilla

2008-08-29 Thread Martin Friebe
Just some ideas on the topic. IMHO  the tmp-dir should have a random, or 
pseudo-random element to it, and the current script should not (at least 
not without asking) delete a tmp-dir.

A random element (such as the PID ) would solve issues if 2 different 
users run the script simultaneously (e.g if both install a local copy of 
lazarus into their home dirs). In terms of security it would make any 
attack on the tmp dirs harder.

This example also shows why existing temp dirs should not be deleted 
(without asking). They could still be in use. I have not checked the 
current script (and neither am I an expert on shell scripting), but I 
assume that the script removes it temp script on exit? And trap could 
be used to make sure this happens even if aborted?

Regards
Martin

Vincent Snijders wrote:
 Joost van der Sluis schreef:
   
 Hi all,

 As the packager of Lazarus in Fedora, I get notifications if someone
 files a bug in Fedora's bug-tracker. 

 Now someone added a bug-report with a security issue:
 https://bugzilla.redhat.com/show_bug.cgi?id=460642

 And indeed, if someone add a symlink like 'ln -s /tmp/fpc_patchdir /etc'
 and thereafter someone with root-permissions runs the
 check_fpc_dependencies.sh script with th following code in it he won't
 be happy:

 89 TmpDir=/tmp/fpc_patchdir
 90 if [ $WithTempDir = yes ]; then
 91 if [ -d $TmpDir ]; then
 92   rm -rf $TmpDir/*
 93 rm -r $TmpDir
 94   fi

 

 Somebody reported the same (or similar) issues in the debian bug tracker.

 Maybe the best solution is not to package these scripts in rpm/debs, so 
 that they don't enter the dangerous wild where people are running 
 scripts with root permissions and add symlinks in the tmp directory.

 Vincent
 ___
 Lazarus mailing list
 Lazarus@lazarus.freepascal.org
 http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
   
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Security issue (symlink attack) in Lazarus filed on Fedora's bugzilla

2008-08-29 Thread Joost van der Sluis
Op vrijdag 29-08-2008 om 15:53 uur [tijdzone +0200], schreef Mattias
Gaertner:
 On Fri, 29 Aug 2008 14:55:00 +0200
 Joost van der Sluis [EMAIL PROTECTED] wrote:
 
  Hi all,
  
  As the packager of Lazarus in Fedora, I get notifications if someone
  files a bug in Fedora's bug-tracker. 
  
  Now someone added a bug-report with a security issue:
  https://bugzilla.redhat.com/show_bug.cgi?id=460642
  
  And indeed, if someone add a symlink like 'ln
  -s /tmp/fpc_patchdir /etc' and thereafter someone with
  root-permissions runs the check_fpc_dependencies.sh script with th
  following code in it he won't be happy:
  
  89 TmpDir=/tmp/fpc_patchdir
  90 if [ $WithTempDir = yes ]; then
  91 if [ -d $TmpDir ]; then
  92   rm -rf $TmpDir/*
  93 rm -r $TmpDir
  94   fi
  
  How can we fix this?
 
 I replaced it with
   rm -rf $TmpDir

Read the link, this was only one example, but there are more. And your
solution works for the hack in my example, but I doubt it is entirely
safe.

Joost.

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Security issue (symlink attack) in Lazarus filed on Fedora's bugzilla

2008-08-29 Thread Mattias Gaertner
On Fri, 29 Aug 2008 18:31:42 +0200
Joost van der Sluis [EMAIL PROTECTED] wrote:

 Op vrijdag 29-08-2008 om 15:53 uur [tijdzone +0200], schreef Mattias
 Gaertner:
  On Fri, 29 Aug 2008 14:55:00 +0200
  Joost van der Sluis [EMAIL PROTECTED] wrote:
  
   Hi all,
   
   As the packager of Lazarus in Fedora, I get notifications if
   someone files a bug in Fedora's bug-tracker. 
   
   Now someone added a bug-report with a security issue:
   https://bugzilla.redhat.com/show_bug.cgi?id=460642
   
   And indeed, if someone add a symlink like 'ln
   -s /tmp/fpc_patchdir /etc' and thereafter someone with
   root-permissions runs the check_fpc_dependencies.sh script with th
   following code in it he won't be happy:
   
   89 TmpDir=/tmp/fpc_patchdir
   90 if [ $WithTempDir = yes ]; then
   91 if [ -d $TmpDir ]; then
   92   rm -rf $TmpDir/*
   93 rm -r $TmpDir
   94   fi
   
   How can we fix this?
  
  I replaced it with
rm -rf $TmpDir
 
 Read the link, this was only one example, but there are more. And your
 solution works for the hack in my example, but I doubt it is entirely
 safe.

You are right.
The script was not intended to run on malicious multi user systems. It
was written to create a rpm and to easily debug the rpm building.
Using the tmp directory is per se a security risk. It would be better
to use the home directory by default. But this does not work on some
systems.
The best ad hoc solution is already mentioned in the link: don't add
the scripts to the rpm.

Mattias
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Need some help with UpdateSQL in TSQLQuery and TMySQL50Connection

2008-08-29 Thread Jesus Reyes



--- El jue 28-ago-08, Howard Lee Harkness [EMAIL PROTECTED] escribió:

 De:: Howard Lee Harkness [EMAIL PROTECTED]
 Asunto: Re: [Lazarus] Need some help with UpdateSQL in TSQLQuery and 
 TMySQL50Connection
 A: General mailing list lazarus@lazarus.freepascal.org
 Fecha: jueves, 28 agosto, 2008, 3:21 pm
 After several rounds of non-answers here (seems the
 developers just assume
 everybody else should know the internals of everything,
 which is not
 realistic), a member of the Lazarus forum posted the answer
 to this problem.
 The ApplyUpdates call can be placed in the
 after event handlers. Fairly
 simple, and in retrospect, fairly obvious.
 
 Knowing that two months ago would have saved me a lot of
 time. Meanwhile, I
 switched to PostgreSQL, and the components for that DB
 don't appear to have
 the same problem.
 

Two months ago? it means you didn't read it: 

http://article.gmane.org/gmane.comp.ide.lazarus.general/25599/match=advice+creating+database+aware+application+lazarus


Jesus Reyes A.

__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 

___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus