* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
Graphics / Re: Headless graphics?
« Last post by Trenatos on Today at 09:36:55 pm »
Fantastic, thanks Graeme I'll give that a shot   :)
2
General / Re: Dealing with STDOUT with ProcThreadPool.DoParallel
« Last post by molly on Today at 09:36:13 pm »
Use it in the parellelMD5 call instead.
That's funny  ;D
3
Packages and Libraries / Re: fpReport/fcl-report build errors on Mac
« Last post by Trenatos on Today at 09:35:59 pm »
It looks like it has to do with my FPC being 32bit but FreeType being 64bit.

Once that's sorted I will try fcl-reports again.
4
General / Re: Dealing with STDOUT with ProcThreadPool.DoParallel
« Last post by marcov on Today at 09:30:28 pm »
Try flushing output (=stdout) before the paralel for, so

Code: Pascal  [Select]
  1. flush(output);
5
General / Re: Dealing with STDOUT with ProcThreadPool.DoParallel
« Last post by jamie on Today at 09:15:53 pm »
Looks like you are using the critical sections in the wrong place.

Use it in the parellelMD5 call instead.

 That  way you can completely build the string without it getting interrupted and
then call the writeln, etc,,,
6
Change your string type to AnsiString or UnicodeString. This looks like UTF16. FPC can handle it (Lazarus too,but not without manual intervention) so use one of the FPC supported string types when moving Delphi code. If it is a recent Delphi, use either {$mode delphiunicode}or better change the string declarations from string to unicodestring.

Ok - but at what point? TRegistry.GetValueNames populates a TStrings instance (I'm giving it a TStringList instance), and TRegistry.ReadString takes a String parameter as far as I can tell... where can I put a UnicodeString into the process?

There is one person who will try to explain otherwise, don't believe him, do what I say. Then it works.

 ;D
7
General / Re: TTimer frame rendering
« Last post by molly on Today at 08:57:45 pm »
also remember that TTimer is not at all accurate for small times, and any time setting below about 30ms will still take about 30ms.

TFPTimer seems to do a better job then:

Code: [Select]
interval  iterations  millisecs
30        167         5016
15        334         5014
5         1002        5014
1         5015        5016
8
Change your string type to AnsiString or UnicodeString. This looks like UTF16. FPC can handle it (Lazarus too,but not without manual intervention) so use one of the FPC supported string types when moving Delphi code. If it is a recent Delphi, use either {$mode delphiunicode}or better change the string declarations from string to unicodestring.

There is one person who will try to explain otherwise, don't believe him, do what I say. Then it works.
9
Beginners / Re: Best practices for Multiplatform GUI portability
« Last post by Thaddy on Today at 08:38:30 pm »
An average user expects the user experience of the platform. Not some -very nicely done! - approximation that looks the same on anything and my ex-girlfriends butt.
This can be done with Lazarus. Albeit with some quirks.
Usually serious programmers won't ask anymore when they grow up.
Then they can distinguish between everything the same anywhere and platform experience.

To put it simple: if and when you do ask such a question, make sure you know the platforms.
Either lazy or beginner. (Or capable of implementing true X-platform looks always the same anywhere  8-) )
10
Hi all, haven't been here for a while :-)

I have a program that reads the available COM ports from the Windows 10 registry (at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM\ ). It uses the TRegistry class with the usual methods (OpenKeyReadOnly, GetValueNames, ReadString etc.)

The program worked well for a long time, but at some point something changed (external to the program). I traced the issue to an Arduino clone with the CH340G USB-to-UART chip. The screenshot shows actual data from the registry. You can see two COM ports there: COM21 (key name '\Device\USBSER001') and COM3 ('\Device\Serial').

In my program, both keys are found, and the string 'COM21' is read correctly; it's associated with another Arduino with a different chip. However, for the other key I get an empty string instead of 'COM3'.

Windows itself, the Arduino IDE and a test program I wrote in Delphi all see and handle this 'COM3' string with no problem, but Lazarus can't read it.

I suspect that it's an encoding issue because the raw key name in Lazarus actually appears as '\Device\Serial?', and the Delphi debug watch said it's '\Device\Serial'#$0082 . So far I couldn't find a character to remove or add that will resolve this issue.

If you're still with me :) - any idea on how to tackle this matter?

Thanks,
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus