2019 up to now | 2018 2017  |  2016  | 2015 | 2014 | 2013 | 2012

Mailing List - Entries of 2012

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

Re: [QF-Test] (no subject)

  • Subject: Re: [QF-Test] (no subject)
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Sun, 16 Dec 2012 20:09:00 +0100

Hi Saki,

if the script were implemented as shown here it would probably work,
though I'd advise to use rc.setLocal instead of rc.setGlobal,
otherwise there's a chance your global setting gets shadowed by a
local one.

In the run-log you sent the script is different:

                rc.setGlobal("$(ActivityName)", string.replace(str,' ',''))

The expansion of $(ActivityName) for the variable name means that the
value is bound to a different variable. If you look at the run-log
you'll see the wrong variable expansion and you'll also find a
'Stacktrace' node which shows all variable bindings and is perfect for
analyzing both this error and the global/local conflict described

Best regards,

SAKI <mesaki21@?.com> writes:

> Hi
> I have a procedure with a variable "ActivityName" and in the procedure im clicking on a object.
> mouse click event is clicking on the object "ActivityName" and im doing some string function on
> the variable and then pass it on to the click event.
> the click even is not getting the edited variable value. Any idea how to do that?
> ========
> when i call the procedure SelectActivity the value of the variable ActivityName is something like
> this "Input Button"
> In the procedure i want to edit the variable value and make it "InputButton" and then pass it to
> the click event.
> ============
> QFTest Procedure  below
> --------------------
>    <Procedure id="_4Q" name="SelectActivity">
>           <variable name="ActivityName"/>
>           <ServerScriptStep id="_utzFN" name="strip activity name">
>             <code>import string
>                 str = "$(ActivityName)"              
>                 rc.setGlobal("ActivityName", string.replace(str,' ',''))
> </code>
>           </ServerScriptStep>
>           <MouseEventStep clicks="1" client="$(client)"
>                           component="Editor.canvas2@/ProcessDocument/Process/
> ProcessActivityCompartment/Scope/ScopeCompartment/ScopeActivity/ScopeActivityCompartment/Flow/
> FlowCompartment/Activity$(ActivityName)"
>                           event="MOUSE_MPRC" id="_4M" modifiers="0" x="48"
>                           y="33"/>
>         </Procedure>
> Regards,

Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                               Tel: +49 8171 38648-0
DE-82538 Geretsried                         Fax: +49 8171 3864816
GF: Gregor Schmid, Karlheinz Kellerer          HRB München 140833