Re: [Lazarus] Process differences

2021-10-19 Thread Denis Kozlov via lazarus
 On Tue, 19 Oct 2021 at 05:58, Steve Gatenby via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> Hoping someone could shed some light on why different results on the
> following code :)
>

There is a peculiar truncation at around 80 characters in your second
example. The output might be getting broken down into multiple lines.

You might want to inspect the raw content of the sData variable before
dumping it into a text file.

Also, try changing this line:
> slTemp.Add(sData);

To this line:
> slTemp.Text := sData;

Denis
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Is there a global timezone-independent time available?

2021-05-03 Thread Denis Kozlov via lazarus
You can use LazSysUtils.NowUTC, and then there is also PascalTZ package 
if you want to convert between timezones.


There is a ticket with a patch for adding a similar function to FPC, but 
it needs some attention:
https://bugs.freepascal.org/view.php?id=30394 



Regards,
Denis


On 03/05/2021 14:59, Bo Berglund via lazarus wrote:

If I use Now() to retrieve a TDateTime value I get it in whatever timezone
(including DST) the box I run on is set to...
And there is no indication of the timezone used (TDateTime is just a double
after all).

So now I wonder if there is some kind of globally constant time one can read
which can be used in scheduling applications no matter what time zone is used.
For example something like NowUTC() or similar?

I have been struggling with the user part of a remote monitoring system, which
will run on a RaspberryPi under Linux (Debian flavour).

And there are lots of problems when going between the actual remote system and
the config application because of the time zone differences.
It would help a lot if one could use a time that is not messed with and is the
same everywhere...

The important thing here is that two systems located at different places on
Earth should agree on such a time value if it is taken at the same absolute
instant.

And what is the useful resolution of the times?
seconds, miliseconds or what?



--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to hide pop-up menu before taking a screen snapshot?

2021-02-07 Thread Denis Kozlov via lazarus

Hi,

I had a similar experience with taking a screenshot programmatically. 
Simply waiting or processing application messages after hiding the form 
often doesn't help, and results in a form being a part of the screenshot 
anyway.


I managed to work around it by forcing Windows to repaint everything on 
the desktop by broadcasting WM_PAINT message, like so:


SendMessageTimeout(HWND_BROADCAST, WM_PAINT, 0, 0, SMTO_ABORTIFHUNG, 
1000, MsgResult);


You might also need to disable transition effects (fade-in and fade-out) 
by setting the DWMWA_TRANSITIONS_FORCEDISABLED flag on the form before 
hiding it, and then unsetting it when showing the form again.


DwmSetWindowAttribute(AForm.Handle, DWMWA_TRANSITIONS_FORCEDISABLED, 
@dwAttribute, SizeOf(dwAttribute));


Good luck,
Denis


On 07/02/2021 09:37, Bo Berglund via lazarus wrote:

I have worked on a tool to copy a region of the Windows desktop for use in
illustrations. The tool consists of a transparent form which is supposed to be
located on top of the area to copy.

This form has a pop-up menu where there are 3 items to select from:
- Copy image
- Copy position
- Close

When I use the "Copy image" function the resulting image contains the selected
menu item caption on top of the copied desktop bitmap...

I have tried various ways to get rid of this but everything I tried has failed.
So how can I hide the menu item caption in code before I make the image
extraction?

I even added a timer set to 50 ms interval and put the image copy in its ontimer
event hoping that the menu click should have exited and the text disappeared
before the image copy happened, but no go...

Here is the way the copy is commanded via the popup menu:
http://blog.boberglund.com/files/Lazarus_popmenu_usage.png

And here is a captured image where the popup caption is visible:
http://blog.boberglund.com/files/Lazarus_popmenu.png

As you can see the caption of the clicked menu item is still present in the
screenshot image...

Here is parts of the code:

procedure TfrmMain.miCopyImageClick(Sender : TObject);
begin
   //CopyScreenRect;  //Moved to timer
   //miCopyImage.Visible := false; //Does not work
   //self.Refresh;  //Does not work
   timCopyImg.Enabled := true;  //make copy inside timer event?
end;

procedure TfrmMain.miCopyPosClick(Sender : TObject);
begin
   SaveRectCoords; //Saving rect coordinates to clipboard (OK)
end;

