<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/comconnect/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/comconnect/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 16 Mar 2006 09:50:26 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/comconnect/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>IOPObject: getObjectProperty(String, IOPVariable[])</title><link>https://sourceforge.net/p/comconnect/patches/1/</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Vincent FIACK</dc:creator><pubDate>Thu, 16 Mar 2006 09:50:26 -0000</pubDate><guid>https://sourceforge.netd1f9186be69f61fe8d27abf10882b58fc10dc70f</guid></item></channel></rss>