Re: [Lazarus] MDI - working implementation !?

2014-10-26 Thread zeljko

On 10/26/2014 02:57 AM, Kostas Michalopoulos wrote:

Very interesting, i was actually looking into implementing MDI (for
Windows... AFAIK the Qt backend already has MDI support).

Although from a quick look at the code, it doesn't seem to do that, does
it? It looks like it only checks the form type, but still the forms are
top level, not under an MDI client window inside the main/MDI form.


That's why I said to Herwig to provide patch. Let we see what it does.
But IMO, win32 need ws implementation, part where mdiarea must be 
created and also mdichild handle.


zeljko



On Sat, Oct 25, 2014 at 10:25 AM, zeljko zel...@holobit.net
mailto:zel...@holobit.net wrote:

On 10/24/2014 02:03 PM, Herwig Niemeyer wrote:

On transcribing an old Delphi-Program to a Lazarus-program i was
in need
do have working MDI-functions.
I tried to implement them in customform.inc and they work fine
with my
program and in my environment.
There are still some problematic spots in the code and i would
appreciate comments/solutions for them.
regards


Please, learn howto make patch, open an issue about it at lazarus
bug tracker and attach patch.
I'll commit it after review. btw. what is your environment ?
widgetset ? OS ?

zeljko


--
_
Lazarus mailing list
Lazarus@lists.lazarus.__freepascal.org
mailto:Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.__freepascal.org/mailman/__listinfo/lazarus
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




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




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


Re: [Lazarus] Getting the last modified date of a directory

2014-10-26 Thread Jürgen Hestermann


Am 2014-10-25 um 19:19 schrieb Richard Mace:

Hi All,
I can see that we have a FileAge function and also a FileGetDate however, I 
was wondering what the best way of getting the last modified date of a folder? Effectively, the 
last time that a file was created/changed within a folder?


I think that FileAge should work for directory names too.
Have not tested though.

The question is: What does a directory date tell you?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Getting the last modified date of a directory

2014-10-26 Thread Reinier Olislagers
On 26/10/2014 10:09, Jürgen Hestermann wrote:
 I think that FileAge should work for directory names too.

Why do you think that?
The docs say it doesn't:
http://www.freepascal.org/docs-html/rtl/sysutils/fileage.html

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


Re: [Lazarus] Getting the last modified date of a directory

2014-10-26 Thread Richard Mace
I want to know the last time any file was created or modified within a
given folder which I believe is represented in windows via the last
modified date next to the folder?

Richard
On 26 Oct 2014 09:11, Jürgen Hestermann juergen.hesterm...@gmx.de wrote:


 Am 2014-10-25 um 19:19 schrieb Richard Mace:

  Hi All,
 I can see that we have a FileAge function and also a FileGetDate
 however, I was wondering what the best way of getting the last modified
 date of a folder? Effectively, the last time that a file was
 created/changed within a folder?

  I think that FileAge should work for directory names too.
 Have not tested though.

 The question is: What does a directory date tell you?

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


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


Re: [Lazarus] Getting the last modified date of a directory

2014-10-26 Thread Jürgen Hestermann


Am 2014-10-26 um 10:29 schrieb Reinier Olislagers:

On 26/10/2014 10:09, Jürgen Hestermann wrote:

I think that FileAge should work for directory names too.

Why do you think that?
The docs say it doesn't:
http://www.freepascal.org/docs-html/rtl/sysutils/fileage.html


At least on Windows there is no difference
to retrieve the date of a file or a directory:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724320%28v=vs.85%29.aspx
says:
Retrieves the date and time that a file *or directory* was created, last accessed, 
and last modified.
Nevertheless, I don't know whether this is true for other OS's too.



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


Re: [Lazarus] Getting the last modified date of a directory

2014-10-26 Thread Jürgen Hestermann


Am 2014-10-26 um 10:42 schrieb Richard Mace:


I want to know the last time any file was created or modified within a given 
folder which I believe is represented in windows via the last modified date 
next to the folder?



I am not sure when exactly directory dates are changed and
whether this behaviour is identical for all OS's (supported by Free Pascal).
When metadata of a directory is modified it can also change the last modified 
date.
This may not always be as expected.



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


Re: [Lazarus] Getting the last modified date of a directory

2014-10-26 Thread Reinier Olislagers
On 26/10/2014 11:45, Jürgen Hestermann wrote:
 
 Am 2014-10-26 um 10:29 schrieb Reinier Olislagers:
 On 26/10/2014 10:09, Jürgen Hestermann wrote:
 I think that FileAge should work for directory names too.
 Why do you think that?
 The docs say it doesn't:
 http://www.freepascal.org/docs-html/rtl/sysutils/fileage.html

 At least on Windows there is no difference
 to retrieve the date of a file or a directory:
Why are you quoting MSDN WinAPI help instead of FreePascal keyword help?

The FPC docs clearly state the return value is -1 in case of
directories. Have you tested it?


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


Re: [Lazarus] MDI - working implementation !?

2014-10-26 Thread Herwig Niemeyer

I provided a patch now. Hope all is ok because this is my first time to work in the community.

Now that I have built a testing-program (depending on built-in MDI methods or using a patched customform.inc) to check all the possibilities i can think of, it shows that inside the main/MDI form there are problems to get the correct zOrder. Therefore the function activeMDIChild does not work correctly. ( In my old Delphi-program i used MDIForm outside the main Form)


Link to my testprogram: https://dl.dropboxusercontent.com/u/24228536/projectMDITest.zip



Herwig




