You are not logged in.

#1 2012-07-01 12:16:59

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

attempt to call method 'set_gradient_colors' (a nil value) [Closed]

hi, first attempt at using vicious, I am on awesome git I used the code directly from http://awesome.naquadah.org/wiki/Vicious

-- Initialize widget
memwidget = awful.widget.progressbar()
-- Progressbar properties
memwidget:set_width(8)
memwidget:set_height(10)
memwidget:set_vertical(true)
memwidget:set_background_color("#494B4F")
memwidget:set_border_color(nil)
memwidget:set_color("#AECF96")
memwidget:set_gradient_colors({ "#AECF96", "#88A175", "#FF5656" })
-- Register widget
vicious.register(memwidget, vicious.widgets.mem, "$1", 13)

I declared the Vicious library as indicated also

local vicious = require("vicious")

I added to wibox thusly:

    -- Widgets that are aligned to the right
    local right_layout = wibox.layout.fixed.horizontal()
    if s == 1 then right_layout:add(wibox.widget.systray()) end
	-- if s == 1 then right_layout:add(memwidget) end
    right_layout:add(memwidget)
    right_layout:add(mytextclock)
    right_layout:add(mylayoutbox[s])

But I throw the error listed in the subject:

attempt to call method 'set_gradient_colors' (a nil value)

I attempted to find a object reference for this object no luck, I also googled, nothing directly related to this object scenario.

Does anyone see something out of place?

thanks in advance for your help.

--jerry

Last edited by jk121960 (2012-07-03 23:40:11)


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#2 2012-07-01 18:21:55

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 835
Website

Re: attempt to call method 'set_gradient_colors' (a nil value) [Closed]

Does anyone see something out of place?

Let me guess you are using development snapshot of awesome. There is no set_gradient_colors, use stable awesome it's the best 'awesome' experience.

Last edited by anrxc (2012-07-01 18:24:17)


You need to install an RTFM interface.

Offline

#3 2012-07-01 23:17:31

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: attempt to call method 'set_gradient_colors' (a nil value) [Closed]

I am using git master if that is what you mean, but are you saying that I can't use vicious in git master? Is there an vicious object model I can refer to?

thanks for your help in advance.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#4 2012-07-02 16:53:43

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 835
Website

Re: attempt to call method 'set_gradient_colors' (a nil value) [Closed]

No, I'm saying you can't use set_gradient_colors. Gradients work different in development. If you insist on using it ask on the mailing list how to create gradients, I don't know.

Edit: you can also read this to see where is the difference between widgets, and vicious library https://awesome.naquadah.org/wiki/Widgets_in_awesome

Last edited by anrxc (2012-07-02 16:54:56)


You need to install an RTFM interface.

Offline

#5 2012-07-02 18:46:47

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: attempt to call method 'set_gradient_colors' (a nil value) [Closed]

Hi and thanks, I checked out that section and it is still showing the object creation methods that are not working for me. Even the basic textbox creation code ends with an error of an attempt to use global widget (a nil value) so it's not got what i need. I will have to look else where.

but I do appreciate your help thanks

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#6 2012-07-03 23:30:48

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 835
Website

Re: attempt to call method 'set_gradient_colors' (a nil value) [Closed]

it is still showing the object creation methods that are not working for me.

Because it documents stable awesome, you are using a development snapshot which only the developers know how it works, documentation comes after.


You need to install an RTFM interface.

Offline

#7 2012-07-03 23:39:53

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: attempt to call method 'set_gradient_colors' (a nil value) [Closed]

I guess I will close this and look to the dev's I meant no dis-respect at all, if the answer is some where else that is where I need to look.

thanks again for all your help

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#8 2012-07-04 16:35:30

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 835
Website

Re: attempt to call method 'set_gradient_colors' (a nil value) [Closed]

Of course you didn't I just don't think you understood me at all after 3 posts. Here other people that tried to find out the same
http://www.mail-archive.com/awesome@naq … 05092.html


You need to install an RTFM interface.

Offline

Board footer

Powered by FluxBB