Re: [lazarus] [fpc] SQLdb: not clear excetion, Server connect failed.

2007-11-01 Thread Joost van der Sluis
fpc 2.2.0 sqldb-mysql doesn't work on 64-bit systems. You should use fpc
2.2.1.

Joost

Op woensdag 31-10-2007 om 17:19 uur [tijdzone +0100], schreef Alvise
Nicoletti:
 I finally managed to install lazarus on a linux 64 bits.
 
 But when I start the once-32-bit-working program that now is at 64 bit I 
 get this message when I do a query:
 Server connect failed.
 
 I also got a Connection esabilished in the beginning of the program. 
 So that should not be a library problem.
 
 How can I troubleshoot this?
 
 On the system 64 bits libs are correctly working.
 
 _
  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


[lazarus] freeze while resizing a window (GTK2 with rev 12674)

2007-11-01 Thread Albert Zeyer
Hi,

I got a freeze when I resize my window to a size where one of the panels
of the form becames completly hidden (it is moved to the left while
making the window smaller; this is because of the Anchors: left, right,
bottom).

I am using GTK2 and Lazarus rev 12674.

On the console, I get all the time: (also when I do nothing)
[DBGTGT]
NOTE: TGtkWidgetSet.InvalidateRect during paint message: TMainForm

I paused the application after it freezed. This is the stack then:

#0 g_source_list_add((^GSource) 0x8a45458, (^GMainContext) 0x837c308) at
gmain.c:848
#1 IA__g_source_attach((^GSource) 0x8a45458, (^GMainContext) 0x837c308)
at gmain.c:913
#2 IA__g_idle_add_full(110, 0xb7c0b235 gtk_container_idle_sizer, 0x0,
0) at gmain.c:3986
#3 _gtk_container_queue_resize((^GtkContainer) 0x837c968) at
gtkcontainer.c:1154
#4 real_queue_resize((^GtkWidget) 0x8378a98) at gtksizegroup.c:143
#5 queue_resize_on_widget((^GtkWidget) 0x8378a98, 1) at
gtksizegroup.c:187
#6 IA__gtk_widget_queue_resize((^GtkWidget) 0x8378a98) at
gtkwidget.c:2795
#7 gtk_layout_move_internal((^GtkLayout) 0x837c968, (^GtkWidget)
0x8378a98, 1, 0, 1, 311) at gtklayout.c:399
#8 FIXEDMOVECONTROL((PGTKWIDGET) 0x837c968, (PGTKWIDGET) 0x8378a98, 0,
311) at gtkproc.inc:3958
#9 SETWIDGETSIZEANDPOSITION((^TWINCONTROL) 0xb74549f0) at
gtkproc.inc:7089
#10 RESIZEHANDLE((^TWINCONTROL) 0xb74549f0) at gtkproc.inc:7028
#11 TGTKWSWINCONTROL__SETBOUNDS((^TWINCONTROL) 0xb74549f0, 0, 311, 0,
101, (pvmt) 0xb74a6f40) at gtkwscontrols.pp:291
#12 TWINCONTROL__DOSENDBOUNDSTOINTERFACE((TWINCONTROL) 0xb74549f0) at
wincontrol.inc:7172
#13 TWINCONTROL__REALIZEBOUNDS((TWINCONTROL) 0xb74549f0) at
wincontrol.inc:7196
#14 TWINCONTROL__REALIZEBOUNDSRECURSIVE((TWINCONTROL) 0xb74549f0) at
wincontrol.inc:7207
#15 TWINCONTROL__ALIGNCONTROL((TCONTROL) 0xb74549f0, (TWINCONTROL)
0xb744a780) at wincontrol.inc:5563
#16 TCONTROL__REQUESTALIGN((TCONTROL) 0xb74549f0) at control.inc:2794
#17 TCONTROL__CHANGEBOUNDS(0, 311, 1, 101, (TCONTROL) 0xb74549f0) at
control.inc:406
#18 TCONTROL__SETBOUNDS(0, 311, 1, 101, (TCONTROL) 0xb74549f0) at
control.inc:2738
#19 TWINCONTROL__SETBOUNDS(0, 311, 1, 101, (TWINCONTROL) 0xb74549f0) at
wincontrol.inc:6949
#20 TCONTROL__SETBOUNDSKEEPBASE(0, 311, 1, 101, true, (TCONTROL)
0xb74549f0) at control.inc:4029
#21 TWINCONTROL__WMSIZE({MSG = 5, SIZETYPE = 128, WIDTH = 1, HEIGHT =
101, RESULT = 0}, (TWINCONTROL) 0xb74549f0) at wincontrol.inc:6041
#22 SYSTEM_TOBJECT_$__DISPATCH$formal at :0
#23 TCONTROL__WNDPROC({MSG = 5, WPARAM = 128, LPARAM = 6619137, RESULT =
0, WPARAMLO = 128, WPARAMHI = 0, LPARAMLO = 1, LPARAMHI = 101, RESULTLO
= 0, RESULTHI = 0}, (TCONTROL) 0xb74549f0) at control.inc:1579
#24 TWINCONTROL__WNDPROC({MSG = 5, WPARAM = 128, LPARAM = 6619137,
RESULT = 0, WPARAMLO = 128, WPARAMHI = 0, LPARAMLO = 1, LPARAMHI = 101,
RESULTLO = 0, RESULTHI = 0}, (TWINCONTROL) 0xb74549f0) at
wincontrol.inc:4628
#25 DELIVERMESSAGE((POINTER) 0xb74549f0, void) at gtkproc.inc:3738
#26 SENDSIZENOTIFICATIONTOLCL((PGTKWIDGET) 0x8378a98) at
gtkproc.inc:6895
#27 GTKSIZE_ALLOCATECB((PGTKWIDGET) 0x8378a98, (PGDKRECTANGLE)
0xbfe41748, (POINTER) 0xb74549f0) at gtkcallback.inc:2596
#28 IA__g_cclosure_marshal_VOID__BOXED((^GClosure) 0xb7454c68, (^GValue)
0x0, 2, (^GValue) 0xbfe414d8, 0xbfe413e8, 0xb74a6f40) at gmarshal.c:566
#29 IA__g_closure_invoke((^GClosure) 0x83f5b20, (^GValue) 0x0, 2,
(^GValue) 0xbfe414d8, 0xbfe413e8) at gclosure.c:490
#30 signal_emit_unlocked_R((^SignalNode) 0x8391220, 0, 0x8378a98,
(^GValue) 0x0, (^GValue) 0xbfe414d8) at gsignal.c:2440
#31 IA__g_signal_emit_valist(0x8378a98, 23, 0, 0xbfe4171c
#152#138'7'#8#160#23#228#191'D'#23#228#191#200's'#207#183) at
gsignal.c:2199
#32 IA__g_signal_emit(0x8378a98, 23, 0) at gsignal.c:2243
#33 IA__gtk_widget_size_allocate((^GtkWidget) 0x8378a98,
(^GtkAllocation) 0xbfe41790) at gtkwidget.c:3063
#34 gtk_layout_size_allocate((^GtkWidget) 0x837c968, (^GtkAllocation)
0xbfe41c98) at gtklayout.c:1102
#35 IA__g_cclosure_marshal_VOID__BOXED((^GClosure) 0x83910b0, (^GValue)
0x0, 2, (^GValue) 0xbfe41a28, 0xbfe41938, 0xb7c87ffe) at gmarshal.c:566
#36 g_type_class_meta_marshal((^GClosure) 0x83910b0, (^GValue) 0x0, 2,
(^GValue) 0xbfe41a28, 0xbfe41938, 0x80) at gclosure.c:567
#37 IA__g_closure_invoke((^GClosure) 0x83910b0, (^GValue) 0x0, 2,
(^GValue) 0xbfe41a28, 0xbfe41938) at gclosure.c:490
#38 signal_emit_unlocked_R((^SignalNode) 0x8391220, 0, 0x837c968,
(^GValue) 0x0, (^GValue) 0xbfe41a28) at gsignal.c:2370
#39 IA__g_signal_emit_valist(0x837c968, 23, 0, 0xbfe41c6c '') at
gsignal.c:2199
#40 IA__g_signal_emit(0x837c968, 23, 0) at gsignal.c:2243
#41 IA__gtk_widget_size_allocate((^GtkWidget) 0x837c968,
(^GtkAllocation) 0xbfe41cf0) at gtkwidget.c:3063
#42 gtk_scrolled_window_size_allocate((^GtkWidget) 0x83ef800,
(^GtkAllocation) 0xbfe42208) at gtkscrolledwindow.c:1335
#43 IA__g_cclosure_marshal_VOID__BOXED((^GClosure) 0x83910b0, (^GValue)
0x0, 2, (^GValue) 0xbfe41f98, 0xbfe41ea8, 0xb7cec47e) at gmarshal.c:566
#44 g_type_class_meta_marshal((^GClosure) 

[lazarus] svn r 12675 fails to compile

2007-11-01 Thread Giuliano Colla

When trying to rebuild Lazarus with latest svn (r 12675), compile fails.
In fileprocs.pas it complains that it cannot determine which overloaded 
function to use,  in the DebugLn procedure,  between line vtInt64 and 
vtQWord.

Reverting to r 12674 works fine.

Platform is linux, widgetset gtk1.

Thanks,

Giuliano

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


Re: [lazarus] svn r 12675 fails to compile

2007-11-01 Thread Mattias Gaertner
On Thu, 01 Nov 2007 13:29:21 +0100
Giuliano Colla [EMAIL PROTECTED] wrote:

 When trying to rebuild Lazarus with latest svn (r 12675), compile
 fails. In fileprocs.pas it complains that it cannot determine which
 overloaded function to use,  in the DebugLn procedure,  between line
 vtInt64 and vtQWord.
 Reverting to r 12674 works fine.
 
 Platform is linux, widgetset gtk1.

It works here with 2.2.1. The change was done for the recent 2.3.1
compiler. What fpc version do you use?

I added a qword overload. Maybe this will run compile under all fpc
versions.

Mattias

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


Re: [lazarus] freeze while resizing a window (GTK2 with rev 12674)

2007-11-01 Thread Mattias Gaertner
On Thu, 01 Nov 2007 14:23:59 +0200
Albert Zeyer [EMAIL PROTECTED] wrote:

 Hi,
 
 I got a freeze when I resize my window to a size where one of the
 panels of the form becames completly hidden (it is moved to the left
 while making the window smaller; this is because of the Anchors:
 left, right, bottom).
 
 I am using GTK2 and Lazarus rev 12674.
 
 On the console, I get all the time: (also when I do nothing)
 [DBGTGT]
 NOTE: TGtkWidgetSet.InvalidateRect during paint message: TMainForm

This normally indicates, that you have a bug in your OnPaint code. Only
paint in the OnPaint event. Do not change properties or resize, move,
delete or create controls.

Mattias

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


[lazarus] Hiding ancentors member during inheritance

2007-11-01 Thread 12 12

Suppose i've got class
TA = class
public
 itsMember1 : longint;
end;

I want class TB = class(TA); but itsMember1 should be private.
Is it possible?

--
12 12 aka skywriter

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


Re: [lazarus] svn r 12675 fails to compile

2007-11-01 Thread Antonio Sanguigni

 It works here with 2.2.1. The change was done for the recent 2.3.1
 compiler. What fpc version do you use?

 I added a qword overload. Maybe this will run compile under all fpc
 versions.


I have the same error here. Fpc version 2.2.0 .

Thanks
Antonio

-- 
Antonio Sanguigni alias slapshot
--
GioveLUG (Linux User Group) - http://www.giovelug.org
Edupup (Educational distro) - http://www.edupup.org


Re: [lazarus] svn r 12675 fails to compile

2007-11-01 Thread Giuliano Colla

Mattias Gaertner ha scritto:

On Thu, 01 Nov 2007 13:29:21 +0100
Giuliano Colla [EMAIL PROTECTED] wrote:

  

When trying to rebuild Lazarus with latest svn (r 12675), compile
fails. In fileprocs.pas it complains that it cannot determine which
overloaded function to use,  in the DebugLn procedure,  between line
vtInt64 and vtQWord.
Reverting to r 12674 works fine.

Platform is linux, widgetset gtk1.



It works here with 2.2.1. The change was done for the recent 2.3.1
compiler. What fpc version do you use?

  

You're right, I forgot to mention. It's fpc 2.0.4.

Giuliano



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


Re: [lazarus] freeze while resizing a window (GTK2 with rev 12674)

2007-11-01 Thread Albert Zeyer
Am Donnerstag, den 01.11.2007, 13:59 +0100 schrieb Mattias Gaertner:
 On Thu, 01 Nov 2007 14:23:59 +0200
 Albert Zeyer [EMAIL PROTECTED] wrote:
 
  On the console, I get all the time: (also when I do nothing)
  [DBGTGT]
  NOTE: TGtkWidgetSet.InvalidateRect during paint message: TMainForm
 
 This normally indicates, that you have a bug in your OnPaint code. Only
 paint in the OnPaint event. Do not change properties or resize, move,
 delete or create controls.
 