Gesendet:Sonntag, 26. Oktober 2014 um 08:18 Uhr
Von:zeljko zel...@holobit.net
An:Lazarus mailing list lazarus@lists.lazarus.freepascal.org
Betreff:Re: [Lazarus] MDI - working implementation !?

On 10/26/2014 02:57 AM, Kostas Michalopoulos wrote:
 Very interesting, i was actually looking into implementing MDI (for
 Windows... AFAIK the Qt backend already has MDI support).

 Although from a quick look at the code, it doesnt seem to do that, does
 it? It looks like it only checks the form type, but still the forms are
 top level, not under an MDI client window inside the main/MDI form.

Thats why I said to Herwig to provide patch. Let we see what it does.
But IMO, win32 need ws implementation, part where mdiarea must be
created and also mdichild handle.

zeljko


 On Sat, Oct 25, 2014 at 10:25 AM, zeljko zel...@holobit.net
 mailto:zel...@holobit.net wrote:

 On 10/24/2014 02:03 PM, Herwig Niemeyer wrote:

 On transcribing an old Delphi-Program to a Lazarus-program i was
 in need
 do have working MDI-functions.
 I tried to implement them in customform.inc and they work fine
 with my
 program and in my environment.
 There are still some problematic spots in the code and i would
 appreciate comments/solutions for them.
 regards


 Please, learn howto make patch, open an issue about it at lazarus
 bug tracker and attach patch.
 Ill commit it after review. btw. what is your environment ?
 widgetset ? OS ?

 zeljko


 --
 _
 Lazarus mailing list
 Lazarus@lists.lazarus.__freepascal.org
 mailto:Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.__freepascal.org/mailman/__listinfo/lazarus
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




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



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




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


Re: [Lazarus] MDI - working implementation !?

2014-10-26 Thread Herwig Niemeyer

I hope, i found a workaround to the problems with MDIChildren in a MainForm/MDIForm. In my testprogram it looks all okay to me.

But before i load up another patch perhaps someone does his/her own tests to make sure all is working fine.



https://dl.dropboxusercontent.com/u/24228536/projectMDIText.zip



Herwig





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


Re: [Lazarus] MDI - working implementation !?

2014-10-26 Thread zeljko

On 10/26/2014 05:22 PM, Herwig Niemeyer wrote:

I hope, i found a workaround to the problems with MDIChildren in a
MainForm/MDIForm. In my testprogram it looks all okay to me.
But before i load up another patch perhaps someone does his/her own
tests to make sure all is working fine.
https://dl.dropboxusercontent.com/u/24228536/projectMDIText.zip
Herwig


I've seen what are you doing in your project. It's not real mdi 
implementation (you're using ParentWindow, and that won't work as 
expected even on windows), and that differs from normal mdi usage in 
Delphi and Lazarus with qt widgetset.

Win32 widgetset must implement basic stuff.
How it works under linux gtk2 ?

zeljko


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


Re: [Lazarus] Find dialog too tight for translations

2014-10-26 Thread Giuliano Colla


Il 25/10/2014 18:49, waldo kitty ha scritto:

On 10/24/2014 5:34 PM, Giuliano Colla wrote:
Taking into account all suggestions, I came out with two possible 
layouts:


Option 1 = Buttons at the bottom of the form (like in my previous 
version)


Option 2 = Buttons at the right of the form (like in the original 
version)


i like them both... option 2 is like a lot of stuff that i work 
with... i have no preference between them at this time... maybe 
provide both so that implementers can choose which they prefer in 
their project?




It would appear that the majority is for Option 2. However, before 
submitting a patch, I'd like to see if the proposal of a user selectable 
layout is viable. Not only to satisfy also the minority, but also to 
clean up the situation, which currently IMO isn't too much satisfactory.


The idea of a selectable configuration has triggered the following 
considerations.


What happens now is that in lcl/forms you have two units, one for the 
Find dialog and one for the Replace dialog, each one with its form. You 
must use them to design your forms. Once you're happy with them, you 
must copy the code into one of the files included by the Dialogs unit 
which loads also the lfm files generated when compiling the other units. 
IOW quite a complicate situation, not too clean.
I gather that this is made necessary to avoid a circular dependency: you 
cannot include a unit which uses LCLBase into the package LCLBase itself.


A cleaner solution would be to build those dialogs in code, like the 
other ones in the Dialogs unit, without loading an lfm file from stream. 
Besides the advantage of providing a configurable layout, this solution 
could be implemented with an ancestor class of a generic Find/replace 
dialog, from which those two dialogs could be derived. This would 
provide the extra bonus to give to users the option of building their 
own custom dialogs, deriving them from the ancestor class, for special 
usage. A find/replace dialog used in an editor of po files may need the 
options of selecting MsgId/MsgStr, an application may need to 
enable/disable a search based on regular expressions, etc.
I'd like to investigate if this path can be followed without too many 
difficulties.


Any observations?

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


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


Re: [Lazarus] TFMTBCDField problem

2014-10-26 Thread Vincent Snijders
2014-10-24 13:28 GMT+02:00 Joost van der Sluis jo...@cnoc.nl:


 And I received a warning from Vincent that building the snapshot failed.

 So I know for sure that these snapshots are still being build. Maybe you
 have just bad luck that it is not available today, due to a mistake from
 me. So maybe wait one day, or that someone else can point out where the
 snapshot (from a day earlier) can be found.


That was not from a snapshot installer build, but from a build server which
just tests compilation. It does make all, does not package and does not
upload, delete old snapshots etc.

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