On Monday, September 8, 2014 1:18:40 PM UTC-7, Yakov wrote:
>
> So,
>>
>> In TW 2.9.0 (and old TiddlySaver), I get (!)
>>> HTMLCollection [<applet style="position:absolute;left:-1px"
>>> name="TiddlySaver" code="TiddlySaver.class" archive="TiddlySaver.jar"
>>> width="1" height="1"/>, <applet style="position:absolute;left:-1px"
>>> name="TiddlySaver" code="TiddlySaver.class" archive="TiddlySaver.jar"
>>> width="1" height="1"/>]
>>>
>>
>> Uh oh.. that's not right. The value of document.applets['TiddlySaver']
>> returns
>> an HTMLCollection with two applets, rather than just one. It looks like
>> there are TWO "TiddlySaver" applets loaded at the same time, which would be
>> a likely side-effect of the potential problem with recreateOriginal() that
>> I described above.
>>
>> By the way, with the old TiddlySaver, this bad-semantics fixer plugin
> enables saving:
>
> javaSaveFile = function(filePath,content)
> {
> var applet = document.applets['TiddlySaver'];* if(applet instanceof
> HTMLCollection) // YL tweak
> applet = applet.item(0);*
> try {
>
>
That makes sense... though it really doesn't address the root cause of the
problem, which is that TWO copies of the applet are being loaded (or
attempted), which Opera apparently doesn't like.
> 2) in Opera, examine the value of document.documentElement.outerHTML, and
>> see what <applet>...</applet> block(s) it contains.
>>
> There's 2 applet blocks. After the definition of the
> TW21Saver.prototype.externalizeTiddler method, there's this part:
> ...
>
then some deprecated code and some other goes (which is not repeated), and
> in the end of the text:
>
...
>
$.twStylesheet.remove = function(options) {
> ...
>
})(jQuery);
> //]]>
> </script>
>
>
>
>
>
> *<script type="text/javascript">//<![CDATA[if(useJavaSaver)
> document.write("<applet style='position:absolute;left:-1px'
> name='TiddlySaver' code='TiddlySaver.class' archive='TiddlySaver.jar'
> width='1' height='1'></applet>");//]]></script><applet
> style="position:absolute;left:-1px" name="TiddlySaver"
> code="TiddlySaver.class" archive="TiddlySaver.jar" width="1"
> height="1"></applet>*
>
Well.. that's not right! Way back in TW2.4.0 and earlier, the
"if(useJavaSaver)" code occurred after the "externalizeTiddlers" function
definition... However, in TW2.4.3(?) the deprecated code portion was added.
Looking around the archives (http://classic.tiddlywiki.com/archives), I
don't see a revision that had BOTH instances of 'if(useJavaSaver)', and the
current revision only has the one at the end (as intended).
HOWEVER... I *vaguely* remember something a long time ago about a .recipe
that might have included the if(useJavaSaver) portion twice. Exactly what
version of TW is the document with the doubled code?
I suspect that if you simply remove the first occurrence of the
if(userJavaSaver) code from that document, the problem would go away.
Of course, even if this does fix it, it doesn't explain how two instances
of that code got in the file in the first place. The problem MIGHT be
'historical', in that the problem was only with a specific revision, and it
won't re-occur as long as you are no longer using that version (or hand
edit the file as suggested above). Still, it would be useful to figure out
exactly how and when the problem was first introduced, so it can be
documented for others who may encounter it.
Then, use the browser's debugger to invoke manually recreateOriginal() and
> see if the returned value contains any "extra" <applet>...</applet> blocks.
> No applet blocks in the returned value.
>
Yes. It appears that recreateOriginal() is correctly removing both added
applet blocks as intended. My initial *guess* that this was a possible
culprit is apparently incorrect, and I am now working on the theory that
the double loading of the applet code was a build artifact from an earlier
release.
-e
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" 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/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.