Re: Why is this throwing an exception - ANSWER

2006-02-27 Thread Vincent Snijders

A.J. Venter wrote:

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.




That would not have helped in this case, because most of your changes were because 
of local changes to files in the repository.


Vincent.

_
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-27 Thread A.J. Venter
On Monday 27 February 2006 18:19, Vincent Snijders wrote:
 A.J. Venter wrote:
 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.

 That would not have helped in this case, because most of your changes were
 because of local changes to files in the repository.

 Vincent.

Then I really dunno what I did wrong because that was the ONLY changed file at 
the time, at least the only one *I* had changed - does lazarus change files 
during runtime or installing of packages ?
How SHOULD I have created the 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: Why is this throwing an exception - ANSWER

2006-02-27 Thread Mattias Gaertner
On Mon, 27 Feb 2006 18:24:09 +0200
A.J. Venter [EMAIL PROTECTED] wrote:

 On Monday 27 February 2006 18:19, Vincent Snijders wrote:
  A.J. Venter wrote:
  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.
 
  That would not have helped in this case, because most of your changes
  were because of local changes to files in the repository.
 
  Vincent.
 
 Then I really dunno what I did wrong because that was the ONLY changed
 file at  the time, at least the only one *I* had changed - does lazarus
 change files  during runtime or installing of packages ?
 How SHOULD I have created the patch ?

Not your fault.
The IDE was not optimized and recreated the Makefiles, even if it was not
neccessary.
This has been improved a few weeks ago.


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
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: 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: Why is this throwing an exception - ANSWER

2006-02-25 Thread Mattias Gaertner
On Thu, 23 Feb 2006 18:05:07 +0200
A.J. Venter [EMAIL PROTECTED] wrote:

 It's a bug in ipro.
 I checked the code at the stack trace and found this:
 function TIpHtmlInternalPanel.HtmlPanel: TIpHtmlCustomPanel;
 begin
 Result := TIpHtmlPanel(Parent);
   while (Result.ClassType  TIpHtmlPanel) do
 Result := TIpHtmlPanel(Result.Parent);
 end;
 
 The exception gets thrown in the while line.

It means, the TIpHtmlInternalPanel expects to have a TIpHtmlCustomPanel
parent.
It should be

   while not (Result is TIpHtmlPanel) do

 
 Now WHY they do it this way I do not know, but it means you get a real
 problem  if you derive a component from it.
 I commented out the lines in the function like so:
 function TIpHtmlInternalPanel.HtmlPanel: TIpHtmlCustomPanel;
 begin
 //Result := TIpHtmlPanel(Parent);
 //  while (Result.ClassType  TIpHtmlPanel) do
 //Result := TIpHtmlPanel(Result.Parent);
 end;
 
 And now my test program works as beautifully as you could wish.

?
But now the Result is undefined.

 
 From the context I get the idea this is somehow used if you wish to embed
 two  htmlpanels inside one another, which doesn't affect me - but the
 method they  are using is NOT good because it causes crashes if you derive
 anything (which  changes the classtype of course).
 
 So do I report a bug ? Or how does this get fixed ?

Please check above fix. If it works, I will change it.

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-25 Thread A.J. Venter

 
  So do I report a bug ? Or how does this get fixed ?

 Please check above fix. If it works, I will change it.

Well I have since redesigned my entire component so it is no longer descended 
from TIpHtmlPanel, and it is in a fully working state based on a very 
different approach. However I do think the fix should be applied because I am 
doubtlessly not the last person to try and descend the class :)

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-23 Thread A.J. Venter
It's a bug in ipro.
I checked the code at the stack trace and found this:
function TIpHtmlInternalPanel.HtmlPanel: TIpHtmlCustomPanel;
begin
Result := TIpHtmlPanel(Parent);
  while (Result.ClassType  TIpHtmlPanel) do
Result := TIpHtmlPanel(Result.Parent);
end;

The exception gets thrown in the while line.

Now WHY they do it this way I do not know, but it means you get a real problem 
if you derive a component from it.
I commented out the lines in the function like so:
function TIpHtmlInternalPanel.HtmlPanel: TIpHtmlCustomPanel;
begin
//Result := TIpHtmlPanel(Parent);
//  while (Result.ClassType  TIpHtmlPanel) do
//Result := TIpHtmlPanel(Result.Parent);
end;

And now my test program works as beautifully as you could wish.

From the context I get the idea this is somehow used if you wish to embed two 
htmlpanels inside one another, which doesn't affect me - but the method they 
are using is NOT good because it causes crashes if you derive anything (which 
changes the classtype of course).

So do I report a bug ? Or how does this get fixed ?

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