on 08-08-2016 7:59 PM
This problem is easy enough for us to create, and I am quite sure it was not a problem in the possibly distant past.
First, we execute the following on an empty PB "olecontrol" sitting on a window:
ole_1.insertFile ("c:\temp\test.jpg")
Then we execute the following which we hope would display the JPG picture:
ole_1.activate (offsite!)
Instead the following Windows dialog is displayed. We can't seem to get anywhere meaningful from this dialog.
The above sequence of events works fine if the file has a well defined host application, such as a MS Office document or PDF. We would hope a file of type JPG would activate meaningfully because, after all, you can double-click on a JPG to meaningfully view it. This problem occurs for files of type "txt", and no doubt others.
Does anyone know anything about this and/or have a fix or suggestion? This is PB 12.5.2, by the way.
Do we know whose problem this is? I.E. Could this be theoretically fixed within PowerBuilder?
Thanks,
Dan.
Hi Dan;
Here is a similar issue a customer had on another PB version with Vista ....
We also had the same problem with PB 10.5 and 11.5 when using Vista. Here is the work around. Activate the OLE object InPlace! instead of OffSite! Surprisingly, this still opens the file in the application it was created in so it can be viewed and/or printed. This appears to only be required for Package OLE objects, but also works for Word and Excel OLE objects.
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fantastic! This works! Thanks Chris!
I'm surprised "InPlace!" activates off-site for Word and Excel because those applications should support true in-place activation.
It doesn't really matter now that we have an effective work-around, but I wonder whether the problem lies with PB or elsewhere. It would be great if Appeon could take a look now that they are in a position to, and open to, doing such things.
Hi Dan;
That is great news!
From my reading (and finally some more reactivated synapse joints thanks to MORE COFFEE) - I was able to see that there had been issues with the OLE registration string in the OLE Control or OLE -DW in past PB releases, where the OLE Class package name is somehow misinterpreted by the O/S or mis-communicated by PB to MS-Windows. However, changing the OLE Activate to an "InPlace" has seemed in the past - to correct this misunderstanding between PB & the O/S.
Now, whose fault it is is another matter. I'll pass on this weird nuance to the Appeon Engineering team and see if they can look into this as a PB issue vs a MS issue for Appeon PB's 1st release.
In the mean-time, if you have an SAP Support contract, you might want to open up a support ticket on this puppy.
Regards ... Chris
PS: Don't forget to hug your OLE DataWindows!
Moving on to implementing a solution - is there a way to tell that an OLE control contains a "Package" other than testing ole_1.classLongName = "Package"? The issue here is that "Package" will be translated when running Windows in other languages.
Interesting that ole_1.classShortName is longer than ole_1.classLongName in this case - "Packager Shell Object" versus "Package".
Thanks for passing this on to Appeon. We have a SAP Support contract, however it's not clear to me what value there is in opening a case when PB has been handed over to Appeon.
Thanks again.
Dan.
Hi Dan;
1) Have you tried this by running your application from PB 12.6?
=> You can download the v12.6 evaluation & its good for 30 days.
That could answer the "is it fixed" question
2) What version of MS-Windows are you using?
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.