Re: [lazarus] GTK2 didn't display non-UTF8 characters

2007-12-29 Thread Vasily I. Volchenko
It is a question of using UTF-8. Using non-UTF8 in lazarus is not allowed (I am 
not far from making an import patch, but illness prevents from this). But, as I 
see, this is a problem of GTK-2. Anyway, gtk2 widgetset works only with utf-8, 
period (all arguments of making more universal were leaved).
Если коротко, то Lazarus использует только UTF8 в наборе элементов управления 
gtk2 (а потом ожидается и в Windows тоже). Как я не спорил и не аргументировал 
целесообразность оставить поддержку текущей кодировки, меня не понимали. Я 
собираюсь сделать патч для импорта внешних файлов

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Why IDE automatically insert empty events reactors implementations if its declarations presented ?

2007-12-29 Thread Andrey Gusev
* Mattias Gaertner [EMAIL PROTECTED] [Fri, 28 Dec 2007 
17:21:54 +0100]:

On Fri, 28 Dec 2007 18:27:02 +0300
Andrey Gusev [EMAIL PROTECTED] wrote:

 * Damien Gerard [EMAIL PROTECTED] [Fri, 28 Dec 2007 15:29:02
 +0100]:
 
  May be it is related to the fact in Delphi empty implementation
  attached to an event are automatically removed at the compilation
 

 How with that in Lazarus, in future ?

It has low priority.

Some people don't like it when their code is automatically removed
(e.g. Marc and me) and will turn this feature off. This means it will
be hardly tested/supported.



I don't like when code is automatically replenished :)
Be better, if it will fully controlled (what to insert, and how to do 
it).


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] IDE patch to dock Messages on Editor

2007-12-29 Thread Fabio Dell'Aria
Hi to all,

I have created a Patch to Dock the IDE Messages form on the Source Code
Editor form (at bottom).

See the attached screenshot.

I have just tested the Patch on Win32/QT/Gtk2 interface.

What do you think to apply this patch to the official SVN?

-- 
Best regards...

Fabio Dell'Aria.


DockedMessages.dif
Description: Binary data
attachment: DockedMessages.png

Re: [lazarus] IDE patch to dock Messages on Editor

2007-12-29 Thread Mattias Gaertner
On Sat, 29 Dec 2007 11:05:37 +0100
Fabio Dell'Aria [EMAIL PROTECTED] wrote:

 Hi to all,
 
 I have created a Patch to Dock the IDE Messages form on the Source
 Code Editor form (at bottom).
 
 See the attached screenshot.
 
 I have just tested the Patch on Win32/QT/Gtk2 interface.
 
 What do you think to apply this patch to the official SVN?

I think it became a FAQ. I added it:

http://wiki.lazarus.freepascal.org/Lazarus_Faq#I_created_a_Patch_to_dock_the_IDE_Messages_form_on_the_.22Source_Code_Editor.22_form_.28at_bottom.29


Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] IDE patch to dock Messages on Editor

2007-12-29 Thread Fabio Dell'Aria
Hi,

why do not add my patch to this FAQ so all the user that needed it can
simply use it? :)

I have attached the patch release 2 (fix a little anchor bug).

I'm working to dock the Main_Form(with
palette)/Object_Inspector/Source_Editor all in one (as in Delphi 2007).

2007/12/29, Mattias Gaertner [EMAIL PROTECTED]:

 On Sat, 29 Dec 2007 11:05:37 +0100
 Fabio Dell'Aria [EMAIL PROTECTED] wrote:

  Hi to all,
 
  I have created a Patch to Dock the IDE Messages form on the Source
  Code Editor form (at bottom).
 
  See the attached screenshot.
 
  I have just tested the Patch on Win32/QT/Gtk2 interface.
 
  What do you think to apply this patch to the official SVN?

 I think it became a FAQ. I added it:


 http://wiki.lazarus.freepascal.org/Lazarus_Faq#I_created_a_Patch_to_dock_the_IDE_Messages_form_on_the_.22Source_Code_Editor.22_form_.28at_bottom.29


 Mattias

 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives




-- 
Best regards...

Fabio Dell'Aria.


DockedMessages_2.dif
Description: Binary data


Re: [lazarus] IDE patch to dock Messages on Editor

2007-12-29 Thread Mattias Gaertner
On Sat, 29 Dec 2007 12:05:09 +0100
Fabio Dell'Aria [EMAIL PROTECTED] wrote:

 Hi,
 
 why do not add my patch to this FAQ so all the user that needed it can
 simply use it? :)

You are welcome to add a link or start a new page and add the code as
example. The FAQ can contain a link, but should not contain code, that
is not maintained by the lazarus devels.

 
 I have attached the patch release 2 (fix a little anchor bug).
 
 I'm working to dock the Main_Form(with
 palette)/Object_Inspector/Source_Editor all in one (as in Delphi
 2007).

