andrewg_oz wrote:
> I just downloaded a fresh 2.1.3 and it saved OK with my
Opera 9.02 on
> WinXP. Have a look at the Java Console and see if there
are any
> messages there.
I've been trying to use TiddlySaver on GenToo Linux with
Opera 9.0 and
have had the same problem.
I started playing with the TiddlyWiki javascript directly,
tracking
down problems
with alerts and here's what I figured out:
1. It's not TiddlyWiki, it's a feature of trying to save
to a file
under 1.5.0
2. The problem relates to the need to change TiddlySaver
so that it
executes
the file save operation inside of the run method of a
PrivilegedAction derivative.
If you don't do this, you'll get exactly the
right-but-can't-read
behavior with ANY
applet in the browser (I wrote a small, separate test
for
TiddlySaver and verified this,
then wrapped the access in a privileged action class
executed
directly via
AccessController.doPrivileged and my test suddenly
worked).
3. No amount of noodling with policy files will help
unless you do
the wrapping in step 2, something
like:
import java.io.*;
import java.security.*;
... declare class, start method for saveFile and...
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
... write to file here...
}
});
...rest of file...
I haven't integrated this stuff to a version of TiddlySaver
and tried
it but I've duplicated
the bug with a separate applet and a little html that loads
it. By
allowing or revoking the right
java policy entry I can now make the write fail or not.
I've also noticed when testing:
1. Between testing you better open the java console and
tell it:
fgxl
That's finalize, garbage collect, throw away class
loaders, list
class loaders (to make sure there are none).
And close the page first.
2. Messing with policy seems to require me to close the
browser and
reopen... disabling and enabling java may or may not help
(I'm not
really sure, to be honest).
I'll give fixing this against a fresh 2.1.3, unmodified
empty.html a
try if I have time over the long weekend.
I've been wanting to do some light blogging using this thing
for a long
time but have had a lot of trouble up to now in opera9 and I
finally
decided to dig in and find the problem.
Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWiki googlegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---
|