swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compiled and registered swarm XPCOM - could i have a crash course ?


From: daniel kottow
Subject: compiled and registered swarm XPCOM - could i have a crash course ?
Date: Tue, 18 Dec 2001 14:49:44 +0100

hi,
i pulled out the new version and it compiled out of the box. then, i
remembered i had to to call 'make generate' in the COM dir. this allowed me
to build COM/c with no problem. now my mozilla dist/idl contains also the
swarm interface definition files. maybe you could help me to do some "hello
world - using python calling swarm" ? i have the following code snipplet
from aspn working:

from xpcom import components
cls = components.classes["@mozilla.org/sample;1"]
ob = cls.createInstance(components.interfaces.nsISample)

and then i can use ob.value to set and get a string. 
as you probably know or guess, components.classes is a dictionary
containing all the available
classes keyed by their contract id. so my components contain for example,
components.classes["@swarm.org/swarmSwarmObjectImpl;1"]
similarly, components.interfaces has the interfaces. so i have e.g.
components.interfaces["swarmISwarmObject"]
(or, equivalently components.interfaces.swarmISwarmObject). 
here actually comes my first question, what are the suffixes C and S for
swarm interfaces about ?
for many objects i see: swarmISwarmObject, swarmISwarmObjectC,
swarmISwarmObjectS.

naturally, i tried:

from xpcom import components
cls = components.classes["@swarm.org/swarmSwarmObjectImpl;1"]
ob = cls.createInstance(components.interfaces.swarmISwarmObject)

and i basically get:

Exception: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)

you know what is missing here ?
BTW, if you can point me to some XPCOM location better than the IBM
tutorial, i would be grateful.

greetings, daniel

-- 
Daniel Kottow                                    address@hidden
Security and Testing Technology                 
http://vision.fhg.de/~daniel
Production Technology Centre                     Pascalstr. 8 - 9
Fraunhofer-Institut IPK Berlin                   D - 10587 Berlin



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]