[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jabber-jdev
Subject:    Re: [JDEV] Re: JabberCOM .OnMessage 'Tag' Parameter help
From:       "Peter Millard" <me () pgmillard ! com>
Date:       2003-06-24 15:08:58
[Download RAW message or body]

David Banes wrote:
> I've got a good handle on the IXMLTag and using iterators, what I'm not
> skilled up on is actually getting the interface from the Tag parameter.
> Preseumable I have to cast it, pass it or do something else to it as
> it's passed in as an OleVariant and I need it to be an IXMLTag.

Yeah, you should just be able to do something like:

var
    xml: IXMLTag;
begin
    xml := (tag as IXMLTag);

    ... do stuff with xml instead of tag ...
end;

That should do the appropriate IDispatch magic on your behalf. If that object
doesn't support the IXMLTag interface (it ought to if it's coming directly from
jabberCOM), then an exception should be thrown.

On another note.. if your using Delphi + JabberCOM, you should really look into
using JOPL which is the underlying library I wrote for Exodus. It's all Delphi
native, and a MUCH MUCH MUCH better architecture.
It also removes all of the COM overhead of using JabberCOM and the associated
regsvr32.exe madness which comes with redistributing JabberCOM. Using JOPL,
everything is compiled in.

pgm.

_______________________________________________
jdev mailing list
jdev@jabber.org
http://mailman.jabber.org/listinfo/jdev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic