On 28/02/2012 00:46, Paul Ishenin wrote:
28.02.2012 3:01, Martin пишет:Defining a property in the interface section (outside a class), that refers to methods in another unit, gives an *unexpected* error. It may well be not allowed and then should give an error, but the right error in the right place.Btw, only tested with 2.4.4, apologies if that is fixed in 2.6.0
verified with 2.6 too
property Foo: TObject read FunctionFromOtherUnit; // OtherUnit is in usesThe compiler passes that line without error. But when trying to read the property UnitFoo.pas(999,3) Error: Wrong number of parameters specified for call to "FunctionFromOtherUnit"Can you submit a more complete example?
Attached. It needed 3 units,accessing Foo in the same unit, in which it is declared (unit2) compiles (not tested if it runs...)
New Folder.rar
Description: Binary data
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel