Hmm...The dirtiness markers of TWC are provided by functions. In TW5 I use 
a listener to listen to the class "tc-dirty", but nothing can listen to a 
result from a function! Is it mean that I have to use a timer to grab the 
dirtiness status and send it back to Tiddloid?

For the second question, window.config.messages.confirmExit only exists in 
TWC. And another thing is that pull requests are welcomed, so if someone 
contributes a localized string.xml, not only the dialog, but the whole app 
will soon localized in the next update(Currently I could only offer 
simplified Chinese and English and a few other languages provided by Google 
Translate).

在 2019年8月29日星期四 UTC+8上午5:18:34,Yakov写道:
>
> Hi donmor,
>
> could you clarify the dirty attribute thing? Did I get you correctly that 
> Tiddloid is looking for the "total-dirty" attribute of some DOM element to 
> check whether TW is dirty? If so which element should that be?
>
> Currently, TiddlyWiki Classic has 2 dirtiness markers:
>
>    - the dirty property of the global store object (window.store in 
>    browser, an instance of TiddlyWiki "class") which is supposed to be 
>    got via the store.isDirty() 
>    
> <https://github.com/TiddlyWiki/TiddlyWiki/blob/master/js/TiddlyWiki.js#L46> 
>    helper and this property means "there are some changed but unsaved 
> tiddlers"
>    - the dirtiness of the story global object which is calculated using 
>    the story.areAnyDirty() 
>    <https://github.com/TiddlyWiki/TiddlyWiki/blob/master/js/Story.js#L482> 
>    helper which looks at each tiddler element's dirty attribute and 
>    doesn't store a single flag anywhere; this dirtiness means "some edit 
>    fields got some changes but those were not applied to tiddlers yet"
>    
> Ideally, the warning should be shown when either dirtiness is present, 
> like ShowUnsavedPlugin checks 
> <https://github.com/YakovL/TiddlyWiki_ShowUnsavedPlugin/blob/master/ShowUnsavedPlugin.js#L27>;
>  
> to be precise, areAnyDirty currently checks whether any tiddler is in the 
> edit mode (regardless any its field was touched or not) which is something 
> to improved, but don't bother with this.
>
> My main question is – can Tiddloid check those 2 markers in TWC and show 
> the "are you sure to exit with unsaved changes?" dialog only when one of 
> those markers is dirty? Or the only way is to implement the "total-dirty" 
> attribute somewhere?
>
> Another question is – for the sake of localization, can Tiddloid use the 
> message from (window.)config.messages.confirmExit for the dialog? (this 
> way, if someone has a translation installed, they will get a localized 
> dialog)
>
> Best regards,
> Yakov.
>
> воскресенье, 18 августа 2019 г., 20:11:57 UTC+3 пользователь donmor3000 
> написал:
>>
>>
>>    - Sorry but the total-dirty attribute of the whole TWC document not 
>>    found yet. That's why Tiddloid's dirty indicator works only with TW5.
>>    - I've never had this problem. Maybe try updating the app and click 
>>    SAVE in every wiki?
>>
>>
>> 在 2019年8月6日星期二 UTC+8下午8:13:27,Vincent Yeh写道:
>>>
>>> No more extra confirmation to close a tiddler, thanks a lot for the 
>>> update!
>>>
>>> I am now, however, having two issues using it. One is that the dirty 
>>> flag does not comply with the store.setDirty() function in the classic 
>>> version. My view mode editor plugins, twve, rely on this API function to 
>>> inform the TWC about changes made through my plugins. It is not working 
>>> now, Tiddloid is not aware of any change made through twve.
>>>
>>> The other is that the tiddler list shown upon opening the app does not 
>>> contain the title of tiddlers as it did. Every tiddler is shown as 
>>> TiddlyWiki and that's it. I am not able to tell which one is which any 
>>> more! I opened tiddlers existing in another folder, if that helps.
>>>
>>> Like I said, it is a great work and I really enjoyed using it. If these 
>>> two issues can be fixed somehow, that will be very much appreciated!
>>>
>>> Best,
>>> Vincent
>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/cab31fa6-3b00-4aee-af47-5025cb04d26c%40googlegroups.com.

Reply via email to