Search the web
Sign In
New User? Sign Up
quo-users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
[QUO] More than one instances of one contract-type?   Message List  
Reply | Forward Message #34 of 35 |
Re: [QUO] More than one instances of one contract-type?


On Sunday, August 4, 2002, at 11:55 AM, Sven Harazim wrote:

> My contract is called "UpdaterateMonitorContract".
> The generated Qosket-skeleton code shows an static generated contract
> name:
>
> ...
> quo_UpdaterateMonitorContract =
> kernel.bindContract("UpdaterateMonitorContract"
> ...


There are two generated functions called 'initContract' in the skeleton:

public Contract initContract(String name, QuoKernel(kernel);
public Contract initContract(String name, String interfaceName,
QuoKernel kermel);

The line above is from the first one. You want the second one.

As you say, the first method ignores the name parameter. Eventually
this method will be appropriate if you're making a single instance of a
qosket that has multiple contracts (QuO doesn't support this yet but it
will later).

The second one uses the name parameter, so this is the one you want to
call. You can either call it directly on the qosket, or you can call a
method on the adapter with the same signature (have a look at the
generated code for your adapter). The interface parameter should be in
idl format, just as it appears in the body of the first initContract
method.


Actually, now that I think of it, I believe you'll have multiple
contracts even if you use the first function. But you won't be able to
tell which is which in the gui. We never run it this way, so I can't
say for sure.




> Is a possibility there of determining the contract name dynamically, so,
> that I have two contracts of the same type in Kernel. (Contracts are
> organized
> in the core about their name anyway?)

I think it's better for the application wrapper to choose a unique name
that's meaningful to it.

--
rshapiro@...

--
[To unsubscribe to this list send an email to "majdart@..."
with the following text in the BODY of the message "unsubscribe quo-users"]



Sun Aug 4, 2002 7:39 pm

rshapiro@...
Send Email Send Email

Forward
Message #34 of 35 |
Expand Messages Author Sort by Date

Hello, i have wrote a Qosket with a simple contract. In the Application, i need one delegate for each client callback object. And each delegate should use it's...
Sven Harazim
sven@...
Send Email
Aug 1, 2002
8:26 am

Hi Sven, ... cool. ... Yes, it should be possible to have multiple contract instances of the same contract type in the same kernel. Are you using the C++ or...
Michael Atighetchi
matighet@...
Send Email
Aug 2, 2002
2:49 pm

Hello Michael, MA> cool. ;-) MA> Yes, it should be possible to have multiple contract instances of the MA> same contract type in the same kernel. Are you using...
Sven Harazim
sven@...
Send Email
Aug 3, 2002
1:57 pm

... If you give the contracts unique names, everything should work as you want it to. ... It's possible if the syscond itself knows how to call out to some...
R Shapiro
rshapiro@...
Send Email
Aug 3, 2002
7:19 pm

... Just to be completely clear, what I mean is that the qosket should request the kernel to create the syscond. Then the qosket should pass the reference in...
rshapiro@...
Send Email
Aug 4, 2002
5:22 am

RS> If you give the contracts unique names, everything should work as you RS> want it to. I hope we don't talk round each other. My contract is called...
Sven Harazim
sven@...
Send Email
Aug 4, 2002
3:54 pm

... There are two generated functions called 'initContract' in the skeleton: public Contract initContract(String name, QuoKernel(kernel); public Contract...
R Shapiro
rshapiro@...
Send Email
Aug 4, 2002
7:40 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help