Re: [Lazarus] OI Checkboxes

2014-12-02 Thread Frederic Da Vitoria
2014-12-01 19:29 GMT+01:00 Juha Manninen juha.mannine...@gmail.com:

 On Mon, Dec 1, 2014 at 8:11 PM, Frederic Da Vitoria davito...@gmail.com
 wrote:
  Properties : NVDA doesn't announce the property names in the Object
  inspector.

 This is a tough one. The property names are just text, not controls.
 Accessibility support should be explicitly built into OI. Felipe may
 know how big job it would be.


  I looked a little around to try to find how TCheckbox manages to be
 properly
  recognized by NVDA. I am guessing it has something to do with
  TLazAccessibleObject. But as I don't see TCheckbox doing anything in
 order
  to make it work, so that I am at a loss to tell why TCheckboxThemed does
 not
  work too. If someone has some more information on how this works, I could
  try to fix it.

 As explained earlier, TCheckbox binds to native (WinAPI) widget.
 TCheckboxThemed is a custom drawn component.

 Contributions are welcome. Good luck!

 Juha


OK, I'll work on it. but I'm a slow worker, I have lots of completely
different things to do at the same time.

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] FPC 2.7.1 and console output

2014-12-02 Thread Hans-Peter Diettrich
First I thank the Lazarus team for the fine 1.3 version, usable for 
development with FPC trunk (Unicode version). In detail the greyed-out 
branches in conditional compilation sections are very helpful when 
inspecting the RTL units :-)



On my first steps with the Unicode RTL I found a different behaviour, 
when a console program is compiled from an PAS file, and from an LPI/LPR 
project. [on WinXP, Ansi source files]


When compiled from an PAS file, the behaviour is identical to the direct 
compilation on the commandline, string output is readable.


When compiled from an LPR file (LPI project), the string output has 
unreadable UTF-8 encoding, even for UnicodeString. Did I miss some 
project setting, required for proper console output?


When I try {$codepage 1252}, I get an error during compilation (file 
not open)? The charset unit, mentioned in help on $codepage, doesn't 
give any clues about allowed values. What's the correct value for 
Windows default (western)? Or how else can I establish a global default 
sourcecode codepage?


DoDi


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


Re: [Lazarus] need clean some some lrs definitions

2014-12-02 Thread Mattias Gaertner
On Tue, 02 Dec 2014 13:02:24 +0200
FreeMan freema...@delphiturkiye.com wrote:

 DBFLaz.lpk
 MemDSLaz.lpk
 Printer4Lazarus.lpk
 SDFLaz.lpk
 
 this packages has .lrs definitions.

Thanks for the hint. Fixed.

Mattias

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


Re: [Lazarus] what Where is Error

2014-12-02 Thread Mattias Gaertner
On Tue, 02 Dec 2014 13:59:22 +0200
FreeMan freema...@delphiturkiye.com wrote:

 Hello,
 lazarus svn r47058. After update, I can not build lazarus. I could find 
 after 4 hours later. problem on thumbctrl 3.0 third party packages. 
 I'm use this pack since 5 months any errors. now has a error but what is 
 error? which file? why Input / output error?
 
 this is in messages box that all, just 2 lines.
 Compiling package thumbctrl 3.0: Exit code 256, Errors: 1
 Fatal: I/O error: File not open

Maybe it is this compiler bug:

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


Mattias

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


[Lazarus] what Where is Error

2014-12-02 Thread FreeMan

Hello,
lazarus svn r47058. After update, I can not build lazarus. I could find 
after 4 hours later. problem on thumbctrl 3.0 third party packages. 
I'm use this pack since 5 months any errors. now has a error but what is 
error? which file? why Input / output error?


this is in messages box that all, just 2 lines.
Compiling package thumbctrl 3.0: Exit code 256, Errors: 1
Fatal: I/O error: File not open

this is from terminal output:
TPkgManager.DoCompilePackage A thumbctrl 3.0 Flags=[]
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile  Compile was incomplete 
for thumbctrl 3.0
  State 
file=/home/lazarus/components/thumbviewer/lib/x86_64-linux/thumbctrl.compiled
TExternalTool.DoExecute Title=Compiling package thumbctrl 3.0 
Process.CurrentDirectory=/home/lazarus/components/thumbviewer/ 
Executable=/opt/freepascal/2.7.1/bin/fpc Params:

-MObjFPC
-Scghi
-Cg
-O1
-l
-vewnhibq
-Fu/opt/lazarus/packager/units/x86_64-linux
-Fu/opt/lazarus/components/lazutils/lib/x86_64-linux
-Fu/opt/lazarus/lcl/units/x86_64-linux
-Fu/opt/lazarus/lcl/units/x86_64-linux/qt
-Fu/home/lazarus/components/thumbviewer/
-FU/home/lazarus/components/thumbviewer/lib/x86_64-linux/
-dLCL
-dLCLqt
-dUseCThreads
thumbctrl.pas




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


Re: [Lazarus] FPC 2.7.1 and console output

2014-12-02 Thread Mattias Gaertner
On Tue, 02 Dec 2014 11:21:43 +0100
Hans-Peter Diettrich drdiettri...@aol.com wrote:

 First I thank the Lazarus team for the fine 1.3 version, usable for 
 development with FPC trunk (Unicode version). In detail the greyed-out 
 branches in conditional compilation sections are very helpful when 
 inspecting the RTL units :-)

Thanks.
Keep in mind that the IDE does not know all flags, so maybe some
highlights are wrong. Although so far no one has complained, so it
seems to work pretty well.


 On my first steps with the Unicode RTL I found a different behaviour, 
 when a console program is compiled from an PAS file, and from an LPI/LPR 
 project. [on WinXP, Ansi source files]

What do you mean with compiled from an PAS file?

You can see what parameters the IDE passed to the compiler. Right click
on the messages (e.g. the Compile Project...), then About Compiler
Project

 
 When compiled from an PAS file, the behaviour is identical to the direct 
 compilation on the commandline, string output is readable.
 
 When compiled from an LPR file (LPI project), the string output has 
 unreadable UTF-8 encoding, even for UnicodeString. Did I miss some 
 project setting, required for proper console output?

Have you set any flags in the Configure Build Lazarus dialog?

What do you mean with string output? 
In the LCL form?
In the console from writeln?
In the console from debugln?
In a file?

LCL and debugln expect UTF-8, writeln needs DefaultSystemCodePage in
FPC 2.7.1 and file is a broad category.

 
 When I try {$codepage 1252}, I get an error during compilation (file 
 not open)? The charset unit, mentioned in help on $codepage, doesn't 
 give any clues about allowed values. What's the correct value for 
 Windows default (western)?

{$codepage cp1252}

 Or how else can I establish a global default sourcecode codepage?

If you mean with global your project: Add -FcCP1252 to the custom
compiler options.


Mattias

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


Re: [Lazarus] what Where is Error

2014-12-02 Thread FreeMan

You right Mattias,
Cyrax's patch (comphook.pas.patch) fix on my system.
Kubuntu 14.04 x64 fpc svn r29192

On 02-12-2014 14:13, Mattias Gaertner wrote:

Maybe it is this compiler bug:

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


Mattias



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


[Lazarus] ShowModal always brings up MainForm, is this normal? (GTK)

2014-12-02 Thread Alexsander Rosa
All my forms are auto-created (is this relevant?). When I call (in
MainForm) Form1.Show and then Form1 calls Form2.ShowModal, the MainForm is
ALWAYS brought up behind Form2.

If you have a document open and you want to work side-by-side with Form1
(and eventually Form2), you need to move MainForm somewhere (and sometimes
there's no space) to avoid blocking the view of the document. Even if I
minimize the MainForm before calling Form2.ShowModal, the MainForm always
comes up.

Is this normal? Is there a way to go around it?

-- 
Atenciosamente,
Alexsander da Rosa
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] ShowModal always brings up MainForm, is this normal? (GTK)

2014-12-02 Thread zeljko

On 12/02/2014 03:08 PM, Alexsander Rosa wrote:

All my forms are auto-created (is this relevant?). When I call (in
MainForm) Form1.Show and then Form1 calls Form2.ShowModal, the MainForm
is ALWAYS brought up behind Form2.

If you have a document open and you want to work side-by-side with Form1
(and eventually Form2), you need to move MainForm somewhere (and
sometimes there's no space) to avoid blocking the view of the document.
Even if I minimize the MainForm before calling Form2.ShowModal, the
MainForm always comes up.

Is this normal? Is there a way to go around it?


Create issue and attach example project. Also write (explain) as much 
possible about widgetset if you're under x11 (eg distro, window manager, 
libs version if you're talking about gtk2 or qt).


zeljko


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


[Lazarus] Another Where is Error

2014-12-02 Thread FreeMan
Copied from messages form. I can see /usr/bin/ld: cannot find 
-lsqlite3 this line, but I don't know witch _*lpk or pas*_. How can I 
find wrong file or lpk and remove or fix error?

_
__Build IDE: Exit code 512, Errors: 1, Warnings: 1_
Verbose: /usr/bin/make -C ide idepkg
Verbose: make[1]: Entering directory `/opt/lazarus/ide'
Verbose: /usr/bin/make --assume-new=lazarus.pp lazarus OPT=' -gs -gl 
@/home/freeman35/.lazarus-freeman/idemake.cfg -vbq 
-FU/opt/lazarus/units/x86_64-linux/qt'

Verbose: make[2]: Entering directory `/opt/lazarus/ide'
Verbose: /opt/freepascal/2.7.1/bin/fpc -gl -Sci -dlclqt -Fu../designer 
-Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager 
-Fu../packager/frames -Fu../components/custom -Fuframes -Fu. 
-Fu/usr/lib/fpc/2.7.1/units/x86_64-linux/rtl -Fiinclude -Fiinclude/linux 
-Fi../images -FE.. -FU../units/x86_64-linux/qt -Cg 
-Fl/usr/lib/gcc/x86_64-linux-gnu/4.8 -Flinclude 
-Fl/etc/ld.so.conf.d/*.conf -gs -gl 
@/home/freeman35/.lazarus-freeman/idemake.cfg -vbq 
-FU/opt/lazarus/units/x86_64-linux/qt -dx86_64 lazarus.pp

Verbose: Free Pascal Compiler version 2.7.1 [2014/12/02] for x86_64
Verbose: Copyright (c) 1993-2014 by Florian Klaempfl and others
Verbose: Target OS: Linux for x86-64
Verbose: Compiling lazarus.pp
Verbose: Compiling resource /opt/lazarus/units/x86_64-linux/qt/lazarus.or
Verbose: Linking ../lazarus
/usr/bin/ld: warning: ../link.res contains output sections; did you 
forget -T?

/usr/bin/ld: cannot find -lsqlite3
lazarus.pp(142,1) Warning: Error while linking
lazarus.pp(142,1) Verbose: There were 1 errors compiling module, stopping
Error: Compilation aborted
Verbose: /usr/bin/ppcx64 returned an error exitcode
Verbose: make[2]: Leaving directory `/opt/lazarus/ide'
Verbose: make[1]: Leaving directory `/opt/lazarus/ide'
Verbose: [lazarus] Error 1
Verbose: [idepkg] Error 2

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


Re: [Lazarus] Another Where is Error

2014-12-02 Thread luiz americo pereira camara
You have a Lazarus package that depends of sqlite3


You should uninstall this package or install  the sqlite3-dev system package

Luiz

2014-12-02 12:01 GMT-03:00 FreeMan freema...@delphiturkiye.com:

  Copied from messages form. I can see /usr/bin/ld: cannot find -lsqlite3
 this line, but I don't know witch *lpk or pas*. How can I find wrong file
 or lpk and remove or fix error?

 *Build IDE: Exit code 512, Errors: 1, Warnings: 1*
 Verbose: /usr/bin/make -C ide idepkg
 Verbose: make[1]: Entering directory `/opt/lazarus/ide'
 Verbose: /usr/bin/make --assume-new=lazarus.pp lazarus OPT=' -gs -gl
 @/home/freeman35/.lazarus-freeman/idemake.cfg -vbq
 -FU/opt/lazarus/units/x86_64-linux/qt'
 Verbose: make[2]: Entering directory `/opt/lazarus/ide'
 Verbose: /opt/freepascal/2.7.1/bin/fpc -gl -Sci -dlclqt -Fu../designer
 -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager
 -Fu../packager/frames -Fu../components/custom -Fuframes -Fu.
 -Fu/usr/lib/fpc/2.7.1/units/x86_64-linux/rtl -Fiinclude -Fiinclude/linux
 -Fi../images -FE.. -FU../units/x86_64-linux/qt -Cg
 -Fl/usr/lib/gcc/x86_64-linux-gnu/4.8 -Flinclude -Fl/etc/ld.so.conf.d/*.conf
 -gs -gl @/home/freeman35/.lazarus-freeman/idemake.cfg -vbq
 -FU/opt/lazarus/units/x86_64-linux/qt -dx86_64 lazarus.pp
 Verbose: Free Pascal Compiler version 2.7.1 [2014/12/02] for x86_64
 Verbose: Copyright (c) 1993-2014 by Florian Klaempfl and others
 Verbose: Target OS: Linux for x86-64
 Verbose: Compiling lazarus.pp
 Verbose: Compiling resource /opt/lazarus/units/x86_64-linux/qt/lazarus.or
 Verbose: Linking ../lazarus
 /usr/bin/ld: warning: ../link.res contains output sections; did you forget
 -T?
 /usr/bin/ld: cannot find -lsqlite3
 lazarus.pp(142,1) Warning: Error while linking
 lazarus.pp(142,1) Verbose: There were 1 errors compiling module, stopping
 Error: Compilation aborted
 Verbose: /usr/bin/ppcx64 returned an error exitcode
 Verbose: make[2]: Leaving directory `/opt/lazarus/ide'
 Verbose: make[1]: Leaving directory `/opt/lazarus/ide'
 Verbose: [lazarus] Error 1
 Verbose: [idepkg] Error 2


 --
 ___
 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] Another Where is Error

2014-12-02 Thread FreeMan
My question is how to *find depend pas or lpk*.  I made mistake while 
add packs, and looking for witch lpk.
Messages form has a many verbose, Parameters  results, but no info for 
lpk, or project or file.


On 02-12-2014 17:26, luiz americo pereira camara wrote:

You have a Lazarus package that depends of sqlite3


You should uninstall this package or install  the sqlite3-dev system 
package


Luiz

2014-12-02 12:01 GMT-03:00 FreeMan freema...@delphiturkiye.com 
mailto:freema...@delphiturkiye.com:


Copied from messages form. I can see /usr/bin/ld: cannot find
-lsqlite3 this line, but I don't know witch _*lpk or pas*_. How
can I find wrong file or lpk and remove or fix error?
_
__Build IDE: Exit code 512, Errors: 1, Warnings: 1_
Verbose: /usr/bin/make -C ide idepkg
Verbose: make[1]: Entering directory `/opt/lazarus/ide'
Verbose: /usr/bin/make --assume-new=lazarus.pp lazarus OPT=' -gs
-gl @/home/freeman35/.lazarus-freeman/idemake.cfg -vbq
-FU/opt/lazarus/units/x86_64-linux/qt'
Verbose: make[2]: Entering directory `/opt/lazarus/ide'
Verbose: /opt/freepascal/2.7.1/bin/fpc -gl -Sci -dlclqt
-Fu../designer -Fu../debugger -Fu../debugger/frames
-Fu../converter -Fu../packager -Fu../packager/frames
-Fu../components/custom -Fuframes -Fu.
-Fu/usr/lib/fpc/2.7.1/units/x86_64-linux/rtl -Fiinclude
-Fiinclude/linux -Fi../images -FE.. -FU../units/x86_64-linux/qt
-Cg -Fl/usr/lib/gcc/x86_64-linux-gnu/4.8 -Flinclude
-Fl/etc/ld.so.conf.d/*.conf -gs -gl
@/home/freeman35/.lazarus-freeman/idemake.cfg -vbq
-FU/opt/lazarus/units/x86_64-linux/qt -dx86_64 lazarus.pp
Verbose: Free Pascal Compiler version 2.7.1 [2014/12/02] for x86_64
Verbose: Copyright (c) 1993-2014 by Florian Klaempfl and others
Verbose: Target OS: Linux for x86-64
Verbose: Compiling lazarus.pp
Verbose: Compiling resource
/opt/lazarus/units/x86_64-linux/qt/lazarus.or
Verbose: Linking ../lazarus
/usr/bin/ld: warning: ../link.res contains output sections; did
you forget -T?
/usr/bin/ld: cannot find -lsqlite3
lazarus.pp(142,1) Warning: Error while linking
lazarus.pp(142,1) Verbose: There were 1 errors compiling module,
stopping
Error: Compilation aborted
Verbose: /usr/bin/ppcx64 returned an error exitcode
Verbose: make[2]: Leaving directory `/opt/lazarus/ide'
Verbose: make[1]: Leaving directory `/opt/lazarus/ide'
Verbose: [lazarus] Error 1
Verbose: [idepkg] Error 2


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
mailto: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] Another Where is Error

2014-12-02 Thread luiz americo pereira camara
2014-12-02 12:47 GMT-03:00 FreeMan freema...@delphiturkiye.com:

  My question is how to *find depend pas or lpk*.


AFAIK, there's no way.

You may look at package files src

sqlite3laz is a package that have such dependency

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


Re: [Lazarus] Another Where is Error

2014-12-02 Thread FreeMan

Thank you Luiz,
Afew second ago I found, luilazreportcomponents 0.0 I'm not remember 
how to added this :)  I was added so long time ago for test this pack.

How to find: Uninstall and try rebuild IDE one by one :S

On 02-12-2014 18:15, luiz americo pereira camara wrote:

AFAIK, there's no way.

You may look at package files src

sqlite3laz is a package that have such dependency

Luiz



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


Re: [Lazarus] Another Where is Error

2014-12-02 Thread luiz americo pereira camara
2014-12-02 13:30 GMT-03:00 FreeMan freema...@delphiturkiye.com:

 Thank you Luiz,
 Afew second ago I found, luilazreportcomponents 0.0 I'm not remember how
 to added this :)  I was added so long time ago for test this pack.
 How to find: Uninstall and try rebuild IDE one by one :S


It's one of my packages.
It has a dependency of luicomponents that requires sqlite3
I have plans to remove this dependency unfortunately is low priority

Luiz



 On 02-12-2014 18:15, luiz americo pereira camara wrote:

 AFAIK, there's no way.

 You may look at package files src

 sqlite3laz is a package that have such dependency

 Luiz



 --
 ___
 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] FPC 2.7.1 and console output

2014-12-02 Thread Hans-Peter Diettrich

Mattias Gaertner schrieb:

On Tue, 02 Dec 2014 11:21:43 +0100
Hans-Peter Diettrich drdiettri...@aol.com wrote:


On my first steps with the Unicode RTL I found a different behaviour, 
when a console program is compiled from an PAS file, and from an LPI/LPR 
project. [on WinXP, Ansi source files]


What do you mean with compiled from an PAS file?


I wrote my first test programs with NotePad, and called FPC from the 
commandline. These files also compile okay with Lazarus, when loaded as 
projects.


Next I tried FP, but couldn't figure out how to configure it at all, for 
using the trunk compiler :-(


Finally I managed to build Lazarus trunk, and that's where I'm now.
When creating a project in Lazarus, the default file encoding (now?) 
seems to be UTF-8 without BOM, at least I had no problems with older 
versions - maybe because I only used ASCII in my programs, and rarely 
wrote console programs.


So how can I convince Lazarus to use (and assume) source files of my 
(non-VCL) projects being Windows codepage (1252)?




You can see what parameters the IDE passed to the compiler. Right click
on the messages (e.g. the Compile Project...), then About Compiler
Project


Then I need an wizard that explains me the consequences of (not) using 
any possible switch :-(




Have you set any flags in the Configure Build Lazarus dialog?


Not yet, I had a hard time until I could build and configure the current 
Lazarus trunk version. It looks to me as if the last FPC *release* 
version is required to build Lazarus, while I want to use the *trunk* 
version for compiling my own projects. If so, how do I tell all that to 
Lazarus?




What do you mean with string output?


WriteLn to the console.



LCL and debugln expect UTF-8, writeln needs DefaultSystemCodePage in
FPC 2.7.1 and file is a broad category.


All that should become unimportant with the Unicode RTL, when every API 
stub expects/returns strings of the according encoding, or converts its 
arguments to the right encoding. Every file object (TFileStream...) has 
a settable encoding, under full control of the coder.


I can see two major problems with the current FPC AnsiString model. The 
first problem is the strange FPC convention, that a string variable can 
have a different static/dynamic encoding, not only with RawByteString. 
That convention (flaw) can require an explicit SetCodePage for every 
string parameter, because a string argument of e.g. static type CP_OEM 
(for console output) can have any other actual (dynamic) encoding, not 
useful when passing the string to the external function.


The next problem results from the Delphi incompatible dynamic encoding 
of CP_ACP(=0), that seems to be used when a literal is stored in an 
AnsiString. These strings have the encoding assumed at *compile time*, 
perhaps from a {$codepage ...} switch, which can differ from the 
DefaultSystemCodepage at *runtime*. Then the conversion routines assume 
the the string is encoded according to DefaultSystemCodepage, what's not 
necessarily true:


var
  A: AnsiString;
begin
  a := ' äöü';
  WriteLn('CP_ACP=',DefaultSystemCodePage);
  WriteLn('Ansi CP=',StringCodePage(a),' Len=',Length(a),' =',a,'');
end.

Reports (on Windows) CP_ACP=1252, string CP=0, and due to the Lazarus 
File Encoding of UTF-8 the string literal and variable contains UTF-8 
(Len=7), as assumed by the compiler. The attempt in WriteLn, to convert 
the string to CP_OEM from encoding 0, mapped by TranslatePlaceholderCP 
into DefaultSystemCodePage (=1252 at runtime), results in a conversion 
of the UTF-8 bytes from CP 1252 into CP_OEM :-(


Even if the string A is assigned to an AnsiString(CP_OEMCP), that string 
has a dynamic encoding of 437, but contains the 7 UTF-8 bytes :-(


This mess could be eliminated easily, when FPC would store the *true* 
compile-time encoding with all string literals, not CP_ACP(=0). Delphi 
string literals instead come with their true dynamic encoding, which 
never can be 0, and thus can be assigned and shown properly. Above code 
then will show CP=1252 and Len=4 for the AnsiString variable. What's 
missing from XE is the automatic conversion on console output into 
CP_OEM, as done by FPC.
The use of TranslatePlaceholderCP() then also could be reduced to the 
rare cases, where *user* code is allowed to supply an encoding value 
(TSystemCodePage) separate from an string, e.g. in the AnsiString type 
declarations or SetCodePage.


As an ugly hack the coder can use {$codepage UTF8}, *and* force Lazarus 
to store the source files accordingly, and hope that then the literals 
have a useful dynamic encoding. This *is* an hack, because it makes the 
source files almost unusable with other programs (editors...) on Windows 
and other platforms, which don't have UTF-8 for their default encoding 
(CP_ACP). I also wonder what will happen on platforms with a default 
encoding of CP_UTF8, when the user is allowed to and then changes that 
default codepage into something else, for 

Re: [Lazarus] Another Where is Error

2014-12-02 Thread leledumbo
 My question is how to find depend pas or lpk

Make a good use of find in files feature. Dependency on external library
can only be achieved in three ways (AFAIR):
- {$LINKLIB libname} directive
- external 'libname' procedure modifier
- -kpass library to linker

Packages have linking options greyed out AFAIK, so 3rd way is not possible.
The other two can be easily searched using external 'sqlite3' or
{$LINKLIB sqlite3} against your packages directories.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Another-Where-is-Error-tp4039634p4039641.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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


Re: [Lazarus] ShowModal always brings up MainForm, is this normal? (GTK)

2014-12-02 Thread leledumbo
 Is this normal? Is there a way to go around it?

Yes, I experience both in Windows and Linux (KDE). This applies to
non-Lazarus made apps as well, so I guess it's system defined.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-ShowModal-always-brings-up-MainForm-is-this-normal-GTK-tp4039632p4039642.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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