Re: [ROOT] multiple default parameters in slot

From: Valeriy Onuchin (Valeri.Onoutchine@cern.ch)
Date: Fri Mar 08 2002 - 15:37:08 MET


 Hi Joe,
'=' sign must be apeared only once, e.g.

Connect(SomeClass,MethodWithoutArguments(),"MyClass",this,"MethodWithArguments(=Arg1,Arg2)");

Sorry, it's reallynot clear from http://root.cern.ch/root/HowtoSignalSlot.html

Regards.    Valeriy


"Faine, Valeri" wrote:

> Hello Joe,
> You should communicate the author of the software you are working
> with first, namely Anton Fokin. He had asked this and he was replied:
>
> Int_t Arg1=5;
> SomeObject* Arg2=new SomeObject();
>
> chart buffer[100]
> sprintf(buffer,MethodWithArguments(=%d,=0x%), Arg1, Arg2);
>
> Connect(SomeClass,MethodWithoutArguments(),"MyClass",
> this,buffer);
>
>   Best regards, Valeri
>
>
>
> -----Original Message-----
> From: Joe Robe
> To: roottalk@pcroot.cern.ch
> Sent: 3/7/02 12:55 PM
> Subject: [ROOT] multiple default parameters in slot
>
> Hi rooters,
>
> the docs show, that I can pass default parameters to a slot via using =
> in
> the parameter list.
>
> Is there any way to use variables there and this also for MULTIPLE
> arguments
> ??
>
> What I want to do is something like:
>
> Int_t Arg1=5;
> SomeObject* Arg2=new SomeObject();
>
> Connect(SomeClass,MethodWithoutArguments(),"MyClass",
> this,"MethodWithArguments(=Arg1,=Arg2)");
>
> MethodWithoutArguments is AWARE of Arg1 and Arg2, but I did not create
> this
> signal, just only have to use it and for whatever reason the developer
> of
> that signal does NOT submit this arguments !!
>
> Any work around ??
>
> Joe
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET