Re: [lazarus] After upgrading to gtk2

2006-02-26 Thread Mattias Gaertner
On Sat, 25 Feb 2006 22:46:58 -0300
Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote:

 Here is how I do it:
 
 I compile only LCL with gtk2, I use the IDE and everything else in Gtk1.
 
 then the IDE cannot understand utf-8, and gtk2 only understands Gtk2.
 So I add code to my software at a apropriate place to write the Text
 and Caption properties of all visual components and set them to utf-8
 values. I use kate or other utf-8 capable editors to do this, since
 Gtk1 IDE doesn't understand utf-8.
 
 Now I compile with the IDE and I have a utf-8 Gtk2 software =)

I'm using gtk1 and have utf8.
Maybe you forgot to choose a utf8 capable font for the editor?
Under gtk2 all fonts are utf8 fonts, so here it works with any font.


Mattias

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


[lazarus] CodeTools help

2006-02-26 Thread Graeme Geldenhuys
Hi,

Is there any wiki site or other documentation for CodeTools?  I am
trying to convert some of the GExpert tools from Delphi to Lazarus.  I
am looking at the Code Explorer in Lazarus as an example which is
helping...

Question 1:
  I need to retrieve a list of procedures and functions from the
current editor file.  Code Explorer is based an a Treeview.  The one I
am busy with is not, it will just populate a TListView with all
procedures and functions.  Does CodeTools only return a treeview
structure of the current editor file, or is there another way of doing
this?


Question 2:
  Where does Code Explorer link into CodeTools to retrieve info from
the current editor file?
From what I can see, it looks like the code in the Refresh method:

   // get the codetool with the updated codetree
  ACodeTool:=nil;
  if Assigned(OnGetCodeTree) then
OnGetCodeTree(Self,ACodeTool);


Is my assumption correct?


Regards,
  - Graeme -

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


Re: [lazarus] After upgrading to gtk2

2006-02-26 Thread Panagiotis Sidiropoulos
It is OK now. Captions is not a problem because I read interface
captions while running, stored in a unicode text file.

Components are now displayed in design time but, it is not possible to
display buttons in TToolBar. Frame of ToolBar is displayed but no its
contents.

Regards, Panagiotis


Στις 25-02-2006, ημέρα Σαβ, και ώρα 22:46 -0300, ο/η Felipe Monteiro de
Carvalho έγραψε:
 Here is how I do it:
 
 I compile only LCL with gtk2, I use the IDE and everything else in Gtk1.
 
 then the IDE cannot understand utf-8, and gtk2 only understands Gtk2.
 So I add code to my software at a apropriate place to write the Text
 and Caption properties of all visual components and set them to utf-8
 values. I use kate or other utf-8 capable editors to do this, since
 Gtk1 IDE doesn't understand utf-8.
 
 Now I compile with the IDE and I have a utf-8 Gtk2 software =)
 
 --
 Felipe Monteiro de Carvalho
 
 _
  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] bugfix 1265

2006-02-26 Thread Vincent Snijders

Darius Blaszijk wrote:

Here's a patch that should solve the remaining issue.
 
Unfortunately I pulled the source accidentally through a codeformatter 
for which I appologise, if considered an issue I could make a new patch. 
But changes are fairly trivial so I guessed it should be not a big issue.


Trivial except for the alphabetical ordering of the uses clause.

Vincent.

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


Re: [lazarus] CodeTools help

2006-02-26 Thread Michael Van Canneyt


On Sun, 26 Feb 2006, Graeme Geldenhuys wrote:

 Hi,

 Is there any wiki site or other documentation for CodeTools?  I am
 trying to convert some of the GExpert tools from Delphi to Lazarus.  I
 am looking at the Code Explorer in Lazarus as an example which is
 helping...

I think I already sent you an article which partly explains what you need.
If you want I can send more of these. It explains how to implement one of
the GExpert buttons (jump to interface uses, implementation uses etc) and
how to place it on a toolbar in the IDE source code window.

Mattias, did I send you the code for that, or not ?

Michael.

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


Re: [lazarus] Program plugin

2006-02-26 Thread Michael Van Canneyt


On Sun, 26 Feb 2006, Philippe.martinole wrote:

  Yes, Interfaces are language independent. They only define what
  functions/procedures are available within an interface (and what calling
  convention). An Interface itself has no data or code. I' is only a
  quot;contractquot; that those functions are avalable.
  The actual code is implemented by a delphi/FPC/C++ class.

  I've read some dosuments on Interface and ijfI understand, it is a part
 of COM of Microsoft under Windows ?

COM is just an implementation of Interfaces on Windows.
CORBA also knows Interfaces, Java too.

 Is it still possible to use Interface under Linux ?

Yes. The interfaces implementation is cross platform.

What you don't have on Linux is ActiveX: a central
repository/factory for Interfaces on the system.
(Unless you want to use the GNOME and KDE CORBA services)

That just means that you can't use dual interfaces on Linux,
but this is not a problem.

Michael.

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


Re: [lazarus] CodeTools help

2006-02-26 Thread Graeme Geldenhuys
Hi Michael,

Yes you sent me lazide3.pdf thanks.  I used that to add my tool to the
IDE menu.  I only noticed now it has a section on the Source Editor as
well.  Opps!

Could you send me more of those articles if you don't mind, the
current one helped a lot.  I have quite a few things I want to add to
Lazarus, and all the documentation / code samples I can find would be
greatly appreciated.

As before, you can email any attachment to my email address used it
this message. Thanks in advance.

Regards,
  - Graeme -


On 2/26/06, Michael Van Canneyt [EMAIL PROTECTED] wrote:


 On Sun, 26 Feb 2006, Graeme Geldenhuys wrote:

  Hi,
 
  Is there any wiki site or other documentation for CodeTools?  I am
  trying to convert some of the GExpert tools from Delphi to Lazarus.  I
  am looking at the Code Explorer in Lazarus as an example which is
  helping...

 I think I already sent you an article which partly explains what you need.
 If you want I can send more of these. It explains how to implement one of
 the GExpert buttons (jump to interface uses, implementation uses etc) and
 how to place it on a toolbar in the IDE source code window.

 Mattias, did I send you the code for that, or not ?

 Michael.

 _
  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] A new language patch for the Dutch translations

2006-02-26 Thread Mattias Gaertner
On Sat, 25 Feb 2006 15:19:30 +0100
Matthijs Willemstein [EMAIL PROTECTED] wrote:

 Hi,
 
 a patch for lazaruside.nl.po and objinspstrconsts.nl.po.

Thanks. Applied.

Mattias

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


Re: [lazarus] TListBox and Font properties

2006-02-26 Thread Mattias Gaertner
On Sun, 26 Feb 2006 16:22:04 +0200
Panagiotis Sidiropoulos [EMAIL PROTECTED] wrote:

 I can't get TListBox to change font properties and enable OwnerDraw
 style. OS is Linux with gtk2.
 
 Can anyone please help?

AFAIK it is not yet implemented.
If you want to implement it and have questions, don't hesitate to ask.


Mattias


 
 Panagiotis
 
  26-02-2006, __ __, __ __ 12:55 +0200, __/__ 
 Graeme Geldenhuys
 :
  Hi Michael,
  
  Yes you sent me lazide3.pdf thanks.  I used that to add my tool to the
  IDE menu.  I only noticed now it has a section on the Source Editor as
  well.  Opps!
  
  Could you send me more of those articles if you don't mind, the
  current one helped a lot.  I have quite a few things I want to add to
  Lazarus, and all the documentation / code samples I can find would be
  greatly appreciated.
  
  As before, you can email any attachment to my email address used it
  this message. Thanks in advance.
  
  Regards,
- Graeme -
  
  
  On 2/26/06, Michael Van Canneyt [EMAIL PROTECTED] wrote:
  
  
   On Sun, 26 Feb 2006, Graeme Geldenhuys wrote:
  
Hi,
   
Is there any wiki site or other documentation for CodeTools?  I am
trying to convert some of the GExpert tools from Delphi to Lazarus. 
I am looking at the Code Explorer in Lazarus as an example which is
helping...
  
   I think I already sent you an article which partly explains what you
   need. If you want I can send more of these. It explains how to
   implement one of the GExpert buttons (jump to interface uses,
   implementation uses etc) and how to place it on a toolbar in the IDE
   source code window.
  
   Mattias, did I send you the code for that, or not ?
  
   Michael.
  
   _
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
  
 
 _
  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] CodeTools help

2006-02-26 Thread Mattias Gaertner
On Sun, 26 Feb 2006 12:29:11 +0200
Graeme Geldenhuys [EMAIL PROTECTED] wrote:

 Hi,
 
 Is there any wiki site or other documentation for CodeTools? 

I started one:
http://wiki.lazarus.freepascal.org/index.php/Codetools


 I am
 trying to convert some of the GExpert tools from Delphi to Lazarus.  I
 am looking at the Code Explorer in Lazarus as an example which is
 helping...
 
 Question 1:
   I need to retrieve a list of procedures and functions from the
 current editor file.  Code Explorer is based an a Treeview.  The one I
 am busy with is not, it will just populate a TListView with all
 procedures and functions.  Does CodeTools only return a treeview
 structure of the current editor file, or is there another way of doing
 this?

The codetools create for every unit they parse a TCodeTree - a tree of
TCodeTreeNode. This tree is rebuilt on every parsing. That's why the IDE
calls CodeToolsBoss.Explore and creates a local copy of all items/info it
needs for the code explorer.

 
 Question 2:
   Where does Code Explorer link into CodeTools to retrieve info from
 the current editor file?
 From what I can see, it looks like the code in the Refresh method:
 
// get the codetool with the updated codetree
   ACodeTool:=nil;
   if Assigned(OnGetCodeTree) then
 OnGetCodeTree(Self,ACodeTool);
 
 
 Is my assumption correct?

Yes. OnGetCodeTree does basically this:

  // commit editor changes to codetools
  if not LazarusIDE.BeginCodeTools then exit;
  
  // get active source editor
  SrcEditor:=SourceEditorWindow.ActiveEditor;
  if SrcEditor=nil then exit;
  CodeBuffer:=SrcEditor.CodeToolsBuffer as TCodeBuffer;

  // parse source
  CodeToolsBoss.Explore(CodeBuffer,ACodeTool,false);

  // copy the tree
  if ACodeTool.Treenil then ...

See examples/idequickfix/quickfixexample.lpk for an example, how to work
with the codetools.

For example: If you only want the top level 'procedure' nodes of the
implementation section of a unit, you can do this:

ANode:=ACodeTool.FindImplementationNode;
if ANode=nil then exit;
ANode:=ANode.FirstChild;
while ANodenil do begin
  if ANode.Desc=ctnProcedure then begin
NodeText:=ACodeTool.ExtractProcHead(ANode,[]);
// add ...
  end;
  ANode:=ANode.NextBrother;
end;

Mattias

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


Re: [lazarus] transparent forms

2006-02-26 Thread Micha Nelissen
On Sat, 25 Feb 2006 19:27:47 +
xpete [EMAIL PROTECTED] wrote:

 One of them is:
 
 property ScanLine[Row: Integer]: Pointer;
 
 from TBitmap with is present in JCL (http://www.delphi-jedi.org) so i
 don't think it's difficult to implement.

It's harder than you think if you step outside the windows world.
 
 But the most important features that i need are:
 
 property TransparentColor: Boolean;
 property TransparentColorValue: TColor;
 
 from TCustomForm
 It makes any area of the form with that color become transparent.
 i tried to use a component  called FormForma from here
 
 http://sites.uol.com.br/brunobl/

How does it work? Does it scan the form and build a region or so? Sounds
like a horrible hack to me TBH. How do you use it ?

Micha

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


Re: [lazarus] transparent forms

2006-02-26 Thread A.J. Venter


 How does it work? Does it scan the form and build a region or so? Sounds
 like a horrible hack to me TBH. How do you use it ?

Well there are a few ways one could achieve this, the worst hack being to have 
the code scan the form and copy whatever is behind it on screen onto the 
section you selected, that is a horrible way.
Now on MacOSX and Linux (at least with newer versions of X) it should be 
possible to do TRUE translucency. On linux by tapping into the Xcomposite and 
Xrender extensions, not sure how you get to these features on Mac. On windows 
I don't know but different implementations for supported platforms is quite 
okay if the interface to the component is the same.

I do think it would be a nice-to-have but right now I doubt there is a clean 
multiplatform approach so a per-platform implementation would  be needed and 
it's not lazarus style to add components that work only in one place.

I do reckon that a lazarus component which can tap into the features of 
xcomposite manager would be really neat though, not sure what it would take 
to create one, especially if you don't want to use a tprocess, I suspect our 
X-header conversions don't include the functions it uses so it may require 
converting some code from the c project by X.org.
Of course it won't work on all versions of X only those that have the right 
support compiled in (which is alpha code right now) but it would mean that 
where available lazarus apps can be xgl enabled, users could have a slider 
right in the app for adjusting transparency... neat nay (of course I think 
this will be whole-form only though it could surely be mapped into a 
component as well to affect only that which is in the bounds of the component 
- personally I would like both - the component could have a slider letting 
the user adjust the transparency of the region it encapsulates (and otherwize 
look and work like say a tgroupbox) and another component which would be 
simpler and probably non-visual but would adjust full form transparency to 
whatever value you pass it in properties) 

Wow that was a lot of bracing :p

Anyway, just some thoughts from me on the topic. Others ?

Ciao
A.J.

-- 
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

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


Re: Why is this throwing an exception - ANSWER

2006-02-26 Thread A.J. Venter
Patch as per Mattias' suggestion attached, 
I tested it and verified that it fixes the problem allowing derivative 
components of ipHtmlPanel to be created and used.

Ciao
A.J.
-- 
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103
Index: components/turbopower_ipro/iphtml.pas
===
--- components/turbopower_ipro/iphtml.pas	(revision 8812)
+++ components/turbopower_ipro/iphtml.pas	(working copy)
@@ -15976,7 +15976,7 @@
 function TIpHtmlInternalPanel.HtmlPanel: TIpHtmlCustomPanel;
 begin
   Result := TIpHtmlPanel(Parent);
-  while (Result.ClassType  TIpHtmlPanel) do
+   while not (Result is TIpHtmlPanel) do
 Result := TIpHtmlPanel(Result.Parent);
 end;
 
Index: components/fpcunit/Makefile.fpc
===
--- components/fpcunit/Makefile.fpc	(revision 8812)
+++ components/fpcunit/Makefile.fpc	(working copy)
@@ -7,7 +7,7 @@
 [compiler]
 unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)
 unitdir=../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/
-options=-dLCL -dLCLgtk -S2 -gl
+options=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 
 [target]
 units=fpcunittestrunner.pas
@@ -18,6 +18,16 @@
   $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \
   $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) \
   $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
+[prerules]
+# LCL Platform
+ifndef LCL_PLATFORM
+ifeq ($(OS_TARGET),win32)
+LCL_PLATFORM=win32
+else
+LCL_PLATFORM=gtk
+endif
+endif
+export LCL_PLATFORM
 
 [rules]
 .PHONY: cleartarget all
Index: components/fpcunit/Makefile
===
--- components/fpcunit/Makefile	(revision 8812)
+++ components/fpcunit/Makefile	(working copy)
@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/01/19]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2005/12/07]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince powerpc64-linux
@@ -231,6 +231,14 @@
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=fpcunittestrunner
 override PACKAGE_VERSION=0.1
+ifndef LCL_PLATFORM
+ifeq ($(OS_TARGET),win32)
+LCL_PLATFORM=win32
+else
+LCL_PLATFORM=gtk
+endif
+endif
+export LCL_PLATFORM
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_UNITS+=fpcunittestrunner.pas
 endif
@@ -454,115 +462,115 @@
 override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
 endif
 ifeq ($(FULL_TARGET),i386-linux)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override COMPILER_OPTIONS+=-dLCL -dLCLgtk -S2 -gl
+override COMPILER_OPTIONS+=-dLCL 

Re: [lazarus] TListBox and Font properties

2006-02-26 Thread Panagiotis Sidiropoulos
 AFAIK it is not yet implemented.

But I had this option while using Lazarus 0.9.8, FPC 2.0.0 and GTK1. Is
it possible for this to be missing on a next version? (Lazarus 0.9.13, v
FPC 2.0.2, GTK2).

Panagiotis

Στις 26-02-2006, ημέρα Κυρ, και ώρα 13:50 +0100, ο/η Mattias Gaertner
έγραψε:
 On Sun, 26 Feb 2006 16:22:04 +0200
 Panagiotis Sidiropoulos [EMAIL PROTECTED] wrote:
 
  I can't get TListBox to change font properties and enable OwnerDraw
  style. OS is Linux with gtk2.
  
  Can anyone please help?
 
 AFAIK it is not yet implemented.
 If you want to implement it and have questions, don't hesitate to ask.
 
 
 Mattias
 
 
  
  Panagiotis
  
   26-02-2006, __ __, __ __ 12:55 +0200, __/__ 
  Graeme Geldenhuys
  :
   Hi Michael,
   
   Yes you sent me lazide3.pdf thanks.  I used that to add my tool to the
   IDE menu.  I only noticed now it has a section on the Source Editor as
   well.  Opps!
   
   Could you send me more of those articles if you don't mind, the
   current one helped a lot.  I have quite a few things I want to add to
   Lazarus, and all the documentation / code samples I can find would be
   greatly appreciated.
   
   As before, you can email any attachment to my email address used it
   this message. Thanks in advance.
   
   Regards,
 - Graeme -
   
   
   On 2/26/06, Michael Van Canneyt [EMAIL PROTECTED] wrote:
   
   
On Sun, 26 Feb 2006, Graeme Geldenhuys wrote:
   
 Hi,

 Is there any wiki site or other documentation for CodeTools?  I am
 trying to convert some of the GExpert tools from Delphi to Lazarus. 
 I am looking at the Code Explorer in Lazarus as an example which is
 helping...
   
I think I already sent you an article which partly explains what you
need. If you want I can send more of these. It explains how to
implement one of the GExpert buttons (jump to interface uses,
implementation uses etc) and how to place it on a toolbar in the IDE
source code window.
   
Mattias, did I send you the code for that, or not ?
   
Michael.
   
_
 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
   
  
  _
   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
 

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


Re: [lazarus] CodeTools help

2006-02-26 Thread Graeme Geldenhuys
Thanks to everybody that replied.  I got my first Lazarus Addon
working.  Just a few more tweaks and it should be ready.  :-)

I will keep testing it in the next week, and then release it for public testing.

Regards,
  - Graeme -

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


Re: [lazarus] TListBox and Font properties

2006-02-26 Thread Panagiotis Sidiropoulos
 AFAIK it is not yet implemented.
 If you want to implement it and have questions, don't hesitate to ask.

But I had this option (OWNER DRAW AT LEAST) while using Lazarus 0.9.8,
FPC 2.0.0 and GTK1. Is it possible for this to be missing on a next
version? (Lazarus 0.9.13, FPC 2.0.2, GTK2).

Panagiotis

Στις 26-02-2006, ημέρα Κυρ, και ώρα 13:50 +0100, ο/η Mattias Gaertner
έγραψε:
 On Sun, 26 Feb 2006 16:22:04 +0200
 Panagiotis Sidiropoulos [EMAIL PROTECTED] wrote:
 
  I can't get TListBox to change font properties and enable OwnerDraw
  style. OS is Linux with gtk2.
  
  Can anyone please help?
 
 AFAIK it is not yet implemented.
 If you want to implement it and have questions, don't hesitate to ask.
 
 
 Mattias
 
 
  
  Panagiotis
  
   26-02-2006, __ __, __ __ 12:55 +0200, __/__ 
  Graeme Geldenhuys
  :
   Hi Michael,
   
   Yes you sent me lazide3.pdf thanks.  I used that to add my tool to the
   IDE menu.  I only noticed now it has a section on the Source Editor as
   well.  Opps!
   
   Could you send me more of those articles if you don't mind, the
   current one helped a lot.  I have quite a few things I want to add to
   Lazarus, and all the documentation / code samples I can find would be
   greatly appreciated.
   
   As before, you can email any attachment to my email address used it
   this message. Thanks in advance.
   
   Regards,
 - Graeme -
   
   
   On 2/26/06, Michael Van Canneyt [EMAIL PROTECTED] wrote:
   
   
On Sun, 26 Feb 2006, Graeme Geldenhuys wrote:
   
 Hi,

 Is there any wiki site or other documentation for CodeTools?  I am
 trying to convert some of the GExpert tools from Delphi to Lazarus. 
 I am looking at the Code Explorer in Lazarus as an example which is
 helping...
   
I think I already sent you an article which partly explains what you
need. If you want I can send more of these. It explains how to
implement one of the GExpert buttons (jump to interface uses,
implementation uses etc) and how to place it on a toolbar in the IDE
source code window.
   
Mattias, did I send you the code for that, or not ?
   
Michael.
   
_
 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
   
  
  _
   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
 

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


Re: Why is this throwing an exception - ANSWER

2006-02-26 Thread Mattias Gaertner
On Sun, 26 Feb 2006 17:13:24 +0200
A.J. Venter [EMAIL PROTECTED] wrote:

 Patch as per Mattias' suggestion attached, 
 I tested it and verified that it fixes the problem allowing derivative 
 components of ipHtmlPanel to be created and used.

I applied only the ippanel change.

Mattias

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


Re: Why is this throwing an exception - ANSWER

2006-02-26 Thread A.J. Venter


 I applied only the ippanel change.

As far as I know that should have been the only one anyway though it seems the 
tutorial on patch creation should be expanded to include make clean before 
creating a patch.

A.J.

-- 
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

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


Re: [lazarus] TListBox and Font properties

2006-02-26 Thread Panagiotis Sidiropoulos
It is gtk2, when I just compile with gkt2 instead of gtk1, owner draw
functionality is just disabled so, it is not a Lazarus implementation,
right?

Panagiotis

Στις 26-02-2006, ημέρα Κυρ, και ώρα 19:18 +0200, ο/η Panagiotis
Sidiropoulos έγραψε:
  AFAIK it is not yet implemented.
  If you want to implement it and have questions, don't hesitate to ask.
 
 But I had this option (OWNER DRAW AT LEAST) while using Lazarus 0.9.8,
 FPC 2.0.0 and GTK1. Is it possible for this to be missing on a next
 version? (Lazarus 0.9.13, FPC 2.0.2, GTK2).
 
 Panagiotis
 
 Στις 26-02-2006, ημέρα Κυρ, και ώρα 13:50 +0100, ο/η Mattias Gaertner
 έγραψε:
  On Sun, 26 Feb 2006 16:22:04 +0200
  Panagiotis Sidiropoulos [EMAIL PROTECTED] wrote:
  
   I can't get TListBox to change font properties and enable OwnerDraw
   style. OS is Linux with gtk2.
   
   Can anyone please help?
  
  AFAIK it is not yet implemented.
  If you want to implement it and have questions, don't hesitate to ask.
  
  
  Mattias
  
  
   
   Panagiotis
   
    26-02-2006, __ __, __ __ 12:55 +0200, __/__ 
   Graeme Geldenhuys
   :
Hi Michael,

Yes you sent me lazide3.pdf thanks.  I used that to add my tool to the
IDE menu.  I only noticed now it has a section on the Source Editor as
well.  Opps!

Could you send me more of those articles if you don't mind, the
current one helped a lot.  I have quite a few things I want to add to
Lazarus, and all the documentation / code samples I can find would be
greatly appreciated.

As before, you can email any attachment to my email address used it
this message. Thanks in advance.

Regards,
  - Graeme -


On 2/26/06, Michael Van Canneyt [EMAIL PROTECTED] wrote:


 On Sun, 26 Feb 2006, Graeme Geldenhuys wrote:

  Hi,
 
  Is there any wiki site or other documentation for CodeTools?  I am
  trying to convert some of the GExpert tools from Delphi to Lazarus. 
  I am looking at the Code Explorer in Lazarus as an example which is
  helping...

 I think I already sent you an article which partly explains what you
 need. If you want I can send more of these. It explains how to
 implement one of the GExpert buttons (jump to interface uses,
 implementation uses etc) and how to place it on a toolbar in the IDE
 source code window.

 Mattias, did I send you the code for that, or not ?

 Michael.

 _
  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

   
   _
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
  
 
 _
  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] TListBox and Font properties

2006-02-26 Thread Mattias Gaertner
On Sun, 26 Feb 2006 19:51:39 +0200
Panagiotis Sidiropoulos [EMAIL PROTECTED] wrote:

 It is gtk2, when I just compile with gkt2 instead of gtk1, owner draw
 functionality is just disabled so, it is not a Lazarus implementation,
 right?

AFAIK it is not yet implemented in the LCL gtk2 interface, only in the LCL
gtk1 and win32 interface.

Mattias


 
 Panagiotis
 
  26-02-2006, __ __, __ __ 19:18 +0200, __/__ 
 Panagiotis
 Sidiropoulos :
   AFAIK it is not yet implemented.
   If you want to implement it and have questions, don't hesitate to ask.
  
  But I had this option (OWNER DRAW AT LEAST) while using Lazarus 0.9.8,
  FPC 2.0.0 and GTK1. Is it possible for this to be missing on a next
  version? (Lazarus 0.9.13, FPC 2.0.2, GTK2).
  
  Panagiotis
  
   26-02-2006, __ __, __ __ 13:50 +0100, __/__ 
  Mattias Gaertner
  :
   On Sun, 26 Feb 2006 16:22:04 +0200
   Panagiotis Sidiropoulos [EMAIL PROTECTED] wrote:
   
I can't get TListBox to change font properties and enable OwnerDraw
style. OS is Linux with gtk2.

Can anyone please help?
   
   AFAIK it is not yet implemented.
   If you want to implement it and have questions, don't hesitate to ask.
   
   
   Mattias
   
   

Panagiotis

 26-02-2006, __ __, __ __ 12:55 +0200,