procedure TfrmMain.timCopyImgTimer(Sender : TObject);
begin
   timCopyImg.Enabled := false;
   miCopyImage.Visible := false; //Does not work, caption still present
   self.Refresh;  //Does also not work to remove caption
   CopyScreenRect;
   miCopyImage.Visible := true;  //Put it back to enable next capture
end;

procedure TfrmMain.CopyScreenRect;
var
   MyCapture : TBgraBitmap;
   Clip: TRect;
begin
   try
 Clip := Bounds(Self.Left, Self.Top, Self.Width, Self.Height);
 Self.Visible := false; //Hide selection form before copy
 //Self.Hide;  //Not working for popup menu item...
 MyCapture := TBgraBitmap.Create();
 MyCapture.TakeScreenShot(Clip);
 Self.Visible := true; //Show selection form after copy is done
 //Self.Show;  //Not working for popup menu item...
 Clipboard.Assign(MyCapture.Bitmap);
   except
 on E: exception do
   Clipboard.AsText := E.Message;
   end;
end;

Even Self.Visible or Self.Hide do not remove the menuitem caption

What can I do?

Lazarus 2.0.10 / fpc 3.2.0 on Windows 10




--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] We are planning the next release: Lazarus 2.0.8

2020-04-09 Thread Denis Kozlov via lazarus

Hello Martin,

If it's not too late, can r62551 be merged too?

Bug report #36490:
Bitmap transparency (mask) not respected by TMenuItem
https://bugs.freepascal.org/view.php?id=36490

Regards,
Denis


On 02/04/2020 09:41, Martin Frb via lazarus wrote:

We would invite everyone to provide their feedback to help us improve
this upcoming release. Please let as know in particular:
- Any bug-fixes already made to trunk, that you believe should still be
   merged to the fixes branch (fixes that are not listed on the above wiki page)
- Any regressions that happened in fixes branch since the release of 2.0
- Other urgent matters, you believe we should know before the release.

Please attempt to provide your feedback by: 9th April 2020
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Feedback requested: File Search, a visual file search utility

2019-09-25 Thread Denis Kozlov via lazarus

Hi Anthony,

It looks great!

If you were looking for new features, please consider the following 
features:


1. Show the snippets from the file where the content was found, with
   some context lines around the matches.
2. Allow specifying regular expressions for content search (optionally).

These are killer features that any file content search app must have in 
my opinion.


You can see an example implementation in AstroGrep (Windows only):
http://astrogrep.sourceforge.net/screenshots/

Denis


On 25/09/2019 06:32, Anthony Walter via lazarus wrote:
If anyone is interested I've posted another hopefully useful program 
along with the source.


https://www.getlazarus.org/apps/filesearch/

The File Search utility is a stand alone tool for Mac, Windows, and 
Linux to search for files using a variety of criteria including 
containing text, file size, and file dates. The full source code is 
available on github and it has no dependencies other than the LCL, so 
anyone should be able to compile with a default installation of Lazarus.


I believe the program is bug free and pretty much feature complete per 
my original idea. If anyone would like to leave a comment of make a 
suggestion I'd open to your ideas.


-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] With new Win32 manifest LongPathAware I cannot make long filename

2018-11-23 Thread Denis Kozlov via lazarus


The new "Long path awareness" option is working!

Apparently, you need to do both, embed the manifest and enable long 
paths in the registry or group policy. Only then you will be able to use 
long paths without the "\\?\" prefix.


To enable via the Local Group Policy Editor, navigate to Local Computer 
Policy > Computer Configuration > Administrative Templates > System > 
Filesystem> Enable Win32 long paths = Enabled.


Tested on Windows 10, Lazarus 2.1.0 r59644, using RenameFile RTL routine.

Regards,
Denis


On 23/11/2018 14:24, AlexeyT via lazarus wrote:
This app cannot make 2nd folder (it can make 1st) and make file. Error 
on file saving. why? new manifest option is used. Win10.


{ TForm1 }

const
s1='w123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012'; 


  base='c:\work\';

procedure TForm1.Button1Click(Sender: TObject);
var f: TStringList;
begin
  ForceDirectories(base+s1+'\'+s1);
  f:= tstringlist.create;
  f.add('zzz');
  f.SaveToFile(base+s1+'\'+s1+'\test.txt');
  f.free;
end;



--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Long paths manifest

2018-11-19 Thread Denis Kozlov via lazarus


Any thoughts on integrating the long paths manifest into Lazarus as a 
project option?



On 13/11/2018 07:49, Denis Kozlov wrote:

Hello,

Windows API is capable of working with extended-length path for a 
maximum total path length of 32,767 characters, thus, overcoming the 
infamous 260 characters path limitation (a.k.a. MAX_PATH). To specify 
an extended-length path, use the "\\?\" prefix. For example, 
"\\?\C:\Very\Long\Path".


According to Windows Docs, one can enable the new long path behavior 
per app via the manifest:

-

    xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings;>

true
    

-

Has anyone had any experience with embedding such manifest? What would 
be the best way to add such a manifest to an application, currently?


Perhaps this could be added as an option in Lazarus IDE, similarly to 
the option for enabling themes support.


For the reference:
Windows Docs - Naming Files, Paths, and Namespaces - Maximum Path 
Length Limitation
https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation 



Regards,
Denis


--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Long paths manifest

2018-11-12 Thread Denis Kozlov via lazarus

Hello,

Windows API is capable of working with extended-length path for a 
maximum total path length of 32,767 characters, thus, overcoming the 
infamous 260 characters path limitation (a.k.a. MAX_PATH). To specify an 
extended-length path, use the "\\?\" prefix. For example, 
"\\?\C:\Very\Long\Path".


According to Windows Docs, one can enable the new long path behavior per 
app via the manifest:

-

    xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings;>

true
    

-

Has anyone had any experience with embedding such manifest? What would 
be the best way to add such a manifest to an application, currently?


Perhaps this could be added as an option in Lazarus IDE, similarly to 
the option for enabling themes support.


For the reference:
Windows Docs - Naming Files, Paths, and Namespaces - Maximum Path Length 
Limitation

https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation

Regards,
Denis
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus and Linked Lists

2018-06-27 Thread Denis Kozlov via Lazarus
FPC has a couple of internal linked list implementations but they are 
not exposed publicly, see:

* TLinkedList class in "compiler\cclasses.pas".
* TLinkedList class in "rtl\objpas\classes\sllist.inc".

Also, it is fairly easy to implement yourself following the pseudo code 
from wikipedia:

https://en.wikipedia.org/wiki/Linked_list
https://en.wikipedia.org/wiki/Doubly_linked_list
https://en.wikipedia.org/wiki/Category:Linked_lists

Denis


On 27/06/2018 07:24, Terry A. Haimann via Lazarus wrote:

Is there any documentation on using this object?

On Wed, 2018-06-27 at 13:06 +0200, Mattias Gaertner via Lazarus wrote:

On Wed, 27 Jun 2018 05:57:12 -0500
"Terry A. Haimann via Lazarus"  wrote:


Dumb question,

Is there a basic linked List object for Lazarus?

Have you seen the answer on the fpc list?

http://lists.freepascal.org/pipermail/fpc-pascal/2018-June/054287.htm
l

Mattias


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Sending e-mail from within Lazarus

2018-05-10 Thread Denis Kozlov via Lazarus


Try the latest trunk version of Synapse code:
http://sourceforge.net/p/synalist/code/HEAD/tree/trunk/

You'll also need OpenSSL binaries:
https://wiki.openssl.org/index.php/Binaries

Here is a snippet of a working connection routine, although tested in 
Delphi only:




uses
  // "ssl_openssl" unit is required to use SSL / TLS
  mimemess, mimepart, synachar, ssl_openssl;

type
  TMailerSecurity = (
    msNONE,
    msSTARTTLS,
    msSSLTLS
  );

procedure TMailer.Connect(const AHost: String; APort: Integer;
  ASecurity: TMailerSecurity; AAuthenticate: Boolean;
  const AUsername, APassword: String);
begin
  SMTP := TSMTPSend.Create;

  if AAuthenticate then
  begin
    SMTP.UserName := AUsername;
    SMTP.Password := APassword;
  end;
  SMTP.TargetHost := AHost;
  SMTP.TargetPort := IntToStr(APort);
  SMTP.AutoTLS := (ASecurity = msSTARTTLS);
  SMTP.FullSSL := (ASecurity = msSSLTLS);
  SMTP.Timeout := 1; // 10 seconds

  if not SMTP.Login then
    raise EMailer.CreateSMTP('SMTP.Login', SMTP);

  if AAuthenticate then
    if not SMTP.AuthDone then
  raise EMailer.Create(sMailerNotAuthenticated);
end;



Regards,
Denis


On 10/05/2018 14:31, Brian via Lazarus wrote:

Does anybody have a working example of sending e-mail from a Lazarus
program through their ISP's mail server (which requires SSL/TLS) that
they'd be willing to share with me? I've been trying to follow
Michael's writeup for using Synapse,  I'm getting a timeout error from
deep within the Synapse code, and I don't know whether it's something
that I've screwed up or some kind of incompatibility with the mail
server - my ISP, of course, will only tell me to use Outlook or
similar. :( If I try to step through with the debugger, I get a socket
error of 110. The version of Synapse I'm using is (I think) 40.1, at
least it's the version downloaded via the online package manager.

I'm using Lazarus 1.8.2 and FPC 3.0.4 as downloaded from SourceForge.

Thanks.



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Package and project file format

2018-03-03 Thread Denis Kozlov via Lazarus
+1 for getting rid of unit count and numeric tag suffixes from XML 
project/package files. They always create trouble for version control.


-1 for switching to JSON. Seems radical and unjustified, in my opinion.

Denis


On 03/03/2018 10:15, Michael Van Canneyt via Lazarus wrote:


Hello,

The package .lpk andproject .lpi file use the following format :

    
  
    
    
    
  
  
    
    
    
    
    
  


And similarly
 
  
    
  
  
    
    
  


Is it possible to get rid of the counts ?

Reason: if 2 people add files to a package/project, it always creates
conflicts when updating from the VCS. And if you're in bad luck, you 
need to change a lot of items.


On the other hand, if you do
 
  
  
    
  

The chance of conflicts becomes less, and the resolution easier.

Michael.


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Recommended practices for Win / Linux development.

2018-01-11 Thread Denis Kozlov via Lazarus

On 11/01/2018 15:25, Donald Ziesig via Lazarus wrote:

How about Line Endings?


You can use system unit constants which will map to the appropriate 
values on each platform:
System.LineEnding 

System.DirectorySeparator 



Also keep in mind that you can write conditional code aimed at specific 
platforms, for example:

{$IFDEF WINDOWS}
  Path := 'C:\Temp\';
{$ELSE}
  Path := '/tmp/';
{$ENDIF}

Denis
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Extended filter for Code Completion

2018-01-09 Thread Denis Kozlov via Lazarus

This feature is awesome! Works perfect so far, even with unit names.

It was on my wishlist since Lazarus 0.9 days.

Denis


On 08/01/2018 17:55, Juha Manninen via Lazarus wrote:

I applied the patch from here:
  https://bugs.freepascal.org/view.php?id=32974
It looks good to me.
Please test everybody. Does it have negative side-effects of some kind?

Juha


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IPC: TSimpleIPC, ZeroMQ, nanomsg...

2017-10-19 Thread Denis Kozlov via Lazarus

I would also suggest IPC through TCP/IP.

I have deployed several tools with such IPC implementation which operate 
across multiple platforms and are rock solid. All you need is a good 
networking library that works in both FPC and Delphi, such as Synapse 
 (make sure to use the 
latest trunk version). Both Java and C# have extensive TCP/IP components 
so you will have no problem there.


Also FPC wiki has a list of some networking libraries:
http://wiki.lazarus.freepascal.org/Networking_libraries

Denis


On 18/10/2017 21:38, Marcos Douglas B. Santos via Lazarus wrote:

Hi,

I would like to know if someone has already worked with Messages
between different programs, made in different languages, with binds to
work in FPC and Delphi 7.

My main case is connect a old Delphi 7 program to have a
"conversation" with others Exes, coded in FPC, locally.

But in the future, I will need to send/receive messages through
network, "talking" with Java and C# services.

Some options that I have already seen:
- ZeroMQ -> http://zeromq.org/
- nanomsg -> http://nanomsg.org/

I would like to use a "famous" library, which has good documentation
with many binds, or to use the simpler one that allows me to use in
all these languages above.

What do you propose?

Best regards,
Marcos Douglas


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] SimpleIPC

2017-10-15 Thread Denis Kozlov via Lazarus

FPC 2.6.4 didn't yet have any examples for SimpleIPC.

Here are examples for FPC 3.0 and trunk branches:
https://svn.freepascal.org/svn/fpc/branches/fixes_3_0/packages/fcl-process/examples/
https://svn.freepascal.org/svn/fpc/trunk/packages/fcl-process/examples/

You should use SimpleIPC that comes with those newer versions because it 
contains significant fixes and improvements.


Denis


On 14/10/2017 23:35, Terry A. Haimann via Lazarus wrote:

I have fpc 2.6.4 and I can't find such an examples directory.
It's on a Linux Mint install.

On Sat, 2017-10-14 at 18:33 -0300, Marcos Douglas B. Santos wrote:

On Sat, Oct 14, 2017 at 3:38 PM, Terry A. Haimann via Lazarus
 wrote:

I would like to see a example program forSimpleIPC Server and client.
It would be most helpful if these were cli programs so that I could see
what libraries were required.

There are some examples in \packages\fcl-process\examples directory.

Regards,
Marcos Douglas




--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Replacing accented letters

2017-10-04 Thread Denis Kozlov via Lazarus

You could use Unicode character decomposition.

For example, é (U+00E9) can be decomposed into an equivalent string of 
the base letter e (U+0065) and combining acute accent (U+0301).


Then, you could simply delete combining acute accents, leaving just the 
base letters.


Denis


On 04/10/2017 17:08, Koenraad Lelong via Lazarus wrote:

Hi,

Is there an easy way to replace accented letters (mostly the French 
one's) with their not-accented equivalents ? E.g. é -> e.


I could do it with a lookup-table I think, but are there more 
efficient ways ?


TIA,

Koenraad.


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] MainMenu dropped to the left, Win bug?

2017-09-28 Thread Denis Kozlov via Lazarus

On 28/09/2017 13:35, Alexey via Lazarus wrote:

User reported this bug here:

https://github.com/Alexey-T/CudaText/issues/1101


Maybe a "handedness" setting?

https://www.top-password.com/blog/fix-windows-10-opens-right-click-context-menu-to-left-side/

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TFilenameedit onchange osx

2017-08-23 Thread Denis Kozlov via Lazarus
FYI, there are few related bug reports about OnChange not firing 
correctly on Mac OS:

https://bugs.freepascal.org/view.php?id=24009 (year 2013)
https://bugs.freepascal.org/view.php?id=30167 (year 2016)

Denis


On 22/08/2017 15:34, Andrea Mauri via Lazarus wrote:

Dear all,

I noticed that
TFilenameedit onchange event is raised differently between win-linux 
and osx.

Windows and Linux behave in the same way, osx differently.

Onchange event is raised on windows and linux when click ok after file 
selection. While on osx Onchange is raised only if I directly edit the 
tfilenameedit.


Additionally, I tried onacceptfilename. It is raised when I select a 
file using the dialog but TFilenameedit.Filename = '' (win, lin, osx).


Any hints?

Andrea Mauri


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Installing LNet in Lazarus 1.6 fails

2017-06-22 Thread Denis Kozlov via Lazarus

Try using the latest SVN version:
https://svn.freepascal.org/svn/fpcprojects/lnet/trunk/
(currently revision 2706)


On 22/06/2017 16:15, Bo Berglund via Lazarus wrote:

I downloaded the LNet 0.6.5 zipfile from:
https://sourceforge.net/projects/lazarus-ccr/files/lNet/lNet%200.6.5/lnet-0.6.5.zip/download
I extracted it into a folder on my Win7 PC and then I started Lazarus
1.6 and went to Packages/Open Package File, navigated to the LNet
folder and selected the lazaruspackage/lnetvisual.lpk file.
Next I used the Install command and it adviced that it would also
install another lnet package. Accepted and it ran for a while, then
stopped with the following in the messages window:

Messages, Warnings: 1
Warning: other sources path of package "lnetbase 0.6.5" contains
directory "..\lib", which is already in the unit search path.
Compile package lnetbase 0.6.5: Success, Warnings: 11
lws2tcpip.pp(49,10) Warning: Function result does not seem to be set
lcommon.pp(358,4) Warning: User defined: check these ambiguous errors
lnet.pp(558,14) Warning: Comparison might be always true due to range
of constant and expression
lnet.pp(623,14) Warning: Comparison might be always true due to range
of constant and expression
lnet.pp(784,30) Warning: User defined: check if we need aOp = soSend
in the IF, perhaps bad recv is possible?
lnetssl.pp(214,24) Warning: Symbol "GetConnected" is deprecated
lhttputil.pp(92,45) Warning: Symbol "ShortMonthNames" is deprecated
lwebserver.pp(325,23) Warning: Symbol "CommandLine" is deprecated
lwebserver.pp(478,21) Warning: Symbol "CommandLine" is deprecated
lwebserver.pp(1123,4) Warning: User defined: TODO
lthreadevents.pp(101,26) Warning: Symbol "Resume" is deprecated
Compile package lnetvisual 0.6.5: Success
Build IDE: Exit code 2, Errors: 1, Warnings: 1
Warning: Recompiling sslsockets, checksum changed for OpenSSL
fphttpclient.pp(285,6) Fatal: Cannot find sslsockets used by
fphttpclient. Make sure all ppu files of a package are in its output
directory. ppu in wrong
directory=C:\programs\lazarus1.6\fpc\3.0.0\units\i386-win32\fcl-net\sslsockets.ppu..

I have no idea what is going on here, I just want to test the LNet
components for a simple TCP Client application.
What could I do to get this installed?

Lazarus 1.6 for Windows
FPC 3.0.0
OS: Windows 7 X64




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


Re: [Lazarus] Use rare Win32 API in LCLIntf.SetForegroundWindow

2017-05-24 Thread Denis Kozlov via Lazarus


I would advise strongly against the use of SwitchToThisWindow API 
function in Lazarus. Mainly because it states in the docs: /This 
function is not intended for general use. It may be altered or 
unavailable in subsequent versions of Windows./


Read more in Raymond Chen's blog - The life story of the 
SwitchToThisWindow function:

https://blogs.msdn.microsoft.com/oldnewthing/2007-00/?p=9183

Denis


On 23/05/2017 18:38, Alexey via Lazarus wrote:
What do you think about using this rare API [beginning from WinXP] in 
LCLIntf fnction? It will make LCL function work more stable: window 
will always go to foreground. I used it in CudaText. It works.


https://github.com/Alexey-T/CudaText/blob/master/app/fix_focus_window.pas



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


Re: [Lazarus] A simple way to stop the never ending story of long executable?

2017-05-20 Thread Denis Kozlov via Lazarus
I also agree with "Use external gdb debug symbols file" being ON by 
default for a new Lazarus project.


Unless of course some debug info formats didn't support it, which would 
raise other questions.


This is only a default option for new projects, which would affect 
mostly new users or quick test projects, where it should always be 
beneficial to keep executable file small.


Denis


On 20/05/2017 11:24, Giuliano Colla via Lazarus wrote:
I had tried in remote times to activate the "use external gdb debug 
symbols file" option, and it didn't work properly, so I forgot about 
it. But some time ago I tried again, and now it turns out to work 
perfectly, at least under Linux.


Wouldn't it be nice to set it active by default?

This could make unnecessary in many cases a different build mode for 
testing and for deploying, and would stop the complaints about "long 
executable".


Giuliano




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


Re: [Lazarus] TEdit appears empty when text is too long

2017-05-12 Thread Denis Kozlov via Lazarus

Thanks. This seems to confirm my theory.


On 12/05/2017 11:15, Alexey via Lazarus wrote:
I only say that ATBinHex component cannot draw too long lines (by 
DrawTextW? TextOutW?) when API takes more than 4K chars (fixed to 
using only small cnt of chars).



On 12.05.2017 02:10, Denis Kozlov via Lazarus wrote:
width of entire text content, as opposed to just the small visible part. 




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


Re: [Lazarus] Conditional code based on Lazarus/LCL version

2016-09-22 Thread Denis Kozlov

On 22/09/2016 22:02, Mattias Gaertner wrote:

See unit lclversion.


Thanks! Somehow I just couldn't find it.

Is it theoretically possible to implement a compile time define for 
Lazarus version?


Perhaps an extra define that Lazarus passes to compiler automatically?

Thanks,
Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE Docking windows and Editor Toolbar

2016-09-21 Thread Denis Kozlov

On 20/09/2016 15:23, Graeme Geldenhuys wrote:

Is it a known issue, or by design, that the Editor Toolbar doesn't
appear when the Anchor Docking packages is installed? Is it some docking
window limitation?


It is somewhat documented in: http://bugs.freepascal.org/view.php?id=29863

All toolbars disappear once you install anchor docking package, so 
toolbars need to be re-enabled manually. That's one of the problems. The 
other one is more severe, i.e. "TWinControl.WMSize loop detected".


Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Key Handling problem in Windows

2016-09-10 Thread Denis Kozlov

On 10/09/2016 19:20, Denis Kozlov wrote:

On 10/09/2016 15:13, Aradeonas wrote:
I have issue In windows if you hold the key down for more than 30-40 
second it will not send new messages to the form and event will not run.

This is my code and it works in Ubuntu very good but not in windows L


Which version of Lazarus and FPC are you using?


Just ran a quick test with:
Lazarus 1.4.4 + FPC 2.6.4
Lazarus 1.6.1 + FPC 3.0.0

No issues, even if the key is down for 2 minutes.

Provide more details and a complete example project, otherwise it seems 
that you may have a problem elsewhere in your code.


Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Key Handling problem in Windows

2016-09-10 Thread Denis Kozlov

On 10/09/2016 15:13, Aradeonas wrote:
I have issue In windows if you hold the key down for more than 30-40 
second it will not send new messages to the form and event will not run.

This is my code and it works in Ubuntu very good but not in windows L


Which version of Lazarus and FPC are you using?

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] bmp icons

2016-09-10 Thread Denis Kozlov

On 09/09/2016 23:54, Bob B. wrote:

what is a good collection of free, useful BMP images for speedbuttons?


3926 Free "Farm-Fresh Web Icons"
http://www.fatcow.com/free-icons

They are licensed under Creative Commons Attribution 3.0 License.

Denis
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TStringList alternatives?

2016-08-06 Thread Denis Kozlov

On 04/08/2016 14:15, Landmesser John wrote:

i use TStringList  to store about 100.000 values.

That's ok, but i would like to know if there are better ways to do that?


You can try TFPStringHashTable and TDictionary/THashMap generics. Maybe 
they will perform faster than TStringList.


Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] A new PascalTZ - time zone database for FPC / Lazarus

