Subject: FVWM: parameter $d in form

From: Victor Eijkhout <[email-masked]>
Date: Wed, 2 Oct 2002 10:51:54 -0400

I have a form to rename a desktop:
  Module FvwmForm NameDesk

defined as

# name this desktop
DestroyModuleConfig NameDesk: *
*NameDesk: WarpPointer
*NameDesk: Line left
*NameDesk: Text "Name this desktop:"
*NameDesk: Line expand
*NameDesk: Input deskname 20 ""
*NameDesk: Button quit "OK" ^M
*NameDesk: Command Echo $d "$(deskname)"
*NameDesk: Command *FvwmPager: Label $d "$(deskname)"
*NameDesk: Command RestartPager
*NameDesk: Button quit "Cancel"

where

AddToFunc RestartPager
+ I KillModule FvwmPager
+ I DestroyModuleConfig FvwmPager
+ I Module FvwmPager 0 $[FVWM_N_DESKS]

Now the echo command displays "1 TheName" but Desk 0 gets renamed. I'm stymied.
-- 
Victor Eijkhout <[email-masked]>
tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F)
http://www.cs.utk.edu/~eijkhout/
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 2 Oct 2002 16:32:17 +0000

> Now the echo command displays "1 TheName" but Desk 0 gets renamed. I'm 

Please always specify the version you use.

For 2.5.x, you should preferably use DesktopName instead of "*FvwmPager:
Label" although the second is also supported for now.

  *NameDesk: Command DesktopName $d $(deskname)

If you use 2.4.x I will post another solution for this expanding problem.

Regards,
Mikhael.

---

From: Victor Eijkhout <[email-masked]>
Date: Wed, 2 Oct 2002 12:41:32 -0400

>Please always specify the version you use.

Sorry bout that.  2.4.11.  I haven't had time to figure out how to 
get a newer version merged in with what fink distributes (Mac OS X)

>If you use 2.4.x I will post another solution for this expanding problem.

Please. I'm quite at a loss how Echo can have the right value but not 
the other command.

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 2 Oct 2002 16:52:02 +0000

> Please. I'm quite at a loss how Echo can have the right value but not 

  *NameDesk: Command PipeRead `echo "*FvwmPager: Label $d '$(deskname)'"`

This is needed because $d is expanded in PipeRead, but not in "*NameDesk:"
or "*FvwmPager:" for compatibility with some module configs.

Regards,
Mikhael.