Ha, while experimenting with the best error message I just found out, that OLEObject~new will give the very understandable error message:
F:\work\svn\oorexx\main\trunk\samples\windows\ole\apps>samp05.rex *-* Compiled method "INIT" with scope "OLEObject". *-* Compiled method "NEW" with scope "Object". 51 *-* Method NEW with scope "OLEObject" in package "REXX" (no source available). 52 *-* WordProApp = .OLEObject~New("WordPro.Application") Error 98 running REXX line 51: Execution error. Error 98.909: Class "WordPro.Application" not found. This is very instructive and makes my first question obsolete as there is no reason to change the samples directly with respect to the error! :) The only remark with the error above is line # 51 which is not a Rexx sourceline and also maybe its two preceding lines should not be shown in this case either? --- Still, I would like to change the Excel sample09.rex, if no one objects! ---rony On 29.03.2021 16:29, Rony G. Flatscher wrote: > > As quite a few Windows OLE-samples date back to the end of the 90's, begin of > the 00's, some > Windows applications might not exist anymore like Lotus/IBM WordPro and > Lotus/IBM Lotus 123. When > running the appropriate samples from samples\ole\apps there will be cryptic > OLE errors and - at > least some of my students - would not be able to find out what the problem > is, just, that ooRexx > does not work on their machine. > > Therefore I would suggest to add comments to the samples that inform the > interested reader what > application gets remote controlled via OLE, such that they can understand > errors, if they run > samples for applications that they have not installed on their machines. > Maybe adding a "signal on > syntax", denoting the application and using a "parse pull ." to keep the > window open , if the > application got started with a double-click from the Explorer. > > Question 1: Is there anyone who would object if I changed these apps > accordingly? > > Also, while being there, I would very much like to change the Excel-sample > (sample09.rex) in the > following way: > > * change the loop variable "j" to "line" and "i" to "column", > * rename "myTitles" to "columnTitles" fetch the column letter from the > variable "columnTitles" > with the new [] operator instead of substr, change the column title from > "title" to "columnLetter" > * changing the sum formula: replace "~translate" with the appropriate > "~changeStr" > * saving location: use environment variable "USERPROFILE" instead of > "TEMP", such that the user > will be able to locate the generated Excel spreadsheet in her home > directory > > Question 2: is there anyone who would object if I changed samp09.rex as > described? > > ---rony >
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel