<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to patches</title><link href="https://sourceforge.net/p/comconnect/patches/" rel="alternate"/><link href="https://sourceforge.net/p/comconnect/patches/feed.atom" rel="self"/><id>https://sourceforge.net/p/comconnect/patches/</id><updated>2006-03-16T09:50:26Z</updated><subtitle>Recent changes to patches</subtitle><entry><title>IOPObject: getObjectProperty(String, IOPVariable[])</title><link href="https://sourceforge.net/p/comconnect/patches/1/" rel="alternate"/><published>2006-03-16T09:50:26Z</published><updated>2006-03-16T09:50:26Z</updated><author><name>Vincent FIACK</name><uri>https://sourceforge.net/u/vfiack/</uri></author><id>https://sourceforge.netd1f9186be69f61fe8d27abf10882b58fc10dc70f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I've found that there's a method missing in&lt;br /&gt;
uk.co.upco.iop.IOPObject. There's no way to fetch an&lt;br /&gt;
object property, and passing parameters to this property.&lt;/p&gt;
&lt;h1 id="here-is-an-use-case-in-pseudo-vbs"&gt;Here is an use case, in pseudo-vbs :&lt;/h1&gt;
&lt;p&gt;Set theUser = CreateObject("MetaFrameCOM.MetaFrameUser")&lt;br /&gt;
WScript.Echo theUser.Applications.Count&lt;br /&gt;
Set anApp = theUser.Applications.Item(1)&lt;br /&gt;
anApp.LoadData(1)&lt;br /&gt;
WScript.Echo anApp.AppName&lt;br /&gt;
============================&lt;/p&gt;
&lt;p&gt;There is no way to access to&lt;br /&gt;
theUser.Applications.Item(1) with comconnect.&lt;/p&gt;
&lt;h1 id="to-do-this-in-java-we-would-need-something-like-that"&gt;To do this in java, we would need something like that :&lt;/h1&gt;
&lt;p&gt;IOPObject apps = user.getObjectProperty("Applications");&lt;br /&gt;
IOPVariable length = apps.getProperty("Count");&lt;/p&gt;
&lt;p&gt;params = new IOPVariable[] {new IOPVariable(1)};&lt;br /&gt;
IOPObject app = apps.getObjectProperty("Item", params);&lt;/p&gt;
&lt;p&gt;params = new IOPVariable[] {new IOPVariable(1)};&lt;br /&gt;
app.callMethod("LoadData", params);&lt;/p&gt;
&lt;p&gt;IOPVariable appName = app.getProperty("AppName"); &lt;br /&gt;
System.out.println(appName.getStringValue());&lt;/p&gt;
&lt;h1 id="appdispose4041"&gt;app.dispose();&lt;/h1&gt;
&lt;h1 id="here-is-the-code-i-added-in-iopobjectjava"&gt;Here is the code i added in IOPObject.java:&lt;/h1&gt;
&lt;p&gt;public IOPObject getObjectProperty(String propertyName,&lt;br /&gt;
IOPVariable[] arglist)&lt;br /&gt;
throws IOPException&lt;br /&gt;
{&lt;br /&gt;
String args = serialiseArgList(arglist);&lt;br /&gt;
String s =&lt;br /&gt;
IOPserver.sendAndBlock(CLIENTMESSAGE_GETPROPERTYOBJECT&lt;br /&gt;
+ " " + instanceID + " " + propertyName + " " + args);&lt;br /&gt;
if(s.startsWith(IOPServer.SERVERMESSAGE_ERROR))&lt;br /&gt;
throw new IOPException(s);&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
IOPObject jc = new IOPObject(IOPserver);&lt;br /&gt;
jc.instanceID = s.substring(s.indexOf(" ") + 1,&lt;br /&gt;
s.length());&lt;br /&gt;
IOPserver.createdObjects.add(jc);&lt;br /&gt;
return jc;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
============================&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;
Vincent Fiack.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>