file preview

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

file preview

Postby Hal » Mon Feb 02, 2009 4:02 pm

I would like to allow the user to choose a file, then show the user a preview of that file.
I am using VAST 7.5.2
I only need this to work on Windows, so an OLE solution would be acceptable.

I hope I am making this more complicated than it has to be.

Googling led me to the WebBrowser Control. Is this the best solution? ... x?mfr=true

In the past, I have generated non-visual OLE wrappers for COM/OLE components (I in no way an expert in those technologies, so may be mis-using some terms), but I can't figure out how to generate an OLE wrapper for the WebBrowser control that will let me add a preview area to a window. What am I missing?

I found a reference to the OleExamples application, and found an #examplesForLauncher method, but that method has no senders.
This code seemed promising: "OlexContainerExample new open"
But menu option File->Open... looks for *.CON files (I don't know what those are supposed to be)
Menu option Edit -> Insert Object... allows me to "Create from File" (which sounds like exactly what I want), but that just locks up the development environment until I terminate the develop environment process.

Any tips or hints would be greatly appreciated.
Posts: 18
Joined: Wed Jun 06, 2007 7:30 am

Re: WebBrowser Control

Postby jkoepp » Tue Feb 03, 2009 3:49 am

Hallo Hal,

For the Windows Webbrowser control you need the OLE Class Generator. See for instance in the help, VisualAge User's Guide, Wrapping OLE controls. First you have to load the Feature VA OLE Support with ConfigMap AbtOleEdit. Then open the VisualAge Organizer, select the application to put in the ole wrapper code. Then in the classes window context menu there is an item Generate >> OLE Wrapper which opens the OLE Class Generator.

There select Controls and find Shell.Explorer.2

On Marten Feldmann's pages you find the IEMozillaExample and an enhanced OLE Class Generator too, but I guess you dont need it.

Posts: 9
Joined: Mon Mar 31, 2008 4:40 am

Re: file preview

Postby Hal » Tue Feb 03, 2009 7:28 am

Thank you very much for the quick response. I was missing several things
1) I was not choosing the correct prog id (#clientName)
2) In the OLE Class Generator, I had to choose "Code generation options" of "View"
3) then use "Add Part..." in the Composition Editor to add the generated OLE wrapper to the visual part of a window.
Posts: 18
Joined: Wed Jun 06, 2007 7:30 am

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest