Rick,

Attached is a patch that should fix this issue. Let me know if that
resolves your issue so that I will commit it to the 3.6 branch as
well.

Utkarsh

On Tue, Sep 29, 2009 at 12:31 PM, Rick Angelini <[email protected]> wrote:
> I'm building a connection definition file and I've run into a problem ...
> apparently, I can't have two variable substitutions in when building a
> command argument?
>
> <Argument value="-l select=$NUMPROC$:ncpus=4:mpiprocs=$PTILE$"/>
>
> I can substitute either $NUMPROC$ or $PTILE$, but not both .... I get a
> blank string returned if I try two variables.   Is this a know bug, and more
> importantly, is there a workaround????
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
Index: Qt/Core/pqCommandServerStartup.cxx
===================================================================
RCS file: /cvsroot/ParaView3/ParaView3/Qt/Core/pqCommandServerStartup.cxx,v
retrieving revision 1.20
diff -u -3 -p -r1.20 pqCommandServerStartup.cxx
--- Qt/Core/pqCommandServerStartup.cxx	11 Sep 2008 16:27:08 -0000	1.20
+++ Qt/Core/pqCommandServerStartup.cxx	30 Sep 2009 19:14:53 -0000
@@ -155,9 +155,9 @@ void pqCommandServerStartup::execute(con
   // const double timeout = this->getTimeout();
   QStringList arguments = this->getArguments();
 
-  QRegExp regex("[$]([^$].*)[$]");
+  QRegExp regex("\\$([^$]*)\\$");
   // Do string-substitution on the executable
-  if (regex.indexIn(executable) > -1)
+  while (regex.indexIn(executable) > -1)
     {
     QString before = regex.cap(0);
     QString variable = regex.cap(1);
@@ -169,7 +169,7 @@ void pqCommandServerStartup::execute(con
   for (QStringList::iterator i = arguments.begin(); i != arguments.end(); )
     {
     QString& argument = *i;
-    if(regex.indexIn(argument) > -1)
+    while (regex.indexIn(argument) > -1)
       {
       const QString before = regex.cap(0);
       const QString variable = regex.cap(1);
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to