Re: Vim's ole functionality

2007-04-26 Thread Sebastian Menge
Am Donnerstag, den 26.04.2007, 14:08 +0200 schrieb Sebastian Menge:
  Perhaps this Mail from eclipse helps:
[ ... ]

quote from that mail:

 SWT supports the embedding of OleDocuments and Active X Controls only.
 In order to be an ActiveX control, the control must support a minimum
 set of interfaces.  The error you are getting is Interface not
 supported.  
[...] 
 but my guess is it does not have the minimum set of API required to be
 an ActiveX Control.
  
 Some of the required interfaces are:
  
 IOleObject
 IOleInPlaceObject
 IOleInPlaceActiveObject
 IOleControl

Are the if_ole developers around? Does gvim implement these
interfaces !? I don't see them in the OLEViewer from M$ ...

Sebastian.



Re: Vim's ole functionality

2007-04-26 Thread A.J.Mechelynck

Sebastian Menge wrote:

Am Donnerstag, den 26.04.2007, 14:08 +0200 schrieb Sebastian Menge:

 Perhaps this Mail from eclipse helps:

[ ... ]

quote from that mail:


SWT supports the embedding of OleDocuments and Active X Controls only.
In order to be an ActiveX control, the control must support a minimum
set of interfaces.  The error you are getting is Interface not
supported.  
[...] 

but my guess is it does not have the minimum set of API required to be
an ActiveX Control.
 
Some of the required interfaces are:
 
IOleObject

IOleInPlaceObject
IOleInPlaceActiveObject
IOleControl


Are the if_ole developers around? Does gvim implement these
interfaces !? I don't see them in the OLEViewer from M$ ...

Sebastian.



I don't think gvim ever meant to be an ActiveX control. shudder/

Best regards,
Tony.
--
Baker's First Law of Federal Geometry:
A block grant is a solid mass of money surrounded on all sides
by governors.


Re: Vim's ole functionality

2007-04-25 Thread Sebastian Menge
Am Dienstag, den 24.04.2007, 16:46 +0530 schrieb Nageshwar M:
 I tried all the options I checked :version and there is this line
 with OLE support. I tried to run the application from python as said
 in documentation and its working fine there. But from java with swt
 library I'm getting the same error.

Please give more information: Perhaps it's a java problem? Can you post
(some of) your code? Then we could try to reproduce it.

Sebastian.



Re: Vim's ole functionality

2007-04-25 Thread Nageshwar

I am sending you the code that I wrote to start a ole window.The
following code tries to start the application in a separate window. (
To run this code as an application we need to have swt library )


import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.ole.win32.OLE;
import org.eclipse.swt.ole.win32.OleAutomation;
import org.eclipse.swt.ole.win32.OleControlSite;
import org.eclipse.swt.ole.win32.*;
import org.eclipse.swt.ole.win32.OleFrame;
import org.eclipse.swt.ole.win32.Variant;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class SWTOleFrame {

 public static void main(String[] args) {

   final Display display = new Display();
   Shell shell = new Shell(display);
   shell.setSize(600, 400);
   shell.setLayout(new FillLayout());
   OleControlSite oleControlSite;

   OleFrame oleFrame = new OleFrame(shell, SWT.NONE);
   oleControlSite = new OleControlSite(oleFrame, SWT.NONE,
  Vim.Application);//--Error is coming here
   oleControlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
   shell.open();

   while (!shell.isDisposed()) {
 if (!display.readAndDispatch())
   display.sleep();
   }
   display.dispose();
 }
}


This is the error mesg:
Exception in thread main org.eclipse.swt.SWTException: Failed to
create Ole Client. result = -2147221164
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:302)
at 
org.eclipse.swt.ole.win32.OleControlSite.init(OleControlSite.java:101)
at SWTOleFrame.main(SWTOleFrame.java:23)


When I replaced the Vim.Application with Shell.Explorer it is
working fine, an IE window is opening.


On 4/25/07, Sebastian Menge [EMAIL PROTECTED] wrote:

Am Dienstag, den 24.04.2007, 16:46 +0530 schrieb Nageshwar M:
 I tried all the options I checked :version and there is this line
 with OLE support. I tried to run the application from python as said
 in documentation and its working fine there. But from java with swt
 library I'm getting the same error.

Please give more information: Perhaps it's a java problem? Can you post
(some of) your code? Then we could try to reproduce it.

Sebastian.




Thanks,
Nageshwar M


Re: Vim's ole functionality

2007-04-24 Thread Nageshwar M

Hello,

Sorry for raising this issue again. The problem was not yet solved.

I tried all the options I checked :version and there is this line
with OLE support. I tried to run the application from python as said
in documentation and its working fine there. But from java with swt
library I'm getting the same error.

On 4/23/07, Bram Moolenaar [EMAIL PROTECTED] wrote:


Nageshwar -

 Yes.. I did gvim -register
 But when i checked the :version details, i didn't get -DFEAT_OLE. I
 installed vim 7.0 windows installation package. Do you think that is
 the problem ?

Not all gvim.exe have the OLE support.  The second line of :version
should say with OLE support.  The self-installing executable does have
OLE.  src/bigvim.bat builds it.

- Bram

--
Imagine a world without hypothetical situations.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///



Re: Vim's ole functionality

2007-04-22 Thread Bram Moolenaar

Nageshwar wrote:

   I tried to embed the vim in eclipse using swt library. I used
 program id as Vim.Application. but i got an error. The error message
 that i got was
  org.eclipse.swt.SWTException: Failed to create Ole Client. result
 = -2147221164
 I tried to embed some other applications like actorbat pdf viewer, IE
 etc., they are working perfectly.
 I guess there is some problem with vim's ole interface implementation.
 can anybody help me..

Did you run gvim -register?

-- 
Engineers understand that their appearance only bothers other people and
therefore it is not worth optimizing.
(Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///