__/__ Graeme Geldenhuys :
 Hi Michael,
 
 Yes you sent me lazide3.pdf thanks.  I used that to add my tool to
 the IDE menu.  I only noticed now it has a section on the Source
 Editor as well.  Opps!
 
 Could you send me more of those articles if you don't mind, the
 current one helped a lot.  I have quite a few things I want to add
 to Lazarus, and all the documentation / code samples I can find
 would be greatly appreciated.
 
 As before, you can email any attachment to my email address used
 it this message. Thanks in advance.
 
 Regards,
   - Graeme -
 
 
 On 2/26/06, Michael Van Canneyt [EMAIL PROTECTED] wrote:
 
 
  On Sun, 26 Feb 2006, Graeme Geldenhuys wrote:
 
   Hi,
  
   Is there any wiki site or other documentation for CodeTools? 
   I am trying to convert some of the GExpert tools from Delphi
   to Lazarus.  I am looking at the Code Explorer in Lazarus as
   an example which is helping...
 
  I think I already sent you an article which partly explains what
  you need. If you want I can send more of these. It explains how
  to implement one of the GExpert buttons (jump to interface uses,
  implementation uses etc) and how to place it on a toolbar in the
  IDE source code window.
 
  Mattias, did I send you the code for that, or not ?
 
  Michael.
 
  ___
  __
   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
 

_
 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
   
  
  _
   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

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


Re: [lazarus] TSqlite3Dataset

2006-02-26 Thread Luiz Americo Pereira Camara

Luiz Americo Pereira Camara escreveu:

Bogusław Brandys escreveu:

Hello,

First: I'm using FPC SVN 2.0.3 from 2006-02-24 TSqlite3Dataset version.
I know that there is some version newer then this but I'd like to 
stick with SVN.

Platform: Windows XP Home,Lazarus SVN rev.8817


I already sent a patch to fpc maillist. I'm waiting for the commit.
Why is impossible to use Edit,Post,ApplyUpdates,Refresh functions  
for TSqlite3Dataset in SQLMode ? I have defined PrimaryKey which is 
INTEGER PRIMARY KEY but is it skipped (for example ApplyUpdates has 
check for :

  if (FPrimaryKeyNo  -1) and not FSqlMode then (...)
)

So that code does not update database table at all (in SQLMode):

DB.Edit;
DB.FieldByName('Test').AsString := 'Test';
DB.Post;
DB.ApplyUpdates;
DB.Refresh;


For me it's strange because update/delete SQL should work flawless 
with SQlMode when PrimaryKey is set (even if table has not define 
primary key there is ROWID variable to obtain record ID which may be 
used for update/delete statement)


SqlMode is intended only when you want to use queries that retrieves 
data from more than one table or use field aliases. It prevines data 
corruption when using ApplyUpdates. When using queries that retrieve 
data from only one table, without using aliases, even complex ones, 
ApplyUpdates will work and SqlMode should be set to false. Notice that 
only ApplyUpdates is affected by SqlMode. All other functions you 
cited does not.


I will remove the SqlMode property since it will cause a lot of 
confusion like this and in fact it does not prevent calling ApplyUpdates 
in the cited situation. I'll make clear in the documentation (when it's 
done) that ApplyUpdates will not work in queries with fields of more 
then one table. I already have planned to extend ApplyUpdates to work 
with such queries but no time yet.


Luiz

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


Re: [lazarus] TSqlite3Dataset

2006-02-26 Thread Michael Van Canneyt


On Sun, 26 Feb 2006, Luiz Americo Pereira Camara wrote:

 Luiz Americo Pereira Camara escreveu:
  Bogus?aw Brandys escreveu:
  Hello,
 
  First: I'm using FPC SVN 2.0.3 from 2006-02-24 TSqlite3Dataset version.
  I know that there is some version newer then this but I'd like to
  stick with SVN.
  Platform: Windows XP Home,Lazarus SVN rev.8817
 
  I already sent a patch to fpc maillist. I'm waiting for the commit.
  Why is impossible to use Edit,Post,ApplyUpdates,Refresh functions
  for TSqlite3Dataset in SQLMode ? I have defined PrimaryKey which is
  INTEGER PRIMARY KEY but is it skipped (for example ApplyUpdates has
  check for :
if (FPrimaryKeyNo  -1) and not FSqlMode then (...)
  )
 
  So that code does not update database table at all (in SQLMode):
 
  DB.Edit;
  DB.FieldByName('Test').AsString := 'Test';
  DB.Post;
  DB.ApplyUpdates;
  DB.Refresh;
 
 
  For me it's strange because update/delete SQL should work flawless
  with SQlMode when PrimaryKey is set (even if table has not define
  primary key there is ROWID variable to obtain record ID which may be
  used for update/delete statement)
 
  SqlMode is intended only when you want to use queries that retrieves
  data from more than one table or use field aliases. It prevines data
  corruption when using ApplyUpdates. When using queries that retrieve
  data from only one table, without using aliases, even complex ones,
  ApplyUpdates will work and SqlMode should be set to false. Notice that
  only ApplyUpdates is affected by SqlMode. All other functions you
  cited does not.
 
 I will remove the SqlMode property since it will cause a lot of
 confusion like this and in fact it does not prevent calling ApplyUpdates
 in the cited situation. I'll make clear in the documentation (when it's
 done) that ApplyUpdates will not work in queries with fields of more
 then one table. I already have planned to extend ApplyUpdates to work
 with such queries but no time yet.

Maybe it's easier to revert your component to SQLDb.

SQLDB has a working ApplyUpdates, even for queries
with fields of more than one table.
You would then also have parameter support and so on.

Michael.

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


Re: [lazarus] TListBox and Font properties

2006-02-26 Thread Panagiotis Sidiropoulos
 AFAIK it is not yet implemented in the LCL gtk2 interface, only in the LCL
 gtk1 and win32 interface.

Does it need any special implementation? Why this for gtk1 can't work on
gtk2? Maybe it is a silly question, I don't know. How someone can find
infromation on how to do such things?

Panagiotis

Στις 26-02-2006, ημέρα Κυρ, και ώρα 17:05 +0100, ο/η Mattias Gaertner
έγραψε:
 On Sun, 26 Feb 2006 19:51:39 +0200
 Panagiotis Sidiropoulos [EMAIL PROTECTED] wrote:
 
  It is gtk2, when I just compile with gkt2 instead of gtk1, owner draw
  functionality is just disabled so, it is not a Lazarus implementation,
  right?
 
 AFAIK it is not yet implemented in the LCL gtk2 interface, only in the LCL
 gtk1 and win32 interface.
 
 Mattias
 
 
  
  Panagiotis
  
   26-02-2006, __ __, __ __ 19:18 +0200, __/__ 
  Panagiotis
  Sidiropoulos :
AFAIK it is not yet implemented.
If you want to implement it and have questions, don't hesitate to ask.
   
   But I had this option (OWNER DRAW AT LEAST) while using Lazarus 0.9.8,
   FPC 2.0.0 and GTK1. Is it possible for this to be missing on a next
   version? (Lazarus 0.9.13, FPC 2.0.2, GTK2).
   
   Panagiotis
   
    26-02-2006, __ __, __ __ 13:50 +0100, __/__ 
   Mattias Gaertner
   :
On Sun, 26 Feb 2006 16:22:04 +0200
Panagiotis Sidiropoulos [EMAIL PROTECTED] wrote:

 I can't get TListBox to change font properties and enable OwnerDraw
 style. OS is Linux with gtk2.
 
 Can anyone please help?

AFAIK it is not yet implemented.
If you want to implement it and have questions, don't hesitate to ask.


Mattias


 
 Panagiotis
 
  26-02-2006, __ __, __ __ 12:55 +0200,
 __/__ Graeme Geldenhuys :
  Hi Michael,
  
  Yes you sent me lazide3.pdf thanks.  I used that to add my tool to
  the IDE menu.  I only noticed now it has a section on the Source
  Editor as well.  Opps!
  
  Could you send me more of those articles if you don't mind, the
  current one helped a lot.  I have quite a few things I want to add
  to Lazarus, and all the documentation / code samples I can find
  would be greatly appreciated.
  
  As before, you can email any attachment to my email address used
  it this message. Thanks in advance.
  
  Regards,
- Graeme -
  
  
  On 2/26/06, Michael Van Canneyt [EMAIL PROTECTED] wrote:
  
  
   On Sun, 26 Feb 2006, Graeme Geldenhuys wrote:
  
Hi,
   
Is there any wiki site or other documentation for CodeTools? 
I am trying to convert some of the GExpert tools from Delphi
to Lazarus.  I am looking at the Code Explorer in Lazarus as
an example which is helping...
  
   I think I already sent you an article which partly explains what
   you need. If you want I can send more of these. It explains how
   to implement one of the GExpert buttons (jump to interface uses,
   implementation uses etc) and how to place it on a toolbar in the
   IDE source code window.
  
   Mattias, did I send you the code for that, or not ?
  
   Michael.
  
   ___
   __
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
  
 
 _
  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

   
   _
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
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at 

Re: [lazarus] TListBox and Font properties

2006-02-26 Thread A.J. Venter
On Sunday 26 February 2006 21:36, Panagiotis Sidiropoulos wrote:
  AFAIK it is not yet implemented in the LCL gtk2 interface, only in the
  LCL gtk1 and win32 interface.

 Does it need any special implementation? Why this for gtk1 can't work on
 gtk2? Maybe it is a silly question, I don't know. How someone can find
 infromation on how to do such things?

The short version is because the LCL is NOT the interface it is using, lazarus 
compiling to GTK1 does not mean you are using GTK1. You are still compiling 
your program against the LCL, the LCL uses some or other widget set for 
rendering but the LCL itself has to implement the calls to let that widget 
set do whatever is needed. 
Right now I believe the win32 and GTK1 interfaces are by far the most complete 
since they are the oldest ones, carbon, qt and gtk2 are all in a much more 
immature state. 
The big thing is that you have the Object Pascal way of telling components how 
to behave on one side, and whatever method is typical in the widget set on 
the other side - the LCL basically translates the one to the other - so the 
translation to GTK1 for ownerdraw isn't the same as for GTK2 because GTK2 
doesn't use the same calls as GTK1 did.

With me so far ?

Right now GTK2 is actually more complete than QT and Carbon mostly because a 
lot of the calls are similar to the highly mature GTK1 which allowed for a 
faster conversion, but it is not I think production ready. 
I have tried it and there are some glaring problems, the worst for me is that 
the GTK2 LCL has some kind of issue in event handling - a LOT of events just 
disappear into the bitbucket and nothing annoys a user as much as clicking a 
button and nothing happens, it is also MUCH slower than the GTK1 version but 
it IS improving and I don't think it will be very long before you CAN use it 
for production work.

Now, you seem interested in helping to shorten that time, the place to start 
is the layout and readme text files in the LCL subdirectory of your lazarus 
source tree, get an idea of how the LCL interfaces are laid out, then go into 
the subdirectory that implements your target widget set and start hacking the 
code, when you are done, recompile lazarus and try it out, repeat.

Ciao
A.J.
-- 
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

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


Re: [lazarus] TListBox and Font properties

2006-02-26 Thread Panagiotis Sidiropoulos
 Now, you seem interested in helping to shorten that time, the place to start 
 is the layout and readme text files in the LCL subdirectory of your lazarus 
 source tree, get an idea of how the LCL interfaces are laid out, then go into 
 the subdirectory that implements your target widget set and start hacking the 
 code, when you are done, recompile lazarus and try it out, repeat.

I will try it, can't promise anything, I need to check my skills on this
level.

Panagiotis


Στις 26-02-2006, ημέρα Κυρ, και ώρα 19:48 +0200, ο/η A.J. Venter έγραψε:
 On Sunday 26 February 2006 21:36, Panagiotis Sidiropoulos wrote:
   AFAIK it is not yet implemented in the LCL gtk2 interface, only in the
   LCL gtk1 and win32 interface.
 
  Does it need any special implementation? Why this for gtk1 can't work on
  gtk2? Maybe it is a silly question, I don't know. How someone can find
  infromation on how to do such things?
 
 The short version is because the LCL is NOT the interface it is using, 
 lazarus 
 compiling to GTK1 does not mean you are using GTK1. You are still compiling 
 your program against the LCL, the LCL uses some or other widget set for 
 rendering but the LCL itself has to implement the calls to let that widget 
 set do whatever is needed. 
 Right now I believe the win32 and GTK1 interfaces are by far the most 
 complete 
 since they are the oldest ones, carbon, qt and gtk2 are all in a much more 
 immature state. 
 The big thing is that you have the Object Pascal way of telling components 
 how 
 to behave on one side, and whatever method is typical in the widget set on 
 the other side - the LCL basically translates the one to the other - so the 
 translation to GTK1 for ownerdraw isn't the same as for GTK2 because GTK2 
 doesn't use the same calls as GTK1 did.
 
 With me so far ?
 
 Right now GTK2 is actually more complete than QT and Carbon mostly because a 
 lot of the calls are similar to the highly mature GTK1 which allowed for a 
 faster conversion, but it is not I think production ready. 
 I have tried it and there are some glaring problems, the worst for me is that 
 the GTK2 LCL has some kind of issue in event handling - a LOT of events just 
 disappear into the bitbucket and nothing annoys a user as much as clicking a 
 button and nothing happens, it is also MUCH slower than the GTK1 version but 
 it IS improving and I don't think it will be very long before you CAN use it 
 for production work.
 
 Now, you seem interested in helping to shorten that time, the place to start 
 is the layout and readme text files in the LCL subdirectory of your lazarus 
 source tree, get an idea of how the LCL interfaces are laid out, then go into 
 the subdirectory that implements your target widget set and start hacking the 
 code, when you are done, recompile lazarus and try it out, repeat.
 
 Ciao
 A.J.

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


Re: [lazarus] TSqlite3Dataset

2006-02-26 Thread Michael Van Canneyt


On Sun, 26 Feb 2006, Luiz Americo Pereira Camara wrote:

 Michael Van Canneyt escreveu:
  Maybe it's easier to revert your component to SQLDb.
 
 Probably not. As i said is just a question of time. The design is
 already on my mind and the implementation seems not to be difficult.
  SQLDB has a working ApplyUpdates, even for queries
  with fields of more than one table.
 
 In my experience sqldb.ApplyUpdates is not working at all:
 http://www.freepascal.org/bugs/showrec.php3?ID=4725.
 And its internals is somewhat slower(the results are in miliseconds):
 http://www.geocities.com/camara_luiz/sqlite4fpc/benchmarks.html.

These results are very strange. I am writing articles about
embedded databases, and while for simple queries, Sqlite
is really fast, for complicated queries, it's a factor 12
or more  _slower_ than either mysql or firebird.

I'm talking about running 600.000 queries here, inserting
over 600.000 records. (and yes, I did optimize transactions
and so on)

  You would then also have parameter support and so on.
 
 Anyway, i think that sqldb and TSqliteDataset are for different
 purposes. While the first offers full support to Client/Server
 databases, transactions, rollbacks etc., the second is good for
 Desktop/embedded applications that need to manipulate data. Also
 TSqliteDataset offers the ability to easily (with few lines of code)
 create databases at runtime, even in disk or in memory databases (using
 filename ':memory:').

The outcome of my investigations is unfortunately not so favourable
for the combination sqlite/pascal ;-)

Michael.

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


Re: [lazarus] TSqlite3Dataset

2006-02-26 Thread Luiz Americo Pereira Camara

Bogusław Brandys escreveu:
But why Post is not working for TSqlite3Dataset ? ApplyUpdates seems 
to be rather for remote server (Delphi help : Changes made to the 
client dataset’s local copy of data are not sent to the application 
server until the client application calls the ApplyUpdates method for 
the dataset.)  , while sqlite is more desktop database I think.
This is by design, TSqliteDataset, and also sqldb,  caches the data in 
memory and works with them until the database is updated with 
ApplyUpdates or custom Sql statements.This allows to send the changes to 
database all together at same time. Sending the changes at each Post 
would degrade the performance significantly. But you do it easily: just 
add a OnAfterPost handler that calls ApplyUpdates.


Sqlite is the midterm of Desktop (TDbf) and full RDMS 
(Mysql,Postgresql). It inherits  characteristics of both, for good :-)  
or for bad :-( . 


Also I  found a bug:
when I do TSqlite3Dataset.Cancel it doesn't revert value displayed in 
DB controls connected to this dataset to previous state (to value 
stored in database) This cause out of sync - value displayed is that 
last modified by user while in database nothing was changed 
(fortunately - if Dataset.Cancel would allow to post changes on Cancel 
that will be more nasty bug)

Add a bugreport in fpc bugtracker.
In the mean time hook AfterCancel with RefetchData

Luiz

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


Re: [lazarus] TSqlite3Dataset

2006-02-26 Thread Bogusław Brandys

Bogusław Brandys wrote:

Luiz Americo Pereira Camara wrote:

Michael Van Canneyt escreveu:

Maybe it's easier to revert your component to SQLDb.
  
Probably not. As i said is just a question of time. The design is 
already on my mind and the implementation seems not to be difficult.

SQLDB has a working ApplyUpdates, even for queries
with fields of more than one table.
  
In my experience sqldb.ApplyUpdates is not working at all: 
http://www.freepascal.org/bugs/showrec.php3?ID=4725.
And its internals is somewhat slower(the results are in miliseconds): 
http://www.geocities.com/camara_luiz/sqlite4fpc/benchmarks.html.

You would then also have parameter support and so on.
  
Anyway, i think that sqldb and TSqliteDataset are for different 
purposes. While the first offers full support to Client/Server 
databases, transactions, rollbacks etc., the second is good for 
Desktop/embedded applications that need to manipulate data. Also 
TSqliteDataset offers the ability to easily (with few lines of code) 
create databases at runtime, even in disk or in memory databases 
(using filename ':memory:').


Luiz



But why Post is not working for TSqlite3Dataset ? ApplyUpdates seems to 
be rather for remote server (Delphi help : Changes made to the client 
dataset’s local copy of data are not sent to the application server 
until the client application calls the ApplyUpdates method for the 
dataset.)  , while sqlite is more desktop database I think.


Also I  found a bug:
when I do TSqlite3Dataset.Cancel it doesn't revert value displayed in DB 
controls connected to this dataset to previous state (to value stored in 
database) This cause out of sync - value displayed is that last modified 
by user while in database nothing was changed (fortunately - if 
Dataset.Cancel would allow to post changes on Cancel that will be more 
nasty bug)


Best Regards
Boguslaw



Ok,I understand that because sqlite is purely SQL based it may be 
difficult to allow Cancel to work properly but in fact without proper 
Cancel method - it does not make sense to me creating full dataset 
descendant for sqlite.


One solution would be duplicated buffer for previous posted value for 
revering or simply (better) reget current row from database



Regards
Boguslaw

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


Re: [lazarus] TSqlite3Dataset

2006-02-26 Thread Luiz Americo Pereira Camara

Michael Van Canneyt escreveu:

On Sun, 26 Feb 2006, Luiz Americo Pereira Camara wrote:

  

Michael Van Canneyt escreveu:


Maybe it's easier to revert your component to SQLDb.

  

Probably not. As i said is just a question of time. The design is
already on my mind and the implementation seems not to be difficult.


SQLDB has a working ApplyUpdates, even for queries
with fields of more than one table.

  

In my experience sqldb.ApplyUpdates is not working at all:
http://www.freepascal.org/bugs/showrec.php3?ID=4725.
And its internals is somewhat slower(the results are in miliseconds):
http://www.geocities.com/camara_luiz/sqlite4fpc/benchmarks.html.



These results are very strange. I am writing articles about
embedded databases, and while for simple queries, Sqlite
is really fast, for complicated queries, it's a factor 12
or more  _slower_ than either mysql or firebird.

  

You are welcome to run my benchmarks yourself.

I'm talking about running 600.000 queries here, inserting
over 600.000 records. (and yes, I did optimize transactions
and so on)

  
Are you sending the Sql statements using plain sqlite functions 
(sqlite_exec) or the TSqliteDataset ones (ExecSql and ApplyUpdates)?
I found that significant part of the time when sending sql statements is 
wasted in the Sql statement building (String concatenation)


Did you use the sqldb components to test mysql and firebird?

Can you post the source of the tests (also Mysql and firebird ones)?
I can try with the new version of TSqliteDataset.

Anyway inserting/updating 60 records are not common use of Desktop 
applications ;-)

You would then also have parameter support and so on.

  

Anyway, i think that sqldb and TSqliteDataset are for different
purposes. While the first offers full support to Client/Server
databases, transactions, rollbacks etc., the second is good for
Desktop/embedded applications that need to manipulate data. Also
TSqliteDataset offers the ability to easily (with few lines of code)
create databases at runtime, even in disk or in memory databases (using
filename ':memory:').



The outcome of my investigations is unfortunately not so favourable
for the combination sqlite/pascal ;-)
  
I'd like to point that Sqlite (the library itself) is not adequate to 
all scenarios. It has your specific indications as MySql, PostGreSql, 
Oracle also has yours. See http://www.sqlite.org/whentouse.html


Luiz

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


Re: [lazarus] transparent forms

2006-02-26 Thread Vincent Snijders

Felipe Monteiro de Carvalho wrote:

On 2/25/06, Vincent Snijders [EMAIL PROTECTED] wrote:


The magnifier uses a borderless form with the size of a the desktop, and
before showing the form it copies the background from the screen. The
background is frozen after that.




I only made it the size of the desktop to improve the drawing speed.
On the first versions it wasn't the size of the screen and worked the
same way, but the painting of the border was kind of slow on old
computers. Not a problem for most software.



My point was that the backgound is frozen, at least for version I tried. 
 Try showing a clock and magnify it with the magnifier, the seconds 
didn't move. At first I didn't know this, and I wondered why I didn't 
see the debug messages on the screen.


Vincent

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


Re: [lazarus] TListView selection

2006-02-26 Thread George Lober

[EMAIL PROTECTED] wrote:


It's supposed to be a patch to fix it permanently. I was working on it
some months ago but never come around to submitting the patch. If memory
serves me right there is however still an issue but I cannot remember
exactly what. Anyway it works with me.
I'm not good with widgetsets so hopefully someone with more knowledge can
asses it better.

Darius

 


[EMAIL PROTECTED] wrote:

   


George,

This feature does not work under win32. I have attached a patch that
should fix this.

Darius



 


Hi,

I have a bit of a problem. I have a form which has two TListViews. I
need to make a selection on each one and have it remained selected on
both while clicking on other components. Under Windows this does not
happen. When I click on a ListView the previously selected one
unselects. Clicking on a TEdit box also unselects the ListView. I
suppose having one thing focused at a time is desirable most of the
time, but is a problem for me in this case. This doesn't apply to Linux
where its the other way around. Any Suggestions ?

Thanks,
George



   


Thanks for the quick response. When you say 'This feature does not work
under win32', Is your patch a permanent  fix meant for Lazarus, or are
you  suggesting for me to use only ?

George

   




Hate to be a nag, but is somebody going to implement the patch ?

I tried applying it myself but couldn't do it either under Windows or 
Linux.  Maybe the patch is too old ?


Thanks,
George

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


Re: [lazarus] TListView selection

2006-02-26 Thread Darius Blaszijk
 Maybe the patch is too old ?

It's patched against SVN, so I guess not ;)

Darius

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


Re: [lazarus] transparent forms

2006-02-26 Thread Felipe Monteiro de Carvalho
 My point was that the backgound is frozen, at least for version I tried.
   Try showing a clock and magnify it with the magnifier, the seconds
 didn't move. At first I didn't know this, and I wondered why I didn't
 see the debug messages on the screen.

Yes, the background is frosen, but you don't need to use a full screen
form. If your form isn't fullscreen, the parts inside your window
which are transparent will still be frosen, but the rest of the
screen won't.

There is no really good or easy way to go around this unless you use
the more powerfull platform specific methods, which are:

DirectX on windows
X Composite extension on very new X.Org's on Linux
Aqua on Mac OS X

--
Felipe Monteiro de Carvalho

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


[lazarus] example of memdataset and dbgrid?

2006-02-26 Thread Dale Welch
does anyone have an example of memdataset and dbgrid ?
i would greatly appreciate.  It has been 6 years since i did database 
programming with delphi
and i could really use a working example program in lazarus if anyone has it.

thanks,

dale welch

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


Re: [lazarus] TListView selection

2006-02-26 Thread George Lober

Darius Blaszijk wrote:


Maybe the patch is too old ?
   



It's patched against SVN, so I guess not ;)
 



Applying the patch in the lcl directory, the output of 'patch --dry-run 
 listview.diff' under Windows is:


patching file `comctrls.pp'
can't find file to patch at input line 18
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|Index: lcl\interfaces\win32\win32wscustomlistview.inc
|===
|--- lcl\interfaces\win32\win32wscustomlistview.inc (revision 8784)
|+++ lcl\interfaces\win32\win32wscustomlistview.inc (working copy)
--
File to patch: 
Skip this patch? [y] 
Skipping patch.

3 out of 3 hunks ignored


Under Linux:

patching file comctrls.pp
Hunk #1 FAILED at 950.
1 out of 1 hunk FAILED -- saving rejects to file comctrls.pp.rej
can't find file to patch at input line 18
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|Index: lcl/interfaces/win32/win32wscustomlistview.inc
|===
|--- lcl/interfaces/win32/win32wscustomlistview.inc (revision 8784)
|+++ lcl/interfaces/win32/win32wscustomlistview.inc (working copy)
--
File to patch: 
Skip this patch? [y] 
Skipping patch.
3 out of 3 hunks ignored 




Under Windows the comctrls.pp part seems to go OK, and then there is a 
problem with win32wscustomlistview.inc. Under Linux it looks similar, 
but the reference to 950 would seem to be a problem with comctrls.pp as 
well as win32wscustomlistview.inc.


What am I doing wrong ?

George

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