I stepped through the code and I figured out that I get the message
exactly at this point:
GamePanel.Canvas.Draw(0,0,MyRoomPic.Picture);
GamePanel is a TImage and MyRoomPic.Picture is a TBitmap.

So, is the code wrong? How should I draw otherwise the TBitmap on the
TImage?

--
Albert

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


[lazarus] Emulate keyboard input like Windows Screen Keyboard

2007-11-01 Thread 12 12

Is there any cross-platform way to implement subj?
Suppose I need from Form2 to add some letter into TEdit which placed on 
Form1.

Except of WinAPI's SendInput.


--
12 12 aka skywriter

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


[lazarus] weird message

2007-11-01 Thread Giuliano Colla
Do other guys in this list receive an automatic answer for each post to 
the effect that a not better known


Trzeciak, Grzegorz Zygmunt 


is on home leave?

If not, you're prevented. He's on home leave, and won't be able to take 
advantage of our wisdom, at least for today.  :-)



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


Re: [lazarus] svn r 12675 fails to compile

2007-11-01 Thread Mattias Gaertner
On Thu, 01 Nov 2007 14:56:41 +0100
Giuliano Colla [EMAIL PROTECTED] wrote:

 Mattias Gaertner ha scritto:
  On Thu, 01 Nov 2007 13:29:21 +0100
  Giuliano Colla [EMAIL PROTECTED] wrote:
 

 
  I added a qword overload. Maybe this will run compile under all fpc
  versions.
 

 Yes, now (r 12678) it compiles and doesn't complain

So, it works now under 2.0.4, 2.3.1 and 2.2.1, but not under 2.2.0?
Can someone with 2.2.0 confirm?

Mattias

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


Re: [lazarus] Hiding ancentors member during inheritance

2007-11-01 Thread Marc Weustink

12 12 wrote:

Suppose i've got class
TA = class
public
 itsMember1 : longint;
end;

I want class TB = class(TA); but itsMember1 should be private.
Is it possible?


No. Doesn't make much sense, since casting TA(B) would give access anyway

Marc

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


Re: [lazarus] svn r 12675 fails to compile

2007-11-01 Thread Giuliano Colla

Mattias Gaertner ha scritto:

On Thu, 01 Nov 2007 13:29:21 +0100
Giuliano Colla [EMAIL PROTECTED] wrote:

  



I added a qword overload. Maybe this will run compile under all fpc
versions.

  

Yes, now (r 12678) it compiles and doesn't complain

Thanks,

Giuliano


Mattias

_
 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] freeze while resizing a window (GTK2 with rev 12674)

2007-11-01 Thread Mattias Gaertner
On Thu, 01 Nov 2007 15:51:59 +0200
Albert Zeyer [EMAIL PROTECTED] wrote:

 Am Donnerstag, den 01.11.2007, 13:59 +0100 schrieb Mattias Gaertner:
  On Thu, 01 Nov 2007 14:23:59 +0200
  Albert Zeyer [EMAIL PROTECTED] wrote:
  
   On the console, I get all the time: (also when I do nothing)
   [DBGTGT]
   NOTE: TGtkWidgetSet.InvalidateRect during paint message: TMainForm
  
  This normally indicates, that you have a bug in your OnPaint code.
  Only paint in the OnPaint event. Do not change properties or
  resize, move, delete or create controls.
  
 
 I stepped through the code and I figured out that I get the message
 exactly at this point:
   GamePanel.Canvas.Draw(0,0,MyRoomPic.Picture);
 GamePanel is a TImage and MyRoomPic.Picture is a TBitmap.
 
 So, is the code wrong?

Is the OnPaint event of the GamePanel?


 How should I draw otherwise the TBitmap on the
 TImage?


Mattias

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


Re: [lazarus] freeze while resizing a window (GTK2 with rev 12674)

2007-11-01 Thread Albert Zeyer
Am Donnerstag, den 01.11.2007, 15:19 +0100 schrieb Mattias Gaertner:
 On Thu, 01 Nov 2007 15:51:59 +0200
 Albert Zeyer [EMAIL PROTECTED] wrote:
 

  I stepped through the code and I figured out that I get the message
  exactly at this point:
  GamePanel.Canvas.Draw(0,0,MyRoomPic.Picture);
  GamePanel is a TImage and MyRoomPic.Picture is a TBitmap.
  
  So, is the code wrong?
 
 Is the OnPaint event of the GamePanel?
 
No, it was the OnPaint event of the Form. I haven't set the OnPaint
event of the GamePanel before.

I have changed this now and it works!

Thank you. :)

(But of course that solves not the main bug I have reported: the freeze
while resizing the window.)


--
Albert

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


Re: [lazarus] svn r 12675 fails to compile

2007-11-01 Thread Vincent Snijders

Mattias Gaertner schreef:

Yes, now (r 12678) it compiles and doesn't complain


So, it works now under 2.0.4, 2.3.1 and 2.2.1, but not under 2.2.0?
Can someone with 2.2.0 confirm?


R12678 compiles on windows with fpc 2.2.0.

Vincent

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


Re: [lazarus] svn r 12675 fails to compile

2007-11-01 Thread Giuliano Colla

Mattias Gaertner ha scritto:

On Thu, 01 Nov 2007 14:56:41 +0100
Giuliano Colla [EMAIL PROTECTED] wrote:

  

Mattias Gaertner ha scritto:


On Thu, 01 Nov 2007 13:29:21 +0100
Giuliano Colla [EMAIL PROTECTED] wrote:

  
  
I added a qword overload. Maybe this will run compile under all fpc

versions.

  
  

Yes, now (r 12678) it compiles and doesn't complain



So, it works now under 2.0.4, 2.3.1 and 2.2.1, but not under 2.2.0?
Can someone with 2.2.0 confirm?

  

r 12768 under Windows XP, with fpc 2.2.0, it compiles.

Next step would be to see if besides compiling, it works also ;-)


Giuliano

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


Re: [lazarus] freeze while resizing a window (GTK2 with rev 12674)

2007-11-01 Thread Mattias Gaertner
On Thu, 01 Nov 2007 16:27:04 +0200
Albert Zeyer [EMAIL PROTECTED] wrote:

 Am Donnerstag, den 01.11.2007, 15:19 +0100 schrieb Mattias Gaertner:
  On Thu, 01 Nov 2007 15:51:59 +0200
  Albert Zeyer [EMAIL PROTECTED] wrote:
  
 
   I stepped through the code and I figured out that I get the
   message exactly at this point:
 GamePanel.Canvas.Draw(0,0,MyRoomPic.Picture);
   GamePanel is a TImage and MyRoomPic.Picture is a TBitmap.
   
   So, is the code wrong?
  
  Is the OnPaint event of the GamePanel?
  
 No, it was the OnPaint event of the Form. I haven't set the OnPaint
 event of the GamePanel before.

Ah. GamePanel.Canvas draws in its OnPaint event to the 'screen'
otherwise it changes the TImage.Picture.

 
 I have changed this now and it works!
 
 Thank you. :)
 
 (But of course that solves not the main bug I have reported: the
 freeze while resizing the window.)

Just a guess: Maybe it is an endless loop between gtk and LCL about too
small widget sizes. I added minimum constraints of 1x1. Can you update
lazarus svn and check if this fixes the problem?

Mattias

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


RE: [lazarus] Emulate keyboard input like Windows Screen Keyboard

2007-11-01 Thread 12 12
* Sergio Samayoa [EMAIL PROTECTED] [Thu, 1 Nov 2007 08:14:12 
-0600]:

Do you have access to Form1 instance?

Ex:

Unit unit2;
...

Type
  Form2 = class(TForm)
  ...
  End;

Implementation
Uses unit1;
...

Procedure ...
Begin
  ...
  Form1.Edit1.SelText := SomeVariable;
  ...
End;



Yes, i have access to Form1 instance.
But i want to write universal Screen keyboard unit for use with 
touch-panel monitor.
This unit  should be possible to enter digits and letters not only to 
Form1.Edit,

but also to Form1.Memo1 in certain cursor position.

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


Re: [lazarus] svn r 12675 fails to compile

2007-11-01 Thread Antonio Sanguigni

 r 12768 under Windows XP, with fpc 2.2.0, it compiles.

 Next step would be to see if besides compiling, it works also ;-)


r 12769 - Linux - fpc 2.2.0 it compiles but ... now I cannot see anything
when I run Lazarus. All the forms seems empty, no icons on main window, no
row on OI, F9 key works tough and an empty application form can run.

Thanks
Antonio

-- 
Antonio Sanguigni alias slapshot
--
GioveLUG (Linux User Group) - http://www.giovelug.org
Edupup (Educational distro) - http://www.edupup.org


RE: [lazarus] Emulate keyboard input like Windows Screen Keyboard

2007-11-01 Thread Sergio Samayoa
Then is very easy:

Control := Screen.ActiveControl;
if (Control is TCustomEdit) then
   TCustomEdit(Control).SelText := SomeVariable;


-Mensaje original-
De: 12 12 [mailto:[EMAIL PROTECTED] 
Enviado el: Jueves, 01 de Noviembre de 2007 08:43 a.m.
Para: lazarus@miraclec.com
Asunto: RE: [lazarus] Emulate keyboard input like Windows Screen Keyboard

* Sergio Samayoa [EMAIL PROTECTED] [Thu, 1 Nov 2007 08:14:12 
-0600]:
 Do you have access to Form1 instance?

 Ex:

 Unit unit2;
 ...

 Type
   Form2 = class(TForm)
   ...
   End;

 Implementation
 Uses unit1;
 ...

 Procedure ...
 Begin
   ...
   Form1.Edit1.SelText := SomeVariable;
   ...
 End;


Yes, i have access to Form1 instance.
But i want to write universal Screen keyboard unit for use with 
touch-panel monitor.
This unit  should be possible to enter digits and letters not only to 
Form1.Edit,
but also to Form1.Memo1 in certain cursor position.

_
 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] svn r 12675 fails to compile

2007-11-01 Thread Mattias Gaertner
On Thu, 1 Nov 2007 22:51:29 +0800
Antonio Sanguigni [EMAIL PROTECTED] wrote:

 
  r 12768 under Windows XP, with fpc 2.2.0, it compiles.
 
  Next step would be to see if besides compiling, it works
  also ;-)
 
 
 r 12769 - Linux - fpc 2.2.0 it compiles but ... now I cannot see
 anything when I run Lazarus. All the forms seems empty, no icons on
 main window, no row on OI, F9 key works tough and an empty
 application form can run.

Fixed in 12680.

Mattias

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


Re: [lazarus] Usability issues

2007-11-01 Thread Felipe Monteiro de Carvalho
On 10/28/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote:
 As I mentioned in another post. Maybe take a look at MSEide for ideas
 of such a dialog.

The mseide approach is too simple. Further it doesn't allow any number
of build modes, but is fixed at 4.

The mseide dialog works like this:

There is a control which looks similar to a grid, where you can write
on each line a compiler option, like for example -k-framework
carbon, and then set X on which build options it should be
activated.

Currently the lazarus compiler options dialog is very visual, and we
should allow for visually choosing the compiler options for each
mode I vaguely remember that the dialog from Visual Studio 6
allowed this ...

One possible idea is to have the compiler options dialog like we have
now, and that would be the default, and add a new tab to it, where
you can choose which build mode to edit from a combo box, and for each
one there would be a list of which aditional build options should be
used. One could select a build option first selection a category and
then the build option itself. Some build options could allow for text
to be input to complement them.

Any other ideas?

thanks,
-- 
Felipe Monteiro de Carvalho

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


Re: [lazarus] Using SDL.framework within Lazarus project on Mac OS X

2007-11-01 Thread Dominique Louis

Hi Philip,
  I've just been re-reading your message. So when using frameworks,
there is no need to specify a library name, because the linker resolves
this automagically?

just for clarification the SDL.framework is located @
/Library/Frameworks/SDL.framework.

While I notice that Carbon.framework is located @
/Developers/SDKs/MacOS10.4u.sdk/System/Library/Frameworks/Carbon.framework

I even tried adding /Library/Frameworks/ to -Fl in the Libraries field
on the Path tab in case that would help, but that did not work either. I
still get the Can't open : sdl ( No such file or directory,  errorno = 2).

So the compiler recognises that I'm passing a framework via the command
line, but it just can't find it. Is there something else I need to do to
use 3rd Party frameworks?

Dominique.

Hess, Philip J wrote:

Dominique,

Did you put the sdl.framework bundle (folder) somewhere that the linker
can find it? Typically this would be in the Library/Frameworks folder.

If the linker can find the framework it should be able to find any
externally declared functions in your program. You shouldn't need any
link directives in your source either.

Note how it's done in FPCMacOSAll.pas:

function sqrt(x: double_t): double_t; external name '_sqrt';

When you include -framework carbon the linker is able to find the
_sqrt function in the Carbon framework's library.

Thanks.

-Phil



