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

List:       kde-core-devel
Subject:    Re: Being a pain
From:       Simon Hausmann <shaus () uermel ! Med ! Uni-Magdeburg ! DE>
Date:       1999-10-03 0:43:40
[Download RAW message or body]


It seems you aren't using the autoloader (read: BOAObjectRestorer) . You
should use that for binding-on-demand :-)

There are a couple of such loader templates in KOM/OP, all doing quite the
same :)

The kded tutorial examples in kdelibs show how to use these templates,
it's like this:

AddressBookImpl::AddressBookImpl( const CORBA::BOA::ReferenceData &refData)
: AdressBook_skel( refData )
{
  ..your constructor..
}

AddressBookImpl::AddressBookImpl( CORBA::Object_ptr obj )
: AddressBook_skel( obj )
{
  ...same here :-) ...
}

(make sure to provide *both* of these constructors)

Then you can use KOMAutoLoader (for example), in order to load that thing
on demand:

int main()
{
... 
  KOMAutoLoader<AddressBookImpl> myLoader( "IDL:KAddressBook/AddressBook:1.0", "KAddressBook" );
...
}

The rest is it-happens-inside-MICO magic :-)

However I'm not 100% sure if the above stuff is 100% correct, I just
recalled it from my mind, at 2:30 in the middle of the night, and I'm too
tired now to dig it right :-}

Hope this helps anyway :)

Ciao,
 Simon

On Sat, 2 Oct 1999, Rik Hemsley wrote:

> #if Simon Hausmann
> > Is the code for it in CVS? Then I could have a look at it.
> 
> Yes, pim/corba/kab/client/client.cc is probably the culprit.
> 
> > 1) Does embedding kview in Konqueror work for you?
> No kview here.
> 
> > 2) Does kfmclient openURL file:/home/foo work?
> Yes.
> 
> > If yes, then it's a problem with your code.
> More likely.
> 
> >  a) used wrong Repoid/Tag information for the autoloader?
> Very possible. I kind of guessed this stuff ;) Using no tag didn't work,
> so I've been guessing different ones to see what they do !
> 
> kab_server.desktop looks like this:
> 
> [Desktop Entry]
> Name=KAddressBook
> Exec=kab_server
> CORBAExec=kab_server
> X-KDE-RepoIds=IDL:KAddressBook/AddressBook:1.0#KAddressBook
> X-KDE-ActivationMode=shared
> ServiceTypes=AddressBook                                                        
> 
> The tag is then gleaned from the repoId in the client code.
> 
> >  b) failed to initialize/setup the BOA properly?
> 
> I've changed the code so the BOA is initialised immediately after the ORB,
> so I presume this is OK.
> 
> Cheers,
> Rik
> 

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

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