Subject: FVWM: A gentle pointer... (FvwmForm)

From: Len Philpot <[email-masked]>
Date: Thu, 26 Sep 2002 20:12:30 -0500

Can someone point me in the right direction?

I have the following simple FvwmForm definition :

*RunCommandTitle "Run a command"
*RunCommandFore black
*RunCommandBack grey70
*RunCommandFont *helvetica*b*r*n*14*
*RunCommandFore navy
*RunCommandLine center
*RunCommandFont *helvetica*b*r*n*12*
*RunCommandButtonFont *helvetica*b*r*n*12*
*RunCommandInputFont -sun-screen-medium-r-*-*-12-*-*-*-*-*-*-*
# items
*RunCommandText "Command line"
*RunCommandInput cmd 40 ""
*RunCommandLine right
*RunCommandItemFore darkred
*RunCommandButton quit " OK " ^M
*RunCommandCommand exec exec $(cmd)
#*RunCommandCommand RunCmd $(cmd)
*RunCommandItemFore black
*RunCommandButton quit " Cancel " ^[
*RunCommandCommand nop

This works fine, but I'd like to add a "last command" button to the
form. Adding the additional button is easy, but I'm stumped on how to :

1. Save $(cmd) between invocation
2. Load cmd with $(lastcmd) (or whatever) with a button press

Ideally, I'd like to be able to visually see the last command line
reloaded into the cmd text field, then just click OK to run it. An
alternate solution (though less ideal to me) would be to simply run the
last $(cmd) when the last button was clicked.

I can substitute the direct exec on the run button with the following
rather obvious function (commented above), but I'd like to also have it
save the command line :

AddToFunc RunCmd
+   "C" exec exec $0

If anyone can point me in the right direction, I'd appreciate it.

Thanks.

-- 
+-----------------------------------------------------+
|  Len Philpot       ><>         http://philpot.org/  |
|  [email-masked]     [email-masked] (alt)  |
+-----------------------------------------------------+
--
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: Dan Espen <[email-masked]>
Date: Thu, 26 Sep 2002 21:29:08 -0400

> I have the following simple FvwmForm definition :
,,,
> 1. Save $(cmd) between invocation

For an example of a form that saves its data between invocations,
look at the FvwmForm-Rlogin form in the man page.  (Also installed
automatically.)

The key is the "UseData" part.

-- 
Dan Espen                           E-mail: [email-masked]
444 Hoes Lane  Room RRC 1C-214      Phone: (732) 699-5570
Piscataway, NJ 08854
--
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].