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 {
                if (applet && filePath) {
                        return applet.saveFile(javaUrlToFilename(filePath), 
"UTF-8", content);
                }
        } catch(ex) {
                logTiddlySaverException("javaSaveFile", ex);
        }
        // is this next block working anywhere ? -- grmble
        try {
                var s = new java.io.PrintStream(new 
java.io.FileOutputStream(javaUrlToFilename(filePath)));
                s.print(content);
                s.close();
        } catch(ex2) {
                return null;
        }
        return true;
}


 

> At the same time, if I do this in Chrome, I get
>> <applet style="position:absolute;left:-1px" name="TiddlySaver" 
>> code="TiddlySaver.class" archive="TiddlySaver.jar" width="1" height="1"/>
>> in both cases.
>>
>
> That's correct.
>  
>
>> Also, the same thing (HTMLCollection) appears instead of the applet in 
>> Opera with the new TiddlySaver. So, this is the reason why saving doesn't 
>> work..
>>
>
> Not surprising... if the problem is the errant doubling of the 
> <applet>..</applet> block, then the problem will appear regardless of the 
> version of TiddlySaver.jar you attempt.
>
> Some things to try:
> 1) One way to look for confirmation of the problem, search the entire TW 
> document source using a full-text editor, to see if a hard-coded 
> <applet>...</applet> block exists (other than the conditional one present 
> in the document.write()).  If such a block is found... try removing it from 
> the document and then repeat your experiments to see if that fixes the 
> problem.
>
> No saved blocks in the source.
 

> 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:

//]]>
</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>*

<script id="jsdeprecatedArea" type="text/javascript">
//<![CDATA[
//--
//-- Deprecated Crypto functions and associated conversion routines.
//-- Use the jQuery.encoding functions directly instead.
//--

then some deprecated code and some other goes (which is not repeated), and 
in the end of the text:

// Remove existing style sheet
// options.id is an optional name identifying the style sheet
// options.doc is an optional document reference
$.twStylesheet.remove = function(options) {
    options = options || {};
    var id = options.id || defaultId;
    var doc = options.doc || document;
    var el = doc.getElementById(id);
    if(el) {
        el.parentNode.removeChild(el);
    }
};

})(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>*
<!--POST-SCRIPT-START-->

<!--POST-SCRIPT-END-->


</body></html>
 

>  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.

Best regards,
Yakov.

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to