-Original Message-
From: Dominique Louis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 30, 2007 7:53 AM

To: lazarus@miraclec.com
Subject: RE: [lazarus] Using SDL.framework within Lazaru project

Hi Philip,
   Thanks for pointing this out. On the Mac that option was being  
hidden due to the dialog size, so I could not see the area where I  
needed to put the framework. This is now entered, but I now get a  
Unable to find sdl error message when it tris to link to the  
framework. Is there something else I need to do? Also, if I have  
sdl.pas in the project file, it complains that it cant link to  
-lSDL-1.2.0 .


If it finds the framework, does it still need to link to it via -l?


Thanks,


Dominique.


Quoting Hess, Philip J [EMAIL PROTECTED]:


Dominique,

On the Compiler Options tab, check the Pass Options To The Linker

box

and enter this in text box:  -framework sdl

This will be passed to FPC as -k'-framework' -k'sdl', which then

passes

the switches on to the linker.

Thanks.

-Phil


-Original Message-
From: Dominique Louis [mailto:[EMAIL PROTECTED]
Sent: Monday, October 29, 2007 9:38 AM
To: lazarus@miraclec.com
Subject: [lazarus] Using SDL.framework within Lazaru project

Hi all,
   What is the correct way to use an *.framework within a Lazarus
project?

I can get SDL.framework working with XCode, but don't know where put
the -kSDL line to get it to pull in the framework.

Thanks,


Dominique.




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


Re: [lazarus] freeze while resizing a window (GTK2 with rev 12674)

2007-11-01 Thread Paul Ishenin

Albert Zeyer пишет:

Am Donnerstag, den 01.11.2007, 15:35 +0100 schrieb Mattias Gaertner:

  

Just a guess: Maybe it is an endless loop between gtk and LCL about too
small widget sizes. I added minimum constraints of 1x1. Can you update
lazarus svn and check if this fixes the problem?



I have updated the svn (to rev 12679) but it seems that something is
completly broken now.

See the screenshot:
http://img217.imageshack.us/my.php?image=lazarusfr4.png
  
Try to update from svn once again :) Svn version of lazarus gives no 
promices of correct work.


Best regards,
Paul Ishenin.

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


Re: [lazarus] Lazarus/FPC and SDL on W32 and Linux

2007-11-01 Thread Dominique Louis

Hi,
  The most up to date sdl headers can be found @
http://jedi-sdl.pascalgamedevelopment.com

sdl4fp has not been maintained for a very long time.

The JEDI-SDL headers have been tested and known to work on Win32, Linux,
 Mac OS X, Game Boy advance, Nintendo DS and even the GP2X console
using both Delphi and FreePascal where they are supported.

Have a look at http://www.crashblock.com for a game that uses JEDI-SDL
to work on Win32, Linux and Mac OS X.

IHTH,

Dominique.

A.J. Venter wrote:

on 10/31/07, David Pethes [EMAIL PROTECTED] wrote:

Hi,

bembulak wrote:

Is there some kind of userbase/community on game-programming and
lazarus/FPC?

Check out http://www.pascalgamedevelopment.com/ , especially the forum
section. You can use the jedi-sdl pascal headers for cross-platform
SDL+FPC development.
Best regards,

There is also the sdl4fp headers http://sdl4fp.sourceforge.net/ which
are h2pas conversions, though I think they may be outdated now.
If you would prefer native lazarus components then gamepack may suit
you. Somebody also had a post here earlier this week about an SDL
framework from XCode - I don't know if that is mac specific or general
though - perhaps somebody could provide a link ?

A.J.



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


[lazarus] Announcement: Poll about required windows version for Lazarus

2007-11-01 Thread Vincent Snijders
Read about it at 
http://lazarus-dev.blogspot.com/2007/10/new-poll-on-lazarus-site-about-windows.html


Cast your votes at 
http://www.lazarus.freepascal.org/modules.php?op=modloadname=NS-Pollsfile=indexpollID=11


Vincent

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


Re: [lazarus] Usability issues

2007-11-01 Thread Mattias Gaertner
On Thu, 1 Nov 2007 16:11:26 +0100
Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote:

 On 10/28/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote:
  As I mentioned in another post. Maybe take a look at MSEide for
  ideas of such a dialog.
 
 The mseide approach is too simple. Further it doesn't allow any number
 of build modes, but is fixed at 4.
 
 The mseide dialog works like this:
 
 There is a control which looks similar to a grid, where you can write
 on each line a compiler option, like for example -k-framework
 carbon, and then set X on which build options it should be
 activated.
 
 Currently the lazarus compiler options dialog is very visual, and we
 should allow for visually choosing the compiler options for each
 mode I vaguely remember that the dialog from Visual Studio 6
 allowed this ...
 
 One possible idea is to have the compiler options dialog like we have
 now, and that would be the default, and add a new tab to it, where
 you can choose which build mode to edit from a combo box, and for each
 one there would be a list of which aditional build options should be
 used. One could select a build option first selection a category and
 then the build option itself. Some build options could allow for text
 to be input to complement them.

I also think, that most options will be the same for all
platforms/targets. Most of the time you need only some special linker
options, some custom flags (-d) and for the release some debug flags
disabled. Don't look at the C IDEs about options. C needs much more
options.
An additional page with the differences should be enough.

Mattias

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


[lazarus] recent update breaks alignment in tabsheets

2007-11-01 Thread Seth Grover
This bug just showed up after I grabbed today's updates from SVN. I thought
I'd see if anyone else can confirm this before I log it in mantis:

I'm at lazarus revision 12681 using fpc 2.2.0 in ubuntu linux using gtk 1.

To reproduce the problem:

Create a new form.
Create a tpagecontrol
Set its alignment to alBottom
Add a TTabSheet to it
Add a tpanel in the tab sheet
Set the panel's alignment to alLeft

What happens for me is the panel extends down way past the bottom of the tab
sheet. See attached picture. The panel should end at the bottom of the tab
sheet, shouldn't it?

-SG

-- 
Seth Grover
sethdgrover[at]gmail[dot]com
http://grovers.us/seth
attachment: form1.png

RE: [lazarus] Using SDL.framework within Lazarus project on Mac OS X

2007-11-01 Thread Hess, Philip J
Dominique,

I don't believe that's the Carbon framework that your apps are using.

Use otool -L against any app compiled against the Carbon framework to
see the framework's location.

Try compiling with the -Cn switch, then look at the link.res text file
generated. This contains the actual switches that are being passed to
the linker.

Thanks.

-Phil


-Original Message-
From: Dominique Louis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 11:29 AM
To: lazarus@miraclec.com
Subject: Re: [lazarus] Using SDL.framework within Lazarus project on Mac
OS X

Hi Philip,
   I've just been re-reading your message. So when using frameworks,
there is no need to specify a library name, because the linker resolves
this automagically?

just for clarification the SDL.framework is located @
/Library/Frameworks/SDL.framework.

While I notice that Carbon.framework is located @
/Developers/SDKs/MacOS10.4u.sdk/System/Library/Frameworks/Carbon.framewo
rk

I even tried adding /Library/Frameworks/ to -Fl in the Libraries field
on the Path tab in case that would help, but that did not work either. I
still get the Can't open : sdl ( No such file or directory,  errorno =
2).

So the compiler recognises that I'm passing a framework via the command
line, but it just can't find it. Is there something else I need to do to
use 3rd Party frameworks?

Dominique.

Hess, Philip J wrote:
 Dominique,
 
 Did you put the sdl.framework bundle (folder) somewhere that the
linker
 can find it? Typically this would be in the Library/Frameworks folder.
 
 If the linker can find the framework it should be able to find any
 externally declared functions in your program. You shouldn't need any
 link directives in your source either.
 
 Note how it's done in FPCMacOSAll.pas:
 
 function sqrt(x: double_t): double_t; external name '_sqrt';
 
 When you include -framework carbon the linker is able to find the
 _sqrt function in the Carbon framework's library.
 
 Thanks.
 
 -Phil
 
 
 
 -Original Message-
 From: Dominique Louis [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 30, 2007 7:53 AM
 To: lazarus@miraclec.com
 Subject: RE: [lazarus] Using SDL.framework within Lazaru project
 
 Hi Philip,
Thanks for pointing this out. On the Mac that option was being  
 hidden due to the dialog size, so I could not see the area where I  
 needed to put the framework. This is now entered, but I now get a  
 Unable to find sdl error message when it tris to link to the  
 framework. Is there something else I need to do? Also, if I have  
 sdl.pas in the project file, it complains that it cant link to  
 -lSDL-1.2.0 .
 
 If it finds the framework, does it still need to link to it via -l?
 
 
 Thanks,
 
 
 Dominique.
 
 
 Quoting Hess, Philip J [EMAIL PROTECTED]:
 
 Dominique,

 On the Compiler Options tab, check the Pass Options To The Linker
 box
 and enter this in text box:  -framework sdl

 This will be passed to FPC as -k'-framework' -k'sdl', which then
 passes
 the switches on to the linker.

 Thanks.

 -Phil


 -Original Message-
 From: Dominique Louis [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 29, 2007 9:38 AM
 To: lazarus@miraclec.com
 Subject: [lazarus] Using SDL.framework within Lazaru project

 Hi all,
What is the correct way to use an *.framework within a Lazarus
 project?

 I can get SDL.framework working with XCode, but don't know where put
 the -kSDL line to get it to pull in the framework.

 Thanks,


 Dominique.



_
 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] Emulate keyboard input like Windows Screen Keyboard

2007-11-01 Thread 12 12
* Sergio Samayoa [EMAIL PROTECTED] [Thu, 1 Nov 2007 08:52:21 
-0600]:

Then is very easy:

Control := Screen.ActiveControl;
if (Control is TCustomEdit) then
   TCustomEdit(Control).SelText := SomeVariable;



What about adding or deleting a symbol at current cursor position?
I think parsing of text value is not good idea.
I beleive if some control can receive and process keypress events
it should be possible to emulate it from another control.


--
12 12 aka skywriter

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


Re: [lazarus] Hiding ancentors member during inheritance

2007-11-01 Thread 12 12
* Fl#225;vio Etrusco [EMAIL PROTECTED] [Thu, 1 Nov 2007 
13:16:31 -0200]:

On 11/1/07, Marc Weustink [EMAIL PROTECTED] wrote:

 12 12 wrote:
  Suppose i've got class
  TA = class
  public
   itsMember1 : longint;
  end;
 
  I want class TB = class(TA); but itsMember1 should be private.
  Is it possible?

 No. Doesn't make much sense, since casting TA(B) would give access
anyway

 Marc



Convincingly.



--
12 12 aka skywriter

r.ru/

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


Re: [lazarus] Usability issues

2007-11-01 Thread Micha Nelissen
Felipe Monteiro de Carvalho wrote:
 If the compiler options dialog is to be redesigned I think it would be
 an oportunity to get customized build modes, like: Release, Debug,
 AnythingElse

This is indeed a good idea, but it would be even better to have
something so that we can even have two install versions of packages,
release and debug compiled objects.

If then, the application is compiled in Release mode, automatically, the
release version of e.g. the LCL/RTL/FCL would be used, which were
compiled with -O2 for instance, while the debug version was compiled
with '-O- -g' or similar.

For the RTL/VCL Delphi has a Use debug DCUs option, which is a
solution in this direction, but isn't as flexible; and doesn't work for
third-party packages AFAIK.

Micha

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


[lazarus] I need examples of SQLite

2007-11-01 Thread Daniel Rincón García
Can anybody send me examples of SQLite working under Lazarus?

Thanks.


Re: [lazarus] Usability issues

2007-11-01 Thread Mattias Gaertner
On Thu, 01 Nov 2007 18:19:05 +0100
Micha Nelissen [EMAIL PROTECTED] wrote:

 Felipe Monteiro de Carvalho wrote:
  If the compiler options dialog is to be redesigned I think it would
  be an oportunity to get customized build modes, like: Release,
  Debug, AnythingElse
 
 This is indeed a good idea, but it would be even better to have
 something so that we can even have two install versions of packages,
 release and debug compiled objects.
 
 If then, the application is compiled in Release mode, automatically,
 the release version of e.g. the LCL/RTL/FCL would be used, which
 were compiled with -O2 for instance, while the debug version was
 compiled with '-O- -g' or similar.
 
 For the RTL/VCL Delphi has a Use debug DCUs option, which is a
 solution in this direction, but isn't as flexible; and doesn't work
 for third-party packages AFAIK.

Does this mean, we have to ship two kinds of ppu in the binary packages?

Mattias

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


Re: [lazarus] Announcement: Poll about required windows version for Lazarus

2007-11-01 Thread Mark Morgan Lloyd

Vincent Snijders wrote:

Cast your votes at 
http://www.lazarus.freepascal.org/modules.php?op=modloadname=NS-Pollsfile=indexpollID=11 


Something's changed: it used to work (e.g. for the gtk poll) but now nothing 
shows that's clickable.


Mozilla/5.0 (X11; U; Linux sparc64; en-US; rv:1.8.0.13pre) Gecko/20070505 
Iceape/1.0.9 (Debian-1.0.10~pre070720-0etch3)


For what it's worth I've got multiple copies of NT4 here, much of my interest 
in Lazarus is as a way of enabling me to move to Linux etc.


Wonder whether it would be worth having a box for ReactOS? It's too immature 
to actually be useful for anything, but it's worth watching.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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


Re: [lazarus] Announcement: Poll about required windows version for Lazarus

2007-11-01 Thread David B Copeland
I also went to vote but none was clickable. Running Firefox 2.0.0.8 on
SUSE 10.2 x86_64.

On Thu, 2007-11-01 at 18:45 +, Mark Morgan Lloyd wrote:
 Vincent Snijders wrote:
 
  Cast your votes at 
  http://www.lazarus.freepascal.org/modules.php?op=modloadname=NS-Pollsfile=indexpollID=11
   
 
 Something's changed: it used to work (e.g. for the gtk poll) but now nothing 
 shows that's clickable.
 
 Mozilla/5.0 (X11; U; Linux sparc64; en-US; rv:1.8.0.13pre) Gecko/20070505 
 Iceape/1.0.9 (Debian-1.0.10~pre070720-0etch3)
 



-- 
This mail was scanned by BitDefender
For more informations please visit http://www.bitdefender.com

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


Re: [lazarus] Announcement: Poll about required windows version for Lazarus

2007-11-01 Thread Graeme Geldenhuys
On 01/11/2007, Gus Wirth [EMAIL PROTECTED] wrote:

 You have to be logged in first before it will work.


What the hell is the parental consent and 13 age restriction for
It makes me feel like I'm entering a porn site or something!



Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] Usability issues

2007-11-01 Thread Micha Nelissen
Mattias Gaertner wrote:
 On Thu, 01 Nov 2007 18:19:05 +0100
 Micha Nelissen [EMAIL PROTECTED] wrote:
 
 If then, the application is compiled in Release mode, automatically,
 the release version of e.g. the LCL/RTL/FCL would be used, which
 were compiled with -O2 for instance, while the debug version was
 compiled with '-O- -g' or similar.
 
 Does this mean, we have to ship two kinds of ppu in the binary packages?

Well, have to, depends on how it's organized and what we want; but if
we want users to build debug and release applications out of the box,
then we need to ship both indeed.

Micha

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


[lazarus] For Standardize dialogs components

2007-11-01 Thread wile64
Hi,

The icons dialogs is not good see ;-)

Regards,

-- 
Laurent.

French Forum : http://lazforum-fr.tuxfamily.org/index.php
attachment: tfinddialog.xpmattachment: tprinterdialog.xpmattachment: tprintersetupdialog.xpmattachment: treplacedialog.xpmattachment: tselectdirectorydialog.xpm

Re: [lazarus] Emulate keyboard input like Windows Screen Keyboard

2007-11-01 Thread Marc Santhoff
Am Donnerstag, den 01.11.2007, 17:03 +0300 schrieb 12 12:
 Is there any cross-platform way to implement subj?
 Suppose I need from Form2 to add some letter into TEdit which placed on 
 Form1.
 Except of WinAPI's SendInput.

At least for all X Windows platforms you can use the Xtst extension to
the X server. That one allows to send keyboard events from your
application.

Making a Form showing key buttons should be straightforward, the only
thing a little hairy is getting the encoding right. But with that I
could help. I have done something similar using the technique from one
of xautomation's tools (translated to pascal).

HTH,
Marc


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


Re: [lazarus] freeze while resizing a window (GTK2 with rev 12674)

2007-11-01 Thread Albert Zeyer
Am Donnerstag, den 01.11.2007, 22:34 +0700 schrieb Paul Ishenin:
 Albert Zeyer пишет:
  Am Donnerstag, den 01.11.2007, 15:35 +0100 schrieb Mattias Gaertner:
 

  Just a guess: Maybe it is an endless loop between gtk and LCL about too
  small widget sizes. I added minimum constraints of 1x1. Can you update
  lazarus svn and check if this fixes the problem?
  
 
  I have updated the svn (to rev 12679) but it seems that something is
  completly broken now.
 
  See the screenshot:
  http://img217.imageshack.us/my.php?image=lazarusfr4.png

 Try to update from svn once again :) Svn version of lazarus gives no 
 promices of correct work.

Ah, it works realy great now (with rev 12682)!

Also another bug is gone now (where the location of some aligned
controles were wrong).

Many thanks.

--
Albert

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


[lazarus] TScrollBox

2007-11-01 Thread Bogusław Brandys

Under Win32 scrolling TScrollBox is not possible now when AutoScroll := true
Scrollbox area jumps a little and then all window freeze (the only way 
is to wait or switch focus to another application and back to unfreeze)

TScrollBox.Range is calculated on each click on scrollbar !

Attached is my proposition of fix.Please analyze it.
There are still two problems which remain after applying this patch :



1.When controls placed on TScrollBox and aligned  , they are scrolled 
down instead of up (I feel that it was caused by changes done 2007-11-01)


2. When TScrollBox is scrolled a little and then parent window is 
resized - controls placed on scrollbox are moved (usually a little but 
sometimes more) - I feel that it worked once I tested but still today 
was so many changes in that area :-(



In other cases it works like a charm , for example check lazreport 
designer :-)


Regards
Bogusław Brandys
Index: lcl/forms.pp
===
--- lcl/forms.pp(revision 12682)
+++ lcl/forms.pp(working copy)
@@ -89,8 +89,6 @@
 FRange: Integer;
 FSmooth : Boolean;
 FVisible: Boolean;
-FOldScrollInfo: TScrollInfo;
-FOldScrollInfoValid: Boolean;
   protected
 FControl: TWinControl;
 function ControlAutoScroll: boolean; virtual;
@@ -116,7 +114,6 @@
 procedure SetSmooth(const Value: Boolean); virtual;
 procedure SetVisible(const Value: Boolean); virtual;
 procedure UpdateScrollBar; virtual;
-procedure InvalidateScollInfo;
   {$ifdef VerboseScrollingWinControl}
 function DebugCondition: Boolean;
   {$endif}
@@ -1821,3 +1818,6 @@
 
 
 
+
+
+
Index: lcl/include/controlscrollbar.inc
===
--- lcl/include/controlscrollbar.inc(revision 12682)
+++ lcl/include/controlscrollbar.inc(working copy)
@@ -68,13 +68,10 @@
   // scroll content of FControl
   OldPosition := FPosition;
   FPosition := Value;
