On 08.10.2012, 21:08, Uli Schlachter wrote:
> Does that mean you are just moving functions out to another file? They were
> already separate functions before?
Indeed, but a lot of functions are longer than three lines (e.g. the
buttonone-function has 12 lines). My idea was to make the rc.lua shorter
so I get a better overview over the logic structure of my config. I
think bringing out the line-intense functions will make it short enough
to be handled in one file and the functions are often functions called
by certain keybinds etc. and if I want to change the functionality of a
certain keybind it is quite unimportant whether this function is in the
rc.lua itself or another file while the logic will still be in one
central file.
That's the idea behind. And as a bonus I can get used to modifying
awesome. ;) Eventually I want to be able to use it's potential.

> If you want me to guess:
> [...]
> Do you really want to call the function here? I think you want
> functions.buttonfour instead of functions.buttonfour().
Bingo. Now it works, thanks a lot. Experienced people guessing is
sometimes extremely helpful. ;) My mind was stuck to other programming
languages (Java, C++), so I was on the trip thinking there have to be
brackets after every method call. Probably functions in C are also
called without brackets?

> Also, what's the "c"
> argument to buttonone?
That's what awesome was also complaning about. Explanation similar to
the one above: I assumed that do be a parameter that has to be passed to
the function when it's somewhere else, but obviously the parameter (?)
are known when specified in another file. However, his "c" argument was
from the original awesome config ("function (c) $functioncode end"). I
assumed it to be the actual client given as a parameter, so that the
function can manipulate it?

> This accesses global stuff like "awful" and "client". Those aren't visible in
> modules by default. To get them, you need special magic before the 
> module()-call:
Added, but it seem to work even if I comment these lines out. Well, I
will observe that.

Again thanks a lot. I'm still into the learning process. ;)

Cheers,
Manuel

-- 
To unsubscribe, send mail to [email protected].

Reply via email to