Re: Major New User Problems

Josh Passenger <[email protected]> Sat, 3 Dec 2005 13:48:50 +1000
Newsgroups gmane.comp.windows.devel.jawin
Message-ID <[email protected]>
Hi Barbara,

The method invoke does not belong to Object, you will need to cast to the
relevant Jawin object ie to DispatchPtr before calling invoke().

DispatchPtr oDbf = (DispatchPtr) app.invoke("OpenDB", "customer.dbf");
oDbf.invoke("close");

My expertise is in the Jawin Type Browser so I hope this is correct, guys?

Josh


>From: Barbara X <[email protected]>
>Reply-To: Discussion of Java/Win32/COM integration with Jawin
><[email protected]>
>To: [email protected]
>Subject: [JAWIN] Major New User Problems
>Date: Fri, 2 Dec 2005 18:15:11 +0000
>MIME-Version: 1.0
>X-Originating-IP: [209.204.169.181]
>X-Originating-Email: [[email protected]]
>X-Sender: [email protected]
>Received: from discuss.develop.com ([66.129.110.38]) by
>bay0-mc2-f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 2
>Dec 2005 10:30:35 -0800
>Received: from develop-lserv (66.129.110.38) by discuss.develop.com (LSMTP
>for Windows NT v1.1b) with SMTP id <[email protected]>; Fri, 2
>Dec 2005 13:06:06 -0500
>Received: from DISCUSS.DEVELOP.COM by DISCUSS.DEVELOP.COM (LISTSERV-TCP/IP
>         release 1.8e) with spool id 2980995 for [email protected];
>          Fri, 2 Dec 2005 13:06:06 -0500
>Received: from hotmail.com (65.54.162.30) by discuss.develop.com (LSMTP for
>          Windows NT v1.1b) with SMTP id <[email protected]>;
>Fri,          2 Dec 2005 12:51:06 -0500
>Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
>Fri,          2 Dec 2005 10:15:11 -0800
>Received: from 65.54.162.200 by by108fd.bay108.hotmail.msn.com with HTTP;
>Fri,          02 Dec 2005 18:15:11 GMT
>X-Message-Info: jl7Vrt/mfspLUCTdMwO0YLkOD8f/hVO9T8j1GbUgsVM=
>X-OriginalArrivalTime: 02 Dec 2005 18:15:11.0803 (UTC)
>  FILETIME=[55CE28B0:01C5F76C]
>Precedence: list
>Return-Path: [email protected]
>
>I am new to Jawin.  So far I have been able run the demos and they work
>fine. I hava a COM object that I can use from VB and now I need to use it
>from Java. I have been able to access two methods in this COM object, one
>returns a String the other an Array.  So far so good.
>
>My problem is, I have another method in the COM object that is returning a
>reference to a DBASE (dbf/cdx) file.  From VB, once I have the Object back
>I
>can do anything to the object I need, such as seek in the file, retrieve a
>record, or Close it. Works in VB.
>
>It is not working from Jawin. Calling getClass( ) I can tell that Jawin is
>returning something of type DispatchPtr. I have even tried to cast it to
>Object just to be sure. Given the following code, the second line will not
>compile. Close() is a method of the dbServer created in the OpneDB( )
>method.
>
>Object oDbf = (Object) app.invoke("OpenDB", "customer.dbf");
>oDbf.invoke("close");
>
>Can anyone shed some light on this for me?   Is this a limitation of Jawin
>or should I be using something other than DispatchPtr?
>
>Thanks for any advice.
>
>Barbara
>
>_________________________________________________________________
>FREE pop-up blocking with the new MSN Toolbar – get it now!
>http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/