-  if FControl is TScrollingWinControl then
-TScrollingWinControl(FControl).ScrollbarHandler(Kind, OldPosition);
 
   // check that the new position is also set on the scrollbar
   if HandleAllocated and (GetScrollPos(ControlHandle, IntfBarKind[Kind])  
FPosition) then
   begin
-InvalidateScollInfo;
 {$IFDEF VerboseScrollingWinControl}
 if DebugCondition then
   DebugLn(['TControlScrollBar.SetPosition FPosition=',FPosition]);
@@ -82,6 +79,13 @@
 // send position to interface and store it back to FPosition (this way LCL 
will have actual position value)
 FPosition := SetScrollPos(ControlHandle, IntfBarKind[Kind], FPosition, 
Visible);
   end;
+  
+  if OldPosition = FPosition then Exit;
+
+
+  if (FControl is TScrollingWinControl)  then
+TScrollingWinControl(FControl).ScrollbarHandler(Kind, OldPosition);
+  
 end;
 
 function TControlScrollBar.SmoothIsStored: boolean;
@@ -102,7 +106,6 @@
   begin
 ScrollInfo.fMask := SIF_PAGE;
 GetScrollInfo(ControlHandle, IntfBarKind[Kind], ScrollInfo);
-InvalidateScollInfo;
 FPage := ScrollInfo.nPage;
   end;
   Result := FPage;
@@ -116,7 +119,6 @@
   begin
 ScrollInfo.fMask := SIF_POS;
 GetScrollInfo(ControlHandle, IntfBarKind[Kind], ScrollInfo);
-InvalidateScollInfo;
 FPosition := ScrollInfo.nPos;
   end;
   Result := FPosition;
@@ -130,7 +132,6 @@
   begin
 ScrollInfo.fMask := SIF_Range + SIF_Page;
 GetScrollInfo(ControlHandle, IntfBarKind[Kind], ScrollInfo);
-InvalidateScollInfo;
 FRange := ScrollInfo.nMax - ScrollInfo.nMin - integer(ScrollInfo.nPage);
   end;
   Result := FRange;
@@ -144,10 +145,7 @@
 function TControlScrollBar.GetVisible: Boolean;
 begin
   if HandleAllocated and (not (FControl is TScrollingWinControl)) then
-  begin
-InvalidateScollInfo;
 FVisible := GetScrollbarVisible(Controlhandle, IntfBarKind[Kind]);
-  end;
   Result := FVisible;
 end;
 
@@ -178,10 +176,8 @@
   else
 KindID := SM_CXVSCROLL;
   if HandleAllocated then
-  begin
-Result := LCLIntf.GetScrollBarSize(ControlHandle,KindID);
-InvalidateScollInfo;
-  end else
+Result := LCLIntf.GetScrollBarSize(ControlHandle,KindID)
+  else
 Result := GetSystemMetrics(KindID);
 end;
 
@@ -295,12 +291,8 @@
 ScrollInfo.nPos := FPosition;
 ScrollInfo.nPage := FPage;
 ScrollInfo.nTrackPos := FPosition;
-if (not FOldScrollInfoValid) or (not 
CompareMem(@ScrollInfo,@FOldScrollInfo,SizeOf(TScrollInfo))) then
-begin
-  FOldScrollInfo:=ScrollInfo;
-  FOldScrollInfoValid := true;
-  SetScrollInfo(FControl.Handle, IntfBarKind[Kind], ScrollInfo, FVisible);
-end;
+SetScrollInfo(FControl.Handle, IntfBarKind[Kind], ScrollInfo, FVisible);
+
 {$IFDEF VerboseScrollingWinControl}
 if DebugCondition then
   DebugLn(['TControlScrollBar.UpdateScrollBar ',DbgSName(FControl),' 
',DbgSName(Self),' FVisible=',FVisible,' Range=',FRange,' 
FPosition=',FPosition,' FPage=',FPage,' FAutoRange=',FAutoRange]);
@@ -318,10 

Re: [lazarus] TScrollBox

2007-11-01 Thread Mattias Gaertner
On Thu, 01 Nov 2007 22:39:29 +0100
Bogusław Brandys [EMAIL PROTECTED] wrote:

 Under Win32 scrolling TScrollBox is not possible now when
 AutoScroll := true Scrollbox area jumps a little and then all window
 freeze (the only way is to wait or switch focus to another
 application and back to unfreeze) TScrollBox.Range is calculated on
 each click on scrollbar !
 
 Attached is my proposition of fix.Please analyze it.
 There are still two problems which remain after applying this patch :
 
 
 
 1.When controls placed on TScrollBox and aligned  , they are scrolled 
 down instead of up (I feel that it was caused by changes done
 2007-11-01)

The scrolling under win32 worked always differently than under gtk.
It is planned to reimplement the scrolling under win32.


 2. When TScrollBox is scrolled a little and then parent window is 
 resized - controls placed on scrollbox are moved (usually a little
 but sometimes more) - I feel that it worked once I tested but still
 today was so many changes in that area :-(

There were two changes in this area. The auto size code now uses the
logical client area instead of the visual.

And there were some fixes, so some workarounds do no longer work.

 
 In other cases it works like a charm , for example check lazreport 
 designer :-)


Mattias

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


Re: [lazarus] I need examples of SQLite

2007-11-01 Thread Javier Soques

--- Daniel Rincón García [EMAIL PROTECTED] wrote:

 Can anybody send me examples of SQLite working under Lazarus?
 
 Thanks.
 

http://lazarus-ccr.sourceforge.net/index.php?wiki=LazarusDatabase#Lazarus_and_SQLite



 



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [lazarus] Emulate keyboard input like Windows Screen Keyboard

2007-11-01 Thread 12 12
* Marc Santhoff [EMAIL PROTECTED] [Thu, 01 Nov 2007 22:19:44 
+0100]:

Am Donnerstag, den 01.11.2007, 17:03 +0300 schrieb 12 12:
 Is there any cross-platform way to implement subj?
 Suppose I need from Form2 to add some letter into TEdit which placed
on
 Form1.
 Except of WinAPI's SendInput.

At least for all X Windows platforms you can use the Xtst extension to
the X server. That one allows to send keyboard events from your
application.

Making a Form showing key buttons should be straightforward, the only
thing a little hairy is getting the encoding right. But with that I
could help. I have done something similar using the technique from one
of xautomation's tools (translated to pascal).


Isn't really impossible to use LCL-only tools?
I don't need to send key events to another application,
only to another form or control of the same app!


--
12 12 aka skywriter

--
Фотопечать с бесплатной доставкой по всей России. 
http://kodak.rambler.ru/


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