There seems to be a problem in TReader.FindComponentClass - the search in FindInFieldTable does not properly include ancestors.

See attached patch

Colin
diff -uNr --exclude=.svn --exclude='*.rst' trunk/fpcsrc/rtl/objpas/classes/reader.inc trunk.w/fpcsrc/rtl/objpas/classes/reader.inc
--- trunk/fpcsrc/rtl/objpas/classes/reader.inc	2008-03-28 09:19:50.000000000 +0000
+++ trunk.w/fpcsrc/rtl/objpas/classes/reader.inc	2008-03-29 13:38:54.000000000 +0000
@@ -1470,7 +1470,7 @@
     // descendants of TComponent
     while ComponentClassType<>TComponent do begin
       FieldClassTable :=
-        PFieldTable((Pointer(RootComponent.ClassType)+vmtFieldTable)^)^.ClassTable;
+        PFieldTable((Pointer(ComponentClassType)+vmtFieldTable)^)^.ClassTable;
       if assigned(FieldClassTable) then begin
         for i := 0 to FieldClassTable^.Count -1 do begin
           Entry := FieldClassTable^.Entries[i];
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to