Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002073 [JEDI VCL] 00 JVCL Components major always 2004-08-20 01:14 2006-06-19 06:24
Reporter maxp View Status public  
Assigned To ivan_ra
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0002073: OLE automation support does not work correctly in JvInterpreter
Description Run JvInterpreterTest. Select 'sample - excel.pas'. Try to run. First error (type mismatch) occurs in line
"Cell.Value := 'Line ' + Line;"
After changing this line to
"Cell.Value := 'Line ' + IntToStr(Line);"
this part works, but it is definitely incorrect behaviour, because Cell.Value should behave as Variant type.
The second error (OLE error 800A03EC occurs in lines
Range := ExcelWindow.Range(ExcelWindow.Cells(1, 1),
                          ExcelWindow.Cells(LineCount + 1, ColumnCount + 1));

and so on.
Additional Information
Tags No tags attached.
Attached Files ? file icon JvInterpreter.pas.patch [^] (678 bytes) 2006-05-31 03:35

- Relationships
related to 0003730resolvedivan_ra JvInterpreter memory leak 

-  Notes
maxp (reporter)
2006-05-30 11:56

It seems that in the last JVCL version all is OK.
ivan_ra (developer)
2006-05-31 02:55

This was fixed in revision 10586 (example 'sample - excel.pas').

But JvInterpreter still incompatible with Delphi ole automation call sintaxis: in Delphi we write Excel.Cells[1,2], but in JvInterpreter scripts we must write Excel.Cells(1,2).
In Delphi square brackets [] in OLE call means property, and compiler calls DispInvoke with DISPATCH_PROPERTYGET flag; In other hand, round brackets ()means method call (DispInvoke called with DISPATCH_METHOD or sometimes with DISPATCH_METHOD or DISPATCH_PROPERTYGET).
Thats why correct Delphi sintaxis is:

In JvInterpreter scripts call "Excel.Cells[1,2]" not works.
This is fixible (some work with TJvInterpreterAdapter.DispatchCall and TJvInterpreterAdapter.GetValue), and I can do it. But this is problem: people who works with with JvInterpreter already have scripts, which can become unworkable after JvInterpreter fix. So, I suggest for a while to permit both types of OLE call:
In this case tvery OLE call will be with DISPATCH_METHOD or DISPATCH_PROPERTYGET flag.

Any comments?
maxp (reporter)
2006-05-31 03:09

IMHO, it would be better do not make overfixes since the current realization is working. Anyway JvInterpreter syntax is not 100% compartible with Delphi.
ivan_ra (developer)
2006-05-31 03:39

This is patch allowing both types of OLE call:
Excel.Cells[1,2] // legal Delphi call
Excel.Cells(1,2) // old JvInterpreter call

There is no additional property/method control, so functionality only extended
obones (administrator)
2006-06-09 05:24

Ivan, can this be marked as resolved?
ivan_ra (developer)
2006-06-09 05:42

I can commit it into SVN, but my work file also includes solution for 0003730. Waiting for response
obones (administrator)
2006-06-09 06:19

Then please do it when you get the answer.
ivan_ra (developer)
2006-06-19 06:24

this is now in SVN

- Issue History
Date Modified Username Field Change
2004-08-20 01:14 maxp New Issue
2006-05-30 11:56 maxp Note Added: 0009363
2006-05-31 02:55 ivan_ra Note Added: 0009366
2006-05-31 02:55 ivan_ra Status new => feedback
2006-05-31 03:09 maxp Note Added: 0009367
2006-05-31 03:35 ivan_ra File Added: JvInterpreter.pas.patch
2006-05-31 03:39 ivan_ra Note Added: 0009368
2006-06-09 05:24 obones Note Added: 0009534
2006-06-09 05:42 ivan_ra Note Added: 0009540
2006-06-09 06:16 obones Relationship added related to 0003730
2006-06-09 06:19 obones Note Added: 0009548
2006-06-19 06:24 ivan_ra Status feedback => resolved
2006-06-19 06:24 ivan_ra Fixed in Version => Daily / SVN
2006-06-19 06:24 ivan_ra Resolution open => fixed
2006-06-19 06:24 ivan_ra Assigned To => ivan_ra
2006-06-19 06:24 ivan_ra Note Added: 0009603

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker