Re: [Lazarus] Mac OS X : Drag and Drop no longer works with TDragObject....

2008-09-11 Thread Dominique Louis
Thanks for the quick response Paul, greatly appreciated, and I think the 
change to make it more Delphi compatible is the right way to go.

Regards,

Dominique.

Paul Ishenin wrote:
 Dominique Louis wrote:
 I notice that in the OnDragOver event Source no longer contains a 
 TDragObject, but instead contains the actual TObject instance being dragged.

 1. When was this changed and why?
   
 during 0.9.25 becuase of bug report and because it is now delphi compatible
 2. Will this now remain the way it is for the forseeable future or is it 
 likely to change back to TDragObject?
   
 it will stay so if we want delphi compatibility
 The reason why I ask is that, drag and drop code that was working fine 6 
 months ago, no longer works, so I'm just trying to get an idea of how 
 much this code is likely to change in the next 2 months.
   
 To be sure what you get you can check:
 if Source is TDragObject
 then ..
 else ...
 
 Best regards,
 Paul Ishenin.


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


Re: [Lazarus] TToolButton hints

2008-09-11 Thread Graeme Geldenhuys
On Wed, Sep 10, 2008 at 11:39 PM, Felipe Monteiro de Carvalho
[EMAIL PROTECTED] wrote:
 Most problems are specific to a widgetset, so it's always
 indispensable to say what operating system, widgetset, free pascal
 version and lazarus version you are using.


And an easy why to get that information

Help | About Lazarus  then right click anywhere in the window and
select copy version information to clipboard

It will include the version number of Lazarus, revision number and
widgetset.  I guess we could extend it to include the FPC version as
well, or a separate popup menu item to copy the FPC version details.


Regards,
 - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Dear developers, we need your help before releasing 0.9.26

2008-09-11 Thread Luca Olivetti
En/na Luca Olivetti ha escrit:

 Another gripe I have with svn, is that if I do an svn diff right after 
 an update, all Makefile and Makefile.fpc, as well as many po files, are 
 different, so I have to delete them and svn update again.
 
 And the last one is the lrs files: since they should be generated by the 
 lfm, why oh why are they under svn? (well, I know, because lazarus 
 doesn't generate them automatically, but I think it should)

No comments on these 2 issues?

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Dear developers, we need your help before releasing 0.9.26

2008-09-11 Thread Vincent Snijders
Luca Olivetti schreef:
 En/na Luca Olivetti ha escrit:
 And the last one is the lrs files: since they should be generated by the 
 lfm, why oh why are they under svn? (well, I know, because lazarus 
 doesn't generate them automatically, but I think it should)
 
 No comments on these 2 issues?

How can make generate them?

Vincent
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Dear developers, we need your help before releasing 0.9.26

2008-09-11 Thread Graeme Geldenhuys
On 9/11/08, Luca Olivetti [EMAIL PROTECTED] wrote:
   Another gripe I have with svn, is that if I do an svn diff right after
   an update, all Makefile and Makefile.fpc, as well as many po files, are
   different, so I have to delete them and svn update again.


a simple:   svn revert -R
should fix the issue.  I don't really get that issue, but sometimes do
with translation files (*.po), but I think they are auto generated in
some make clean/build process, so I don't worry to much about it.


Note:
That will revert all local changes to *your* latest svn revision.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Dear developers, we need your help before releasing 0.9.26

2008-09-11 Thread Mattias Gärtner
Zitat von Luca Olivetti [EMAIL PROTECTED]:

 En/na Luca Olivetti ha escrit:

  Another gripe I have with svn, is that if I do an svn diff right after
  an update, all Makefile and Makefile.fpc,

Bug.
Please create the diff and add it to the bug report. Don't forget lazarus
revision number and fpc version.


  as well as many po files, are
  different, so I have to delete them and svn update again.

a) You found a bug in the po update tool
b) The po file update uses two different tools which create the same data, but
not the same syntax/order. To fix this once and for all, only one tool should
be used. This is on my todo list for 0.9.28.


  And the last one is the lrs files: since they should be generated by the
  lfm, why oh why are they under svn? (well, I know, because lazarus
  doesn't generate them automatically, but I think it should)

Not all lrs files are auto generated. Only those lrs which units are registered
in the project/package. And at the moment the lrs files are created in the same
directory as the lfm file. But these files are in source directory and therefore
sometimes read only. It is on my todo list to create the lrs files in the output
directory.
And with fpc 2.3.1 it is possible to use lfm directly, so no need for lrs files.
But this is experimental.

Mattias

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


Re: [Lazarus] Dear developers, we need your help before releasing 0.9.26

2008-09-11 Thread Luca Olivetti
En/na Vincent Snijders ha escrit:
 Luca Olivetti schreef:
 En/na Luca Olivetti ha escrit:
 And the last one is the lrs files: since they should be generated by the 
 lfm, why oh why are they under svn? (well, I know, because lazarus 
 doesn't generate them automatically, but I think it should)
 No comments on these 2 issues?
 
 How can make generate them?

I don't know, I'm not familiar enough with make, maybe it could be 
possible to first building an lfm to lrs converter, then using it to 
generate lrs files.
Anyway, I don't like the idea of having files in a SCM that are directly 
generated by other files (and, btw, could get out of sync).
It appears that the same is happening with (at least some) of the 
Makefiles (they differ from the svn once you try and build the ide with 
your full set of components, using, e.g., lazbuild), i.e. they are 
somewhat regenerated during the build process.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TToolButton hints

2008-09-11 Thread Žilvinas Ledas
 Please create a bug report and provide a complete example and lazarus
 revision number you are using.

Sorry, I forgot to write those details. I'm only using Lazarus for ~2months so 
I sometimes forget, that a lot of code is platform specific and hense bugs are 
;)
I made a bug report ( http://bugs.freepascal.org/view.php?id=12123 ).

And one more question - what are conditions to be listed in projects uzing 
lazarus page? ;)


Luck,
Žilvinas___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Dear developers, we need your help before releasing 0.9.26

2008-09-11 Thread Luca Olivetti
En/na Graeme Geldenhuys ha escrit:
 On 9/11/08, Luca Olivetti [EMAIL PROTECTED] wrote:
   Another gripe I have with svn, is that if I do an svn diff right after
   an update, all Makefile and Makefile.fpc, as well as many po files, are
   different, so I have to delete them and svn update again.
 
 
 a simple:   svn revert -R
 should fix the issue.  I don't really get that issue, but sometimes do

Yes, I just found that it only happens if I rebuild lazarus from inside 
the ide.

Bye

-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Felipe Monteiro de Carvalho
Hello,

What happens if you execute the application without the debugger? Just
build the binary, copy the binary to the device and run it. Does it
still crash?

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Felipe Monteiro de Carvalho
Are you using the emulator or a real device? Which WinCE version?

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Dear developers, we need your help before releasing 0.9.26

2008-09-11 Thread Luca Olivetti
En/na Luca Olivetti ha escrit:

 It appears that the same is happening with (at least some) of the 
 Makefiles (they differ from the svn once you try and build the ide with 
 your full set of components, using, e.g., lazbuild)

Correction: it only happens if you rebuild lazarus from inside the ide.

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus IDE fonts or LCL GUI hint?

2008-09-11 Thread Mattias Gärtner
Zitat von mitya boyarintsev [EMAIL PROTECTED]:

 Hello, Developers!

 Has anyone of you, tried to use PathEditor under Carbon Lazarus IDE?
 (Project-Compiler Options-Paths and then open path list dialog by pressing
 '...' button)

 You'll probably see normal text, but if you try to edit it, everything will
 be messed up, and pretty unusable. This is actually a 'normal' behavior for
 SynEdit, because selected font by default ('courier'?) does not seem to be
 mono-width.

The default font for synedit under carbon is 'Courier'.
It is mono width here.
The problem is that TFont stores the font name in the lfm and that is often the
windows default 'courier'. And because OS X fonts are case sensitive, 'courier'
does not exist and then the carbon intf uses rubbish. Maybe a bug.



 I've fixed this problem (for the PathEditor only) by setting 'Monaco' font
 if currently selected LCL is Carbon

 {$ifdef LCLCarbon}PathEdit.Font.Name:='Monaco';{$endif}

I fixed a few places. See r16542.


 Monaco is system default mono-width font for MacOS X. But i really don't
 like this hack.

I will try later Monaco. If it is more readable than Courier, then it becomes
the default under carbon synedit.


 The thing I suggest is to add to lazarus IDE font selection, so font of the
 dialogs and text-edit fields can be selected. I guess it would take a lot of
 job to do. Because every time font is changed, controls have to be notified
 about that... or some code should walkthrough all opened control and see if
 font must be changed.

Why is that needed?


 Or is it possible to supply a kind of GUIHint unit, that would containt
 information on what font's (colors, images, control sizes etc..) should be
 used with current widgetset. So setting a font to a SynEdit would look like

 uses .. LCLGUIHint, ...

 begin

   SynEdit.Font.Assign ( LCLGUIHint.SysMonoWidthFont );

 end;

There are three constants, which are set depending on widgetset:
  SynDefaultFontName
  SynDefaultFontHeight
  SynDefaultFontPitch

If you create a new TSynEdit, then they are used.
The problem is that these values are always stored in the lfm, what in case of
the IDE is not wanted. For other applications it could be needed.


 So no matter, what widgetset I'm using to compile, the application would
 look native to the user from the start.

 For my projects I'm using GUIHint. I don't know if this solution suitable
 for LCL/Lazarus, I just don't want to add {$ifdef } for every dialog in IDE.


Mattias

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


Re: [Lazarus] TToolButton hints

2008-09-11 Thread Mattias Gärtner
Zitat von Žilvinas Ledas [EMAIL PROTECTED]:

  Please create a bug report and provide a complete example and lazarus
  revision number you are using.

 Sorry, I forgot to write those details. I'm only using Lazarus for ~2months
 so I sometimes forget, that a lot of code is platform specific and hense bugs
 are ;)
 I made a bug report ( http://bugs.freepascal.org/view.php?id=12123 ).

 And one more question - what are conditions to be listed in projects uzing
 lazarus page? ;)

- it uses lazarus
- someone maintains the entry (e.g. you). That means it has a web page (e.g. a
wiki page) or sources on the net to get some more information and a contact
address.


Mattias

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


Re: [Lazarus] Dear developers, we need your help before releasing 0.9.26

2008-09-11 Thread Luca Olivetti
En/na Mattias Gärtner ha escrit:
 Zitat von Luca Olivetti [EMAIL PROTECTED]:
 
 En/na Luca Olivetti ha escrit:

 Another gripe I have with svn, is that if I do an svn diff right after
 an update, all Makefile and Makefile.fpc,
 
 Bug.
 Please create the diff and add it to the bug report. Don't forget lazarus
 revision number and fpc version.

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

Thank you!

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004  Fax +34 93 5883007
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus IDE fonts or LCL GUI hint?

2008-09-11 Thread mitya boyarintsev
 I fixed a few places. See r16542.
 I will try later Monaco. If it is more readable than Courier, then it
becomes
 the default under carbon synedit.
Thanks! PathEditor looks much nicer, than it used to be. I'm looking forward
for 'Monaco' to become default for SynEdit!
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Port with TPQConnection

2008-09-11 Thread Pavel Řezníček
Dear Lazarus developers and users,

is there anyone who would know if and how do I connect to a non-default 
port (other than 5432) with the TPQConnection component?

Thanks a lot.

Pavel Řezníček
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] GtkWidget questions

2008-09-11 Thread SteveG
Need some pointers on the way Laz/fpc handle gtkwidgets if possible.

I am attempting (as a test) to get and then set the size and position of 
a Laz form using Gtk / Gdk - (not necessary I know, just leading to 
further things)

The Form1.Handle is a pointer to a gtkwidget - saved as 'WinHandle'.
 From this, I can retrieve its name, and so know I have the right pointer.
How can I alter the forms size / pos using the widget handle ?

TGtkWidget( PGtkWidget(Winhandle)^).allocation.width  - returns garbage
gtk_widget_size_request(Winhandle, @GtkAllocation) - returns 0's

Working on the theory that I have to use the GDKWindow instead,
TGtkWidget( PGtkWidget(Winhandle)^).Window - returns a number (no idea 
if its correct)
but trying to use it with any GDK_Window_ procedures gives various 
errors (depending on proc called)

Even simply attempting to get the TopLevel windows seems beyond me -
gList := gdk_window_get_toplevels();
gdk_window_get_position( GDK_WINDOW(gList^.data), pXPos, pYPos);

fails with 'GLib-GObject-CRITICAL - use IA__g_type_init() prior to this 
function
though I can easily accept that my understanding of glists is built on 
shakey ground

I know that Laz/fpc can handle most of this 'internally' for its own 
forms/controls - I am wanting to extend programming control outside of 
my app itself
eg - finding xcalc by name, moving / sizing / keystrokes / etc (not just 
xcalc obviously)

Any suggestions appreciated, as its damned frustrating knowing whats 
possible using Gtk/Gdk/GScreen/etc - and its just out of reach :)

Thanks - SteveG

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


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Dimitrios Chr. Ioannidis
Felipe hi,

  What happens if you execute the application without the debugger? Just
  build the binary, copy the binary to the device and run it. Does it
  still crash?

The app doesn't throw exception ( never had a crash ) cause the call to 
RedrawMenus is handled inside a try finally block :

#0 TCUSTOMFORM__SHOWMODAL((TCUSTOMFORM) 0x15a68ac6) at customform.inc:2018

...
2016: ModalResult := 0;
2017:
2018:  try
2019:Show;
...

#1 TLISTITEMS__DEFINEPROPERTIES((^TFILER) 0x0, (TLISTITEMS) 0x0) at 
listitems.inc:359
#2 TWINCEWIDGETSET__APPWAITMESSAGE((TWINCEWIDGETSET) 0x96ab20) at 
winceobject.inc:399
#3 TAPPLICATION__IDLE(true, (TAPPLICATION) 0x962310) at application.inc:315
#4 TAPPLICATION__HANDLEMESSAGE((TAPPLICATION) 0x962310) at 
application.inc:985
#5 TAPPLICATION__RUNLOOP((TAPPLICATION) 0x962310) at application.inc:1095
#6 TWIDGETSET__APPRUN((TAPPLICATIONMAINLOOP) 0x30af8 
TAPPLICATION__RUNLOOP, (TWIDGETSET) 0x96ab20) at interfacebase.inc:49
#7 TAPPLICATION__RUN((TAPPLICATION) 0x962310) at application.inc:1082
#8 main at DPIfaistos.lpr:18

  Are you using the emulator or a real device? Which WinCE version?

Currently i'm doing the tests to a device with Windows Mobile 2003 
Second Edition - Version 4.21.1088 (Build 14235). It's a Qtek 2020i 
PocketPC. Didn't test it in Emulator.

regards,

PS: Fpc 2.2.2, Lazarus v0.9.25 r16538 i386-win32-win32/win64

-- 
Dimitrios Chr. Ioanidis

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


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Felipe Monteiro de Carvalho
That code is copyed from the win32 widgetset. Maybe the call to
RedrawMenu is unnecessary under Windows CE.

Try commenting the call to RedrawMenu, rebuilding lcl and testing again.

Also, please attach a minimal test project which reproduces the issue
in your bug report:

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

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Port with TPQConnection

2008-09-11 Thread Juan Cortés Cuesta
Use  TPSQLDatabase  and  TPSQLDataset components

Edit psqldatabase.pas changing:
const
  PSQLPort = 5432;

recompile. and try again

Good Luck

Warmest Regards
Juan


Pavel Řezníček escribió:
 Dear Lazarus developers and users,

 is there anyone who would know if and how do I connect to a non-default 
 port (other than 5432) with the TPQConnection component?

 Thanks a lot.

 Pavel Řezníček
 ___

   

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


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Dimitrios Chr. Ioannidis
O/H Felipe Monteiro de Carvalho έγραψε:
 That code is copyed from the win32 widgetset. Maybe the call to
 RedrawMenu is unnecessary under Windows CE.
 
 Try commenting the call to RedrawMenu, rebuilding lcl and testing again.

The exception is gone. I comment out

Index: lcl/interfaces/wince/winceobject.inc
===
--- lcl/interfaces/wince/winceobject.inc(revision 16547)
+++ lcl/interfaces/wince/winceobject.inc(working copy)
@@ -396,7 +396,7 @@
timeout, retVal: DWord;
pHandles: Windows.LPHANDLE;
  begin
-  RedrawMenus;
+//  RedrawMenus;
Assert(False, 'Trace:TWinCEWidgetSet.WaitMessage - Start');
if FWaitPipeHandlers  nil then
  timeout := 100

 Also, please attach a minimal test project which reproduces the issue
 in your bug report:

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

Actual a simple, plain app running in the debugger will raise the 
exception. But i 'll do that.

regards,

PS: What about the ability to copy to clipboard the contets of the debug 
output window ? It will be very handy to be able to copy debuggers 
information. Should i add a new ticket in the tracker ?

-- 
Dimitrios Chr. Ioannidis
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GtkWidget questions

2008-09-11 Thread Mattias Gärtner
Zitat von SteveG [EMAIL PROTECTED]:

 Need some pointers on the way Laz/fpc handle gtkwidgets if possible.

 I am attempting (as a test) to get and then set the size and position of
 a Laz form using Gtk / Gdk - (not necessary I know, just leading to
 further things)

See in gtk intf:
procedure SetWindowSizeAndPosition


 The Form1.Handle is a pointer to a gtkwidget - saved as 'WinHandle'.
  From this, I can retrieve its name, and so know I have the right pointer.

The type depends on various settings. But normallly a TForm is a
gtk_window_get_type.


 How can I alter the forms size / pos using the widget handle ?

You can only give suggestions, which are given by the gtk to the window manager
which decides what to do with them.


 TGtkWidget( PGtkWidget(Winhandle)^).allocation.width  - returns garbage

It's the last allocated width.

 gtk_widget_size_request(Winhandle, @GtkAllocation) - returns 0's

This tells gtk to compute a nice size (typically the minimum size). It can only
be computed after the window was realized and some other things have been done.


 Working on the theory that I have to use the GDKWindow instead,
 TGtkWidget( PGtkWidget(Winhandle)^).Window - returns a number (no idea
 if its correct)

The gdk_window exists only after it has been mapped. For top level widgets like
a normal gtk_window 'realized' and 'mapped' happen together.


 but trying to use it with any GDK_Window_ procedures gives various
 errors (depending on proc called)

And depending on the time of use.


 Even simply attempting to get the TopLevel windows seems beyond me -
 gList := gdk_window_get_toplevels();
 gdk_window_get_position( GDK_WINDOW(gList^.data), pXPos, pYPos);

 fails with 'GLib-GObject-CRITICAL - use IA__g_type_init() prior to this
 function
 though I can easily accept that my understanding of glists is built on
 shakey ground

See TGtkWidgetSet.GetActiveWindow for an example.


 I know that Laz/fpc can handle most of this 'internally' for its own
 forms/controls - I am wanting to extend programming control outside of
 my app itself
 eg - finding xcalc by name, moving / sizing / keystrokes / etc (not just
 xcalc obviously)

 Any suggestions appreciated, as its damned frustrating knowing whats
 possible using Gtk/Gdk/GScreen/etc - and its just out of reach :)

The gtk uses a different design than winapi/carbon/qt.
It is very modular, uses low level C with lots of object orientated sugar (low
learning curve), and uses for everything themes and rules. Fixed values are
only used as defaults if no rule exists. That means it is hard to '_only_
change the color or width of a widget to a fixed value', but it is easy to
create widgets that adapt to the target system.
It's more for programmers, than for designers.

Mattias

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


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Felipe Monteiro de Carvalho
On Thu, Sep 11, 2008 at 1:49 PM, Dimitrios Chr. Ioannidis
[EMAIL PROTECTED] wrote:
 The exception is gone. I comment out

No drawbacks? Does the app keep working as expected?

There are possible drawbacks, the first being a memory leak because
now the dirty menu list is never cleared.

I am tempted to simply remove this repaint menu code, but I am afraid
it may have unpredictable effects near the release.

 PS: What about the ability to copy to clipboard the contets of the debug
 output window ? It will be very handy to be able to copy debuggers
 information. Should i add a new ticket in the tracker ?

I added it. Take a look at what I did:

http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revroot=lazarusrevision=16548

And test it.

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] WinCE ( Auto ) Application Type

2008-09-11 Thread Dimitrios Chr. Ioannidis
Hi all,

   when a WinCE Application initializes, AFAIU,

1) in TApplication.Initialize ( application.inc )
   it calls the WidgeSet.AppInit(AppInit) ( line 347 )

2) the TWinCEWidgetSet.AppInit ( winceobject.inc )
   is called from the abive call. In line 129, is trying to determine 
device type to auto define the application type ( 
atDefault,atDesktop,atHandheld,atPDA,atSmartphone ). The call is in line 
129 with a check if the developer assigned something else than 
atDefault. If it doesn't then it calls the GetWinCEPlatform in winceproc.pp.

3) in GetWinCEPlatform ( winceproc.inc ) in line 1456 there is a call to 
SystemParametersInfo

1456: if SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(buf), @buf, 0)

4) the SystemParametersInfo is in

-file-exec-and-symbols 
E:/Programming/Projects/DataPlus/LazIfaistos/bin/DPIfaistos-arm-wince.exe
^done

(gdb)

-gdb-set language pascal
^done

(gdb)

-environment-cd .
^done

(gdb)

-environment-cd E:/Programming/Projects/DataPlus/LazIfaistos/bin/
^done

(gdb)

-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC
No symbol \FPC_THREADVAR_RELOCATE_PROC\ in current context.\n

^error,msg=No symbol \FPC_THREADVAR_RELOCATE_PROC\ in current context.

(gdb)

info functions FPC_CPUINIT
info functions FPC_CPUINIT\n

~All functions matching regular expression \FPC_CPUINIT\:\n

~\n

~Non-debugging symbols:\n

~0x00011f78  SYSTEM_FPC_CPUINIT\n

^done

(gdb)

-exec-arguments 
^done

(gdb)

-gdb-set language pascal
^done

(gdb)

info address main
info address main\n

~Symbol \main\ is a function at address 0x11bec.\n

^done

(gdb)

-break-insert -t *72684
^done,bkpt={number=7,type=breakpoint,disp=del,enabled=y,addr=0x00011bec,func=main,file=DPIfaistos.lpr,line=13,times=0}

(gdb)

-break-insert FPC_RAISEEXCEPTION
^done,bkpt={number=8,type=breakpoint,disp=keep,enabled=y,addr=0x0001a8f4,at=fpc_raiseexception,times=0}

(gdb)

-break-insert FPC_BREAK_ERROR
^done,bkpt={number=9,type=breakpoint,disp=keep,enabled=y,addr=0x0001ba30,at=SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER,times=0}

(gdb)

-break-insert FPC_RUNERROR
^done,bkpt={number=10,type=breakpoint,disp=keep,enabled=y,addr=0x0001bb5c,at=SYSTEM_RUNERROR$WORD+16,times=0}

(gdb)

info file
info file\n

~Symbols from 
\E:/Programming/Projects/DataPlus/LazIfaistos/bin/DPIfaistos-arm-wince.exe\.\n

~Local exec file:\n

~\t`E:/Programming/Projects/DataPlus/LazIfaistos/bin/DPIfaistos-arm-wince.exe',
 
file type pei-arm-little.\n

~\tEntry point: 0x20f14\n

~\t0x00011000 - 0x0015af40 is .text\n

~\t0x0015b000 - 0x001657ec is .data\n

~\t0x00166000 - 0x0019a328 is .rdata\n

~\t0x0019b000 - 0x0019b008 is .pdata\n

~\t0x0019c000 - 0x001b1f10 is .bss\n

~\t0x001b2000 - 0x001b3960 is .idata\n

~\t0x001b4000 - 0x001b4218 is .rsrc\n

^done

(gdb)

-exec-run
^running

(gdb)

~Connectig to remote device...\n

~Starting on device: \\\gdb\\wince-stub.exe \\n

~Accepting connection...\n

~Uploading file to device: \\gdb\\DPIfaistos-arm-wince.exe\n

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


Re: [Lazarus] WinCE ( Auto ) Application Type

2008-09-11 Thread Felipe Monteiro de Carvalho
I think you cutted your text. It suddenly stops in item 4 and then a
lot of gdb stuff which says nothing to me comes in.

Please be more clear about what you are trying to say.

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Not all Lazarus daily snapshots are refreshing

2008-09-11 Thread ABorka
The Lazarus daily install packages stopped refreshing a
few days ago on the default daily snapshots download page: 
http://snapshots.lazarus.shikami.org/lazarus/



Lazarus - fpc 2.2.2 win32 - arm wince 
Lazarus-0.9.25-fpc-2.2.2-20080908-cross-arm-wince-win32.exe

Lazarus - full - fpc 2.2.3  win32 
Lazarus-0.9.25-16495-fpc-2.2.3-20080909-win32.exe

Lazarus - fpc 2.2.3 win32 - arm wince 
Lazarus-0.9.25-fpc-2.2.3-20080908-cross-arm-wince-win32.exe


All of these should be 11th today not 8th and 9th

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


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Dimitrios Chr. Ioannidis
O/H Felipe Monteiro de Carvalho έγραψε:
 On Thu, Sep 11, 2008 at 1:49 PM, Dimitrios Chr. Ioannidis
 [EMAIL PROTECTED] wrote:
 The exception is gone. I comment out
 
 No drawbacks? Does the app keep working as expected?
 
 There are possible drawbacks, the first being a memory leak because
 now the dirty menu list is never cleared.
 
 I am tempted to simply remove this repaint menu code, but I am afraid
 it may have unpredictable effects near the release.

Well, i don't know LCL internals to agree or disagree but i could not 
test it. A small project with a TMainMenu isn't a test :) And of course 
i would like to know how to test for memory leaks using remote debugger.

 PS: What about the ability to copy to clipboard the contets of the debug
 output window ? It will be very handy to be able to copy debuggers
 information. Should i add a new ticket in the tracker ?
 
 I added it. Take a look at what I did:

It works. Thx ... Now i can help you more providing you with debug 
output info's like this, where i'm trying to see why ApplicationType 
isn't set correctly in my device :

-file-exec-and-symbols E:/Programming/Projects/testLazWince/project1.exe
^done
-gdb-set language pascal
^done
-environment-cd .
^done
-environment-cd E:/Programming/Projects/testLazWince/
^done
-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC
No symbol \FPC_THREADVAR_RELOCATE_PROC\ in current context.\n
^error,msg=No symbol \FPC_THREADVAR_RELOCATE_PROC\ in current context.

 stripped a lot info 

info file\n
~Symbols from \E:/Programming/Projects/testLazWince/project1.exe\.\n
~Local exec file:\n
~\t`E:/Programming/Projects/testLazWince/project1.exe', \n
~file type pei-arm-little.\n

 stripped a lot info 

-exec-run
^running
~Connectig to remote device...\n
~Starting on device: \\\gdb\\wince-stub.exe \\n
~Accepting connection...\n
~Uploading file to device: \\gdb\\project1.exe\n
~7fea1000:tshres.96.dll\n
~27b1000:shutil.dll\n
~7feb1000:shellres.dll.0408.mui\n
~7fee1000:shellres.dll\n
~7ff41000:tshres.dll.0408.mui\n
~7ff61000:tshres.dll\n
~2841000:commctrl.dll\n
~27e1000:aygshell.dll\n
~2361000:oleaut32.dll\n
~22f1000:ossvcs.dll\n
~2391000:ole32.dll\n
~7fff1000:coredll.dll.0408.mui\n
~1f61000:coredll.dll\n
*stopped,thread-id=1,frame={addr=0x00011bdc,func=main,args=[],file=project1.lpr,fullname=E:\\Programming\\Projects\\testLazWince/project1.lpr,line=13}
info program
info program\n
~\tUsing the running image of child process 361384062.\n
~Program stopped at 0x11bdc.\n
~It stopped at a breakpoint that has since been deleted.\n
~Type \info stack\ or \info registers\ for more information.\n
^done
-break-insert winceobject.inc:129
^done,bkpt={number=13,type=breakpoint,disp=keep,enabled=y,addr=0x0013fa58,func=TWINCEWIDGETSET__APPINIT,file=winceobject.inc,line=129,times=0}
-break-enable 13
^done
-break-insert winceproc.pp:1456
^done,bkpt={number=14,type=breakpoint,disp=keep,enabled=y,addr=0x001485e8,func=GETWINCEPLATFORM,file=winceproc.pp,line=1456,times=0}
-break-enable 14
^done
-break-insert winapi.inc:850
^done,bkpt={number=15,type=breakpoint,disp=keep,enabled=y,addr=0x00074504,func=SYSTEMPARAMETERSINFO,file=winapi.inc,line=850,times=0}
-break-enable 15
^done
-break-insert intfbasewinapi.inc:1493
^done,bkpt={number=16,type=breakpoint,disp=keep,enabled=y,addr=0x00038868,func=TWIDGETSET__SYSTEMPARAMETERSINFO,file=intfbasewinapi.inc,line=1493,times=0}
-break-enable 16
^done
-exec-continue
^running
*stopped,reason=breakpoint-hit,bkptno=13,thread-id=1,frame={addr=0x0013fa58,func=TWINCEWIDGETSET__APPINIT,args=[{name=SCREENINFO,value={PIXELSPERINCHX
 
= 72, PIXELSPERINCHY = 72, COLORDEPTH = 24, INITIALIZED = 
false}},{name=this,value=0x96aaa0}],file=winceobject.inc,line=129}
-stack-list-frames 0 0
^done,stack=[frame={level=0,addr=0x0013fa58,func=TWINCEWIDGETSET__APPINIT,file=winceobject.inc,line=129}]

 stripped a lot info 

regards,

-- 
Dimitrios Chr. Ioannidis

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


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Felipe Monteiro de Carvalho
On Thu, Sep 11, 2008 at 2:58 PM, Dimitrios Chr. Ioannidis
[EMAIL PROTECTED] wrote:
 It works. Thx ... Now i can help you more providing you with debug
 output info's like this, where i'm trying to see why ApplicationType
 isn't set correctly in my device :

Why do you think it isn't set correctly? What is it set to? What were
you expecting?

If you are just developing to 1 kind of device simply override the
ApplicationType to a fixed type, but be aware the atPDA the most
tested mode.

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Dimitrios Chr. Ioannidis
Felipe Monteiro de Carvalho wrote:
 On Thu, Sep 11, 2008 at 2:58 PM, Dimitrios Chr. Ioannidis
 [EMAIL PROTECTED] wrote:
   
 It works. Thx ... Now i can help you more providing you with debug
 output info's like this, where i'm trying to see why ApplicationType
 isn't set correctly in my device :
 

 Why do you think it isn't set correctly? What is it set to? What were
 you expecting?
   

Well, i was expecting that the ApplicationType variable to be set to 
atPDA or to atHandheld regarding the device that is running. At least 
this was my assuption reading the code below :

( winceobject.inc )
...
128:  { Initializes the application type }
129:   if Application.ApplicationType = atDefault then
130: Application.ApplicationType := GetWinCEPlatform;
...


but then when i trace the GetWinCEPlatform call i find that it ends in ( 
intfbasewinapi.inc )

function TWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: 
DWord; pvParam: Pointer; fWinIni: DWord): LongBool;
begin
  case uiAction of
SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := 3; // default value
  else
Result := False;
  end
end;

which does nothing. If i'm not mistaken the implementation code to auto 
determine the device type and set the applicationtype variable 
accordingly is missing.

Maybe i'm wrong, i'm just started to learn LCL.

regards,

-- 
Dimitrios Chr. Ioannidis

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


Re: [Lazarus] RedrawMenus function in winceproc.pp - WinCE problem ?

2008-09-11 Thread Felipe Monteiro de Carvalho
 function TWidgetSet.SystemParametersInfo

This is the wrong routine. I changed the code to explicity call
Windows.SystemParametersInfo (which means: from the windows unit).
Looks like an ambiguity problem.

Please retest after upgrading to latest svn.

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus IDE fonts or LCL GUI hint?

2008-09-11 Thread Mattias Gaertner
On Thu, 11 Sep 2008 12:02:51 +
mitya boyarintsev [EMAIL PROTECTED] wrote:

  I fixed a few places. See r16542.
  I will try later Monaco. If it is more readable than Courier, then
  it
 becomes
  the default under carbon synedit.
 Thanks! PathEditor looks much nicer, than it used to be. I'm looking
 forward for 'Monaco' to become default for SynEdit!

The bold style of Monaco is hard to see on my Macbook. Courier is much
better, especially for small font heights.

Mattias
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Mac OS X : IDE Messages window hides vertical down arrow...

2008-09-11 Thread Dominique Louis
When you first load up a project in the Carbon IDE and compile a 
project, 2 things happen.

1. The vertical down arrow on the right hand side of the Message Window 
is obscured behind the resizing anchor, so you can't actuall scroll down 
using it.

2. If you have loads of Hints and Warnings, the Project YourProject 
successfully built. :) message cannot be scrolled to at the bottom of 
the Window. So there seems to be a message/line count issue, If you 
resize the Message window, you are then able to scroll to the bottom.

Thanks,


Dominique.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Mac OS X : IDE Messages window hides vertical down arrow...

2008-09-11 Thread Mattias Gaertner
On Thu, 11 Sep 2008 22:21:14 +0100
Dominique Louis [EMAIL PROTECTED] wrote:

 When you first load up a project in the Carbon IDE and compile a 
 project, 2 things happen.
 
 1. The vertical down arrow on the right hand side of the Message
 Window is obscured behind the resizing anchor, so you can't actuall
 scroll down using it.
 
 2. If you have loads of Hints and Warnings, the Project YourProject 
 successfully built. :) message cannot be scrolled to at the bottom of 
 the Window. So there seems to be a message/line count issue, If you 
 resize the Message window, you are then able to scroll to the bottom.

Please create bug reports in the tracker. 
You can help/accelerate fixing the bugs by providing small
example applications.
Don't forget to add the lazarus revision number.

Mattias
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Shortcuts in MainMenu

2008-09-11 Thread Mattias Gaertner
On Thu, 11 Sep 2008 18:22:17 -0300
Osvaldo Filho [EMAIL PROTECTED] wrote:

 Hi Mattias,
 
 Ubuntu 8.04.1 32bits
 FPC 2.2.3
 Lazarus r16547 GTK2
 
 On lazarus the shortcuts for menu is not functional, ALT+ key not
 down any menu!
 No shortcuts for my IDE.
 My Lazarus is compiled form subversion using the scripts for
 debian/ubuntu packages.
 
 Mainmenu, in my application, have same problem!

Maybe I was not clear: please create a bug report in the bug tracker
and provide a complete example. This helps us to fix the bug.


Mattias


  Please create a bug report and provide a complete example.
 
 
  Mattias
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Not all Lazarus daily snapshots are refreshing

2008-09-11 Thread Vincent Snijders
ABorka schreef:
 The Lazarus daily install packages stopped refreshing a
 few days ago on the default daily snapshots download page: 
 http://snapshots.lazarus.shikami.org/lazarus/
 
 
 
 Lazarus - fpc 2.2.2   win32 - arm wince 
 Lazarus-0.9.25-fpc-2.2.2-20080908-cross-arm-wince-win32.exe
 
 Lazarus - full - fpc 2.2.3win32 
 Lazarus-0.9.25-16495-fpc-2.2.3-20080909-win32.exe
 
 Lazarus - fpc 2.2.3   win32 - arm wince 
 Lazarus-0.9.25-fpc-2.2.3-20080908-cross-arm-wince-win32.exe
 

Caused by a unreliable internet connection of the build host and changes 
due to http://bugs.freepascal.org/view.php?id=11988

Vincent
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] TXMLConfig on WinCE

2008-09-11 Thread Pavel Řezníček
Dear developers and users,

I maybe noticed a bug in TXMLConfig on Windows CE.

I create the configuration component dynamically in code because of the 
initial access violation - to catch the error:

if XMLC = nil then
  XMLC := TXMLConfig.Create(Self);
XMLC.RootName := 'CONFIG';
XMLC.Filename := 'Config.xml';

 From somewhere (not sure, WinCE debugging really takes a while when 
emulating...) I get to unit XMLRead, procedure 
TXMLStreamInputSource.FetchData, line 920:

  PWideChar(FCharBufEnd)^ := #0;

The whole procedure is:

procedure TXMLStreamInputSource.FetchData;
var
  Remainder, BytesRead: Integer;
  OldBuf: PChar;
begin
  Assert(FCharBufEnd - FCharBuf  Slack-4);

  OldBuf := FCharBuf;
  Remainder := FCharBufEnd - FCharBuf;
  if Remainder  0 then
Remainder := 0;
  FCharBuf := FAllocated+Slack-4-Remainder;
  Move(OldBuf^, FCharBuf^, Remainder);
  BytesRead := FStream.Read(FAllocated[Slack-4], FCapacity);
  FCharBufEnd := FAllocated + (Slack-4) + BytesRead;
  PWideChar(FCharBufEnd)^ := #0;
end;

I found a very similar bug on the top of the tracker. Maybe this also 
helps to locate the cause.

Lazarus 0.9.25 beta
2008-07-25
FPC 2.2.3
SVN rev. 15862

Pavel Řezníček
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus IDE fonts or LCL GUI hint?

2008-09-11 Thread Felipe Monteiro de Carvalho
On the other hand, Courier has much worse internationalization
support. Courier does not support Russian, while Monaco does.

And the latin accents in Couries are almost invisible, while they
appear well with Monaco.

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] WinCE ( Auto ) Application Type ( PLz, ignore it. Enter pressed by accident. )

2008-09-11 Thread Dimitrios Chr. Ioannidis
Hi all,

   that message was a mistake. Apologies.

 Hi all,
 
when a WinCE Application initializes, AFAIU,
 
 1) in TApplication.Initialize ( application.inc )
 (gdb)


regards,

-- 
Dimitrios Chr. Ioannidis
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] SQLite differences between ExecSQL and SQL

2008-09-11 Thread Usuario Anónimo
What difference exist between

dsTest.ExecSQL('Select * from Vendor where Code = 0');

and

dsTest.SQL := 'Select * from Vendor where Code = 0';

?

Regards.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] SQLite differences between ExecSQL and SQL

2008-09-11 Thread Luiz Americo Pereira Camara
Usuario Anónimo wrote:
 What difference exist between

 dsTest.ExecSQL('Select * from Vendor where Code = 0');
   

ExecSql is used to commands to modify the database state like Insert, 
Update, Delete, Create Table
 and

 dsTest.SQL := 'Select * from Vendor where Code = 0';
   
SQL is used to retrieve data, i.e, the Select command. It must be 
followed by the Open method. So to retrieve the data you must do:

Close;
Sql:= 'select XXX';
Open;


Luiz

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


[Lazarus] svn r16559 cwstrings problem

2008-09-11 Thread Tom Lisjac
Lazarus svn 16559 +  fpc 2.2.2-0 won't compile:

Compiling ./widgetset/wsreferences.pp
Fatal: Unit cwstrings searched but cwstring found
Fatal: Compilation aborted

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