View Issue Details

IDProjectCategoryView StatusLast Update
0002676JEDI VCL00 JVCL Componentspublic2006-04-05 01:17
ReporterfoxyAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.30 
Summary0002676: JvInterpreter: Call of derived methods does not work
DescriptionI have defined a new class TRemoteQuery, descendent of TClientDataSet, which is desendent of TDataSet.
I have also defined my method TRemoteQuery.Open.
But instead of calling my new method TRemoteQuery.Open, JvInterpreter calls TDataSet.Open method.

The problem is in GetMethod function of TJvInterpreterAdapter.GetValue method.
After calling FGetList.Find(Identifier, i) function,
it checks (((Args.ObjTyp = varObject) and (Args.Obj is JvInterpreterMethod.FClassType))...

Open method of TDataSet is situated in FGetList list prior to TRemoteQuery.Open method, so it will be checked first.

Now, since TRemoteQuery is descendent of TDataSet, then "Args.Obj is JvInterpreterMethod.FClassType" will return true, which will cause the *WRONG* method to be called (instead of TRemoteQuery.Open);

I have attached the modifications of GetMethod function and FGetList.Find() method that will avoid this problem (check my comments);
TagsNo tags attached.

Activities

2005-02-21 14:26

 

GetMethod_and_Find.pas (2,594 bytes)

obones

2005-02-25 05:21

administrator   ~0006579

Which version of the JVCL are you using ?

foxy

2005-02-25 08:13

reporter   ~0006587

JVCL 3.00 RC 1

obones

2006-03-30 05:22

administrator   ~0008750

Thanks, this is now confirmed as working.
It will be in CVS as soon as SourceForge fixes the issues with CVS.

obones

2006-04-05 01:17

administrator   ~0008924

This is now in CVS

Issue History

Date Modified Username Field Change
2005-02-21 14:26 foxy New Issue
2005-02-21 14:26 foxy File Added: GetMethod_and_Find.pas
2005-02-25 05:20 obones Summary Calling methods of descendent classes => JvInterpreter: Call of derived methods does not work
2005-02-25 05:21 obones Note Added: 0006579
2005-02-25 05:21 obones Status new => feedback
2005-02-25 08:13 foxy Note Added: 0006587
2006-03-30 05:22 obones Note Added: 0008750
2006-03-30 05:22 obones Status feedback => confirmed
2006-04-05 01:17 obones Status confirmed => resolved
2006-04-05 01:17 obones Resolution open => fixed
2006-04-05 01:17 obones Assigned To => obones
2006-04-05 01:17 obones Note Added: 0008924