Anonymous | Login | Signup for a new account | 2019-02-18 00:12 CET |
Main | My View | View Issues | Change Log | Roadmap | Docs |
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 |
![]() |
||||||
|
![]() |
||||||
|
![]() |
|
(0009363) maxp (reporter) 2006-05-30 11:56 |
It seems that in the last JVCL version all is OK. |
(0009366) 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: Excel.Cells[1,2] Excel.ActiveWorkbook.SaveAs('text.xls'); 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: Excel.Cells[1,2] Excel.Cells(1,2) In this case tvery OLE call will be with DISPATCH_METHOD or DISPATCH_PROPERTYGET flag. Any comments? |
(0009367) 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. |
(0009368) 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 |
(0009534) obones (administrator) 2006-06-09 05:24 |
Ivan, can this be marked as resolved? |
(0009540) 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 |
(0009548) obones (administrator) 2006-06-09 06:19 |
Then please do it when you get the answer. |
(0009603) ivan_ra (developer) 2006-06-19 06:24 |
this is now in SVN |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |