Subject: Re: FVWM: Some Default Decor ...

From: Dominik Vogt <[email-masked]>
Date: Sat, 10 Mar 2001 17:01:57 +0100

On Thu, Mar 08, 2001 at 10:00:51AM +0100, Andre Bonhote wrote:
> hm, once again, i was too quick answering.
> 
> i am using this version (from cvs of the same day):
> 
> andre@grischun02:~ > fvwm2 -version
> FVWM version 2.3.29 compiled on Mar  2 2001 at 16:20:22
> with support for: ReadLine, XPM, GNOME WM hints, SM
> 
> and now have these lines in my rc:
> 
> DestroyFunc InitializeDecor
> AddToFunc InitializeDecor
> + I DestroyDecor $0
> + I AddToDecor $0

The $0 is not properly quoted. Use

  + I DestroyDecor $$$$0
  + I AddToDecor $$$$0

instead.

> + I +   TitleStyle RightJustified 
> + I +   ButtonStyle All ActiveUp (-- flat) Inactive (-- flat)
> + I +   ButtonStyle All -- UseTitleStyle
> + I +   ButtonStyle 4 8 70x10@0 30x10@0 30x50@0 10x50@0 50x90@0 90x50@1
> 70x50@1 70x10@1
> + I +   ButtonStyle 1 13 90x10@0 10x10@0 10x20@0 50x20@1 10x60@0 30x60@0
> 30x90@0 70x90@1 70x60@1 90x60@1 50x20@1 90x20@1 90x10@1
> + I +   ButtonStyle 2 8 50x10@0 10x50@0 30x50@0 30x90@0 70x90@1 70x50@1
> 90x50@1 50x10@1 
> + I +   TitleStyle -- flat
> + I +   BorderStyle -- HiddenHandles NoInset
> 
> Function InitializeDecor AtermDecor
> AddToDecor AtermDecor
> +       TitleStyle HGradient 128 DeepSkyBlue4 black
> Style AtermStyle UseDecor AtermDecor, Color white/grey50, HilightFore
> white
> 
> ...
> 
> mark the "Function" statement which does not appear in mikhaels example.
> it's needed with my fvwm2 because otherwise fvwm2 thinks this should be
> a command:
> 
> [FVWM][ExecuteFunction]: <<ERROR>> No such command 'InitializeDecor'

For me this happens only if I paste above lines into an
FvwmConsole window.  If I write this into a file and execute it
with "read filename" everything works fine (qith the $0 fix).
There seems to be a weird race condition between the two
FvwmConsole processes.  Sometimes, the "AddToFunc InitializeDecor"
is not sent to fvwm at all and thus the function does not exist
when it is called.  Copying these lines into my .fvwm2rc file
resolves the problem because FvwmConsole is not involved anymore.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Andre Bonhote <[email-masked]>
Date: Mon, 12 Mar 2001 09:05:42 +0100

> The $0 is not properly quoted. Use

[x] this is WEIRD!
[x] this doesn't work either

sorry, dominik, this didn't work. 

wouldn't it be useful to add a new feature like

IncludeDecor <Decorname>

to be used within AddToDecor-Statements?

thanks

andré

-- 
Real software engineers work from 9 to 5, because that is the way the
job is described in the formal spec.  Working late would feel like
using an undocumented external procedure.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 12 Mar 2001 03:54:58 -0600

> The $0 is not properly quoted. Use

No, the logic requires simply $0 here. And it works. Try, for example:

DestroyFunc InitializeMyFunc
AddToFunc   InitializeMyFunc
+ I DestroyFunc $0    
+ I AddToFunc   $0
+ I + I Exec exec xmessage test

InitializeMyFunc MyFunc
MyFunc

> > [FVWM][ExecuteFunction]: <<ERROR>> No such command 'InitializeDecor'

I can't reproduce this. It works with or without "Function" for me.
Andre, maybe you use InitializeDecor prior to its definition?

Regards,
Mikhael.