2016-07-20 Thread Denis Kozlov
On 19 July 2016 at 18:18, José Mejuto  wrote:

>
> No problem by my side, but I think that a copy of PascaTZ should be kept
> in the Lazarus CCR, maybe not updated on every update, only in major
> revisions with a note about the live updated repository.
>
> IMHO 1.0 version should be removed.
>

I have updated PascalTZ wiki article .

Can someone upload PascalTZ 2.0
 to Lazarus CCR?

Thanks,
Denis
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] A new PascalTZ - time zone database for FPC / Lazarus

2016-07-19 Thread Denis Kozlov
Hello,

I have forked PascalTZ  library about a
year ago with a goal to fix many parsing and time zone conversion problems,
refactor existing code and implement a testing framework.

This work has just finished with a milestone release of PascalTZ 2.0
. Master branch also
contains a design/runtime package for Lazarus IDE.

PascalTZ 2.0 is backward compatible with code written for PascalTZ 1.0, but
the usage has been somewhat simplified with addition of new methods:

> // Load time zone database from "tzdata" directory
> PascalTZ.DatabasePath := 'tzdata';
> // Convert current time in Paris to Chicago time
> PascalTZ.Convert(Now, 'Europe/Paris', 'America/Chicago');

Should the old PascalTZ in Lazarus CCR
 be removed
and the PascalTZ article  on the wiki
reflect the new home?

Regards,
Denis
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Target Survey

2016-07-18 Thread Denis Kozlov

80% Windows (mostly Win32 apps, few console tools)
15% Linux (console services and tools)
3% Mac (console tools)
2% FreeBSD (console services and tools)

Plan is to increase the share in Linux and Mac by porting some GUI apps.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Is the menu for AnchorDockingDsgn gone?

2016-07-06 Thread Denis Kozlov
On 6 July 2016 at 14:51, vfclists .  wrote:

>
> On 4 July 2016 at 20:46, vfclists .  wrote:
>
>> I have done a few builds of Lazarus trunk today, and in all of them the
>> menu for AnchorDockingDsgn 0.5 appears to be missing, unless it has been
>> moved somewhere else.
>>
>> It is the menu for saving and loading the Window layout.
>>
>
>
The menu for saving and loading anchored window layout is in *Main Menu >
Tools > Desktops* (Lazarus 1.7 r52643).

Denis
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus