yeah:
c:geometry(nil) :

W: awesome: luaA_dofunction:108: error while running function
stack traceback:
        [C]: in function 'geometry'
        [string "c:geometry(42)"]:1: in function 'f'
        /usr/share/awesome/lib/awful/remote.lua:25: in function
</usr/share/awesome/lib/awful/remote.lua:21>
error: [string "c:geometry(42)"]:1: bad argument #1 to 'geometry'
(table expected, got number)
W: awesome: luaA_dofunction:108: error while running function


A better solution is to check for nil in geometry?

On Fri, Sep 4, 2009 at 1:39 PM, Uli Schlachter<psyc...@znc.in> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Cedric GESTES wrote:
>> -            c:geometry(property.get(c, "floating_geometry"))
>> +            local geo = property.get(c, "floating_geometry")
>> +            if geo ~= nil then
>> +                geo = c:geometry()
>> +            end
>
> Did you mean this?
>
> local geo = property.get(c, "floating_geometry")
> if geo ~= nil then
>   c:geometry(geo)
> end
>
> (c:geometry(nil) could trigger the luaA_istable() check in client.c, can nil 
> do
> that? Does it count as a real argument?)
> - --
> "Do you know that books smell like nutmeg or some spice from a foreign land?"
>                                                  -- Faber in Fahrenheit 451
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iQEcBAEBCAAGBQJKoPxrAAoJECLkKOvLj8sGbGYIAI5hj6tqtBqmDY0cGT8K9CQN
> 7FLAIdPMYb29IYKW/mj8t0OjPcLrAneya2Ym7kRpI2nkiDbv7znkMxIST0O9mPan
> Ecb3iEiVm4SteaURNDug4v8FAAgTVk3+kgwqEUwZMeVDWOmvYFC6ke/3RH07iWzc
> IUh2b/i/3HIaUZi4bPCoaqCiUq/EJesKtfVBJnM7s6tnHlSb5Zfh5/Hrh71NLGl2
> 9QLGqsQCkXgoq8KOT0VidPmHtP+DR9ZEXz75dax9BoHVNFjOUwna4szu5ojF4PB6
> a+ISwDcOSXslxQE8cbFVF11jv7gWr5IqN6U2IrGOMgpDEM87xMEdmmtC8FbPYUo=
> =yGTd
> -----END PGP SIGNATURE-----
>

--
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to