Ok.
Maybe this helps:
Attached is an example of Víctor R. Ruiz [EMAIL PROTECTED] doing
something similar.


Mattias



 
 2007/12/29, Mattias Gaertner [EMAIL PROTECTED]:
 
  On Sat, 29 Dec 2007 11:05:37 +0100
  Fabio Dell'Aria [EMAIL PROTECTED] wrote:
 
   Hi to all,
  
   I have created a Patch to Dock the IDE Messages form on the
   Source Code Editor form (at bottom).
  
   See the attached screenshot.
  
   I have just tested the Patch on Win32/QT/Gtk2 interface.
  
   What do you think to apply this patch to the official SVN?
 
  I think it became a FAQ. I added it:
 
 
  http://wiki.lazarus.freepascal.org/Lazarus_Faq#I_created_a_Patch_to_dock_the_IDE_Messages_form_on_the_.22Source_Code_Editor.22_form_.28at_bottom.29
 
 
  Mattias
 
  _
   To unsubscribe: mail [EMAIL PROTECTED] with
  unsubscribe as the Subject
 archives at http://www.lazarus.freepascal.org/mailarchives
 
 
 
 


docked-ide.patch.gz
Description: GNU Zip compressed data


Re: [lazarus] MouseMove problem in WinCE

2007-12-29 Thread Paul Michell
I've been testing this further and it seems to be the TCanvas code
that is causing the fault, not the mouse message itself. The following example 
also causes a WinCE application to crash:

Procedure TForm1.FormPaint(Sender: TObject);
Begin
  Canvas.Brush.Color := clBlue;
  Canvas.Rectangle(Rect(50, 50, 150, 150));
End;

I am pretty sure this was working not that long ago. I will see if I can track 
down the cause, but I must admit I'm still weak on understanding how LCL 
hangs together!

Paul

On Friday 28 December 2007 07:44:36 Paul Michell wrote:
 Hello Everyone,

 I have just updated Lazarus to latest SVN (13497) and my WinCE application
 dies if I use a mouse move event. The following is a trivial example that
 displays the same bug. It works for Win32 but not on WinCE:

 Type Tform1 = Class(Tform)
 Procedure Formmousedown(Sender: Tobject; Button: Tmousebutton; Shift:
 Tshiftstate; X, Y: Integer);
 Procedure Formmousemove(Sender: Tobject; Shift: Tshiftstate; X, Y:
 Integer);
   Private
 { Private Declarations }
   Public
 { Public Declarations }
 OX, OY: Integer;
   Public
   End;

 Var
   Form1: Tform1;

 Implementation

 Procedure Tform1.Formmousedown(Sender: Tobject; Button: Tmousebutton;
 Shift: Tshiftstate; X, Y: Integer);
 Begin
   OX := X;
   OY := Y;
 End;

 Procedure Tform1.Formmousemove(Sender: Tobject; Shift: Tshiftstate; X, Y:
 Integer);
 Begin
   If ssLeft In Shift Then
   With Canvas Do
 Begin
   Pen.Color := clRed;
   Line(OX,OY,X,Y);
   OX := X;
   OY := Y;
 End;
 End;

 Am I missing something or is this a bug?

 Thanks,

 Paul Michell

 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] protected-Variables not visible in another file?

2007-12-29 Thread Lukas Gradl
OK - some wonderful hours of sleep and I discovered a second version of 
file2...


And voila - in this (newer) version FValue was declared public...

thanks for all the help.

Lukas

Lukas Gradl schrieb:

Sorry, might need a little bit more sleep - but at the moment I'm stuck:

I've to convert some files from Delphi to FPC (2.3.1, using Lazarus 
0.9.25 only as an editor)


In Delphi there is a a class TExample defined in file1.pas.
TExample=class
protected
  FValue:longint;
end;

in file2.pas I did:

use file1;
{...}
Example:=TExample.Create;
if Example.FValue=0 then begin...
{...}

When compiling with FPC and $MODE DELPHI I get an Identifier not found 
error.


Any idea what a tired guy might have missed?

regards
Lukas




--


software security networks
Lukas Gradl lazarus#ssn.at
Eduard-Bodem-Gasse 9
A - 6020 Innsbruck
Tel: +43-720-300168-0
Fax: +43-512-341033-19


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 didn't display non-UTF8 characters

2007-12-29 Thread 12 12
* Vasily I. Volchenko [EMAIL PROTECTED] [Sat, 29 Dec 2007 11:23:31 
+0300]:

It is a question of using UTF-8. Using non-UTF8 in lazarus is not
allowed (I am not far from making an import patch, but illness 

prevents

from this). But, as I see, this is a problem of GTK-2. Anyway, gtk2
widgetset works only with utf-8, period (all arguments of making more
universal were leaved).


Well I added AnsiToUtf8 function before displaying my received strings 
in controls.

Now i can see russian characters under GTK-2.
But if i compile the same application under Win32 i see trash.
How to make cross-platform application without writing different code 
for each widgetset?


--
12 12 aka skywriter

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: Re: [lazarus] GTK2 didn't display non-UTF8 characters

2007-12-29 Thread Vasily I. Volchenko
It's a known problem, Win32 (for now except for compiled with option 
-dWindowsUnicodeSupport or something like it) and gtk-1 interfaces use native 
1-byte encoding while gtk2 interface uses utf8 anyway (even if 
LANG=ru_RU.CP1251).

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Help installing package rxnew 1.1.5.98

2007-12-29 Thread Horacio Jamilis


I tried before my post downloading windres from cygwin... but without 
success...


Now worked!

Thanks!

Horacio

Vincent Snijders escribió:

Horacio Jamilis schreef:

Hi,

I am trying to install the rxnew package without success (I already 
have most availables packages from ccr).
But I have a link error when I install this package. If I uninstall 
it, lazarus links properly.
I was unable to understand where the problem is. I was unable to find 
any reference to fpc-res.res from this package...


Any help is appreciated.



You need to update windres. Easiest is to get a fpc 2.2.0 install, 
which contains these updated binaries, but they can be found in the 
fpcbuild svn repository too.


Vincent


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: Re: [lazarus] GTK2 didn't display non-UTF8 characters

2007-12-29 Thread 12 12
* Vasily I. Volchenko [EMAIL PROTECTED] [Sat, 29 Dec 2007 19:29:19 
+0300]:

It's a known problem, Win32 (for now except for compiled with option
-dWindowsUnicodeSupport or something like it) and gtk-1 interfaces use
native 1-byte encoding while gtk2 interface uses utf8 anyway (even if
LANG=ru_RU.CP1251).


Is there no way to make cross-platform application without writing 
different code

for  widgetset Win32 and GTK2?

--
12 12 aka skywriter


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 didn't display non-UTF8 characters

2007-12-29 Thread Mattias Gaertner
On Sat, 29 Dec 2007 21:25:35 +0300
12 12 [EMAIL PROTECTED] wrote:

 * Vasily I. Volchenko [EMAIL PROTECTED] [Sat, 29 Dec 2007 19:29:19 
 +0300]:
  It's a known problem, Win32 (for now except for compiled with option
  -dWindowsUnicodeSupport or something like it) and gtk-1 interfaces
  use native 1-byte encoding while gtk2 interface uses utf8 anyway
  (even if LANG=ru_RU.CP1251).
 
 Is there no way to make cross-platform application without writing 
 different code
 for  widgetset Win32 and GTK2?

Compiled with -dWindowsUnicodeSupport the LCL uses UTF-8 under windows
too. That means all LCL control strings expect UTF8.
The missing piece is the RTL. All filenames still use the system
encoding. For example:

StringList.LoadFromFile(UTF8ToAnsi(Edit1.Text));

This should work under all platforms, but I didn't test.

Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: Re: Re: [lazarus] GTK2 didn't display non-UTF8 characters

2007-12-29 Thread Vasily I. Volchenko
Seems like that. May be it can be possible to use/write such a translation 
functions, but at present - neither they are compatible in the source using 
high char comments/strings nor in reading non-utf texts.
I noticed that this is not acceptable - the answer is that win32 will be moved 
to UTF8 soon, and now lazarus is still beta.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] acs for lazarus

2007-12-29 Thread Bee

Hi all,

I was just trying to install ACS for Lazarus from
http://wiki.lazarus.freepascal.org/ACS

But, I failed. The package couldn't be compiled with the following
error: /$acs_folder/Src/classes/acs_classes.pas(148,24) Error:
Identifier not found 'class'

It kinds of weird, IMO, because the error happened on this line:
147|  {Basic exception class for ACS}
148|  EACSException = class(Exception)
149|  end;

If I didn't compile the ACS package (laz_acs.lpk) and use the
acs_classes.pas unit directly, it compiled just fine. I don't understand
how this could happen.

TIA.

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Making GTK Thread Safe

2007-12-29 Thread Micha Nelissen
Al Boldi wrote:
 I think the race comes in when you have two competing threads wanting to 
 synchronize the the main thread.  It just hangs.

Are you sure? This should work properly. Can you provide example (in a
bugreport)?

Micha

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Making GTK Thread Safe

2007-12-29 Thread Micha Nelissen
Martin Schreiber wrote:
 You are right, there seems to be no race condition if one uses WakeMainThread 
 correct. There can be a deadlock if the main thread tries to destroy a thread 
 which is waiting for Synchronize.

Hmm I think this is a very stupid idea to do. The thread will continue
to execute something so I don't think this is supported. Like destroying
a component in an event handler.

Micha

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives