Hi Danielo

The refresh method of a widget is responsible for updating the widget (and
it's children) in response to changes in the tiddler store. The refresh
method shouldn't have any side effects beyond updating the widget tree and
the DOM (so you shouldn't, for instance, modify tiddlers within the refresh
method).

The reason that widgets inspect their attributes in the refresh method is
to check to see if they have changed. If the update to the store hasn't
caused changes to any of the widget attributes, or to tiddlers or variables
that the widget depends upon, then the widget doesn't need to refresh
itself, and can just call it's children to give them a chance to refresh
themselves.

Danielo, it would be much easier to help you with questions like this if
you could give a clearer idea of what you are trying to accomplish.

Best wishes

Jeremy




On Sat, Apr 5, 2014 at 7:00 PM, Danielo Rodríguez <[email protected]>wrote:

> Hello community!
>
> I'm trying to create my own widget from scratch. I already made some
> successful modifications to existing widgets but this is a completely
> different story.
> I understand most of the predefined functions but I don't know what to do
> with the refresh function.
>
> I observed that widgets monitor some key properties and then refresh, but
> I don't understand why those properties. Some of that properties are, for
> example, style, class,title... Why should widgets monitor those things?
> what is the purpose? Even "non visible" widgets like NavigatorWidget monitor
> some variables. Why?
>
> If I want to create a tiddler that modifies the content of a specific
> tiddler... which properties should I take in account for refresh?
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywikidev.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to