marten wrote:Use the generator to create a "view" for Shell.Explorer.2 and then add this control to a normal VA form. Then connect the widget opened event of that form to the navigate-method of the control and set the url parameter to something you would like to see. You could also use the Firefox Active-X control to get the same results ...
Just some early steps to get fast success ....
Marten
Thanks for the reply. I finally figured it out.
1. By view, they mean, a subclass of AbtOleControlView.
2. I subclassed #1 first and then told the Generator to generate code to my AbtOleIEView class.
3. I followed the example they included. They create an OLE Object wrapper, and so I did the same.
4. I created a normal view-part and added the AbtOleControlView part to the form.
voila!
Basically, the reason I'm trying to do this is so we make use of the fancy HTML/Javascript calendars available outthere. I'll have to execute some javascript and inspect the results of the script in my Smalltalk code.
I really love figuring this stuff out but with Smalltalk it's always such an expedition! The documentation says "just load the samples", but it'd be nice to know how they put the samples together.
I figured out how to set variables via Javascript and read them back in Smalltalk. Simple values are passed as-is, but objects are passed back as OLEAutomationObjects.
Example (for posterity)
- Code: Select all
|date month day year |
(self document propertyAt: 'parentWindow') invoke: 'execScript' withArguments: #('myDate = new Date').
date := (self document propertyAt: 'parentWindow') propertyAt: 'myDate'.
month := date invoke: 'getMonth' withArguments: nil.
day := date invoke: 'getDate' withArguments: nil.
year := date invoke: 'getYear' withArguments: nil.
Transcript show: ((month+1) asInteger printString, '/', day asInteger printString, '/', year asInteger printString) .