Re: [gDesklets] Access objects from classes



On 07/11/2007, Lauri Kainulainen <lauri sokkelo net> wrote:
>
> One solution would be to give containers a method like
> setAttribute(attrName, value) that does the change of value and
> refreshes the view.
>
> Any other ideas, anyone?
>

  I think I found a solution. Maybe it isn't elegant but:

1) I wrote a function inside a .display file
2) I hacked Starter.py file and I added something like the next
paragraph inside a method:

  dsp = self.__containers[0]._Window__display
  scriptlet = Scriptlet("change_img()", dsp._Display__display_file)
  dsp._Display__script.execute(scriptlet)

 Now (writing this email) I think I could use the "scriptlet" from the
Display.py file and avoid the import Scriptlet in Starter.py

 So, with this "solution" (is this really a solution?) I'm able to
access to any object inside a .display file.


Best Regards.
>

-- 
http://www.advogato.org/person/mgonzalez/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]