Elv13 / radical

An extensible menu subsystem for Awesome WM
222 stars 16 forks source link

Changes to Object.lua #15

Closed Elv13 closed 10 years ago

Elv13 commented 10 years ago

Object.lua has not changed in more than 2 years. It works just fine and never let me down. However, it always had a major issue: it is incompatible with Awesome 3.5 gears/object.lua. They both serve the same purpose and work less or more the same way (despite both being clean room implementations of Awesome 3.4 signal convention.

The major advantages of UltiLayout/object.lua / Radical/object.lua are the ability to manipulate properties.

Awesome 3.5 have manu get and set functions while radical usually use properties (item.text = "foo" and local text = item.foo). I think it is possible (and worthy) to support awesome setters and getters as proxy functions instead of hiding a "get_map" and "set_map" table deep in the hidden API. It will also make it easier to extent radical/object.lua based objects. It may or may not possible to also use it as "drop in" replacement too. That would be awesome as it would restore Awesome 3.4 like properties.

local tb = wibox.widget.textbox() tb.markup = "sfsdfsdf"

Elv13 commented 10 years ago

Done