Re: [gDesklets] Access objects from classes



Hi,

Mario Gonzalez wrote:
Inside every Starter.py there is a tuple called containers, it saves
all displays so I've found how to access to the Display content in
that way. For example:
containers[0]._Window__display._Display__content[2]

However if I've got an image and I modified its uri the image doesn't
change but the content of the variable changes :(

This is out of the top of my head (can't check the code now as I'm at work), but I think we're lacking a notification about a changed attribute.

When you call methods through the display files the elements are wrapped to make sure that input is valid and that the screen is updated after changes.

When you do the same through the core, you just end up changing a value. This won't affect the display until it is refreshed.

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?

Cheers,
Lauri

--
 Lauri Kainulainen
 ___SW Designer
 _____University of Art and Design Helsinki
 ___lauri(a)sokkelo(dot)net
 ___+35840 722 5101



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