tiddlydesktop and access to shadowtiddlers in tiddlyspace

13 views
Skip to first unread message

MobileLibrary

unread,
Jan 8, 2011, 11:05:22 AM1/8/11
to TiddlyWeb
hi there,
the fiddling goes on. I've been preparing some adaptations of
tiddlydesktop (I know, it's old, but in my opinion still the best/
fastest/most cross-browser example of freemovingtiddlers). The weird
thing is that in tiddlySpace I can't access the shadowtiddlers, or, to
be more precise, I can't access the shadows that I haven't been
editing.
Have a look at http://tiddlydesktop.tiddlyspace.com/ for the 'naked'
example,
or http://kladblok.tiddlyspace.com/ for a more cluttered up one.
In the former you'll see 'gettingstarted' without the view/edit button
(i didn't touch it)
in the latter you'll see the same tiddler with the view/edit button.
Open up any 'blank' shadow, same problem.

Maybe related to this example is the saveLayout function in
tiddlyDesktop. that macro saves or restores the layout to
[[_tiddlyDesktopLayout]]. When trying to do this in Tiddlyspace, the
macro does change the tiddler, but it doesn't get saved to the store,
not even when clicking 'save all'. I tried renaming the goal tiddler
in the plugin, to no effect.

to be clear: from file url or over http as a 'normal' tiddlywiki, the
shadowtiddlerthing doesn't happen: http://www.mobilelibrary.nl/twdesktop/twmm.html

Any pointers? thanks,
mitchke

ps psd: that open in safe mode trick has saved my day!

rakugo

unread,
Jan 9, 2011, 6:12:38 AM1/9/11
to TiddlyWeb
I suspect the problem lies in:
http://tiddlydesktop.tiddlyspace.com/#tiddlyDesktopTheme

in the ViewTemplate it defines its own toolbar.
<div class='toolbar' macro='toolbar +editTiddler fields syncing
permalink references'></div>

Note shadow tiddlers/included tiddlers in TiddlySpace use a command
called cloneTiddler rather than editTiddler. This is because when you
edit and save them their location changes.

Replacing the above line with:
<div class='toolbar' macro='toolbar +editTiddler +cloneTiddler fields
syncing permalink references'></div>

should fix the problem.
Let us know if it doesn't.
Jon

On Jan 8, 4:05 pm, MobileLibrary <tram...@yahoo.com> wrote:
> hi there,
> the fiddling goes on. I've been preparing some adaptations of
> tiddlydesktop (I know, it's old, but in my opinion still the best/
> fastest/most cross-browser example of freemovingtiddlers). The weird
> thing is that in tiddlySpace I can't access the shadowtiddlers, or, to
> be more precise, I can't access the shadows that I haven't been
> editing.
> Have a look athttp://tiddlydesktop.tiddlyspace.com/for the 'naked'
> example,
> orhttp://kladblok.tiddlyspace.com/for a more cluttered up one.

MobileLibrary

unread,
Jan 9, 2011, 9:49:54 AM1/9/11
to TiddlyWeb
yep! so easy...
thank you!
m


On Jan 9, 12:12 pm, rakugo <jdlrob...@gmail.com> wrote:
> I suspect the problem lies in:http://tiddlydesktop.tiddlyspace.com/#tiddlyDesktopTheme
>
> in the ViewTemplate it defines its own toolbar.
> <div class='toolbar' macro='toolbar +editTiddler fields syncing
> permalink references'></div>
>
> Note shadow tiddlers/included tiddlers in TiddlySpace use a command
> called cloneTiddler rather than editTiddler. This is because when you
> edit and save them their location changes.
>
> Replacing the above line with:
> <div class='toolbar' macro='toolbar +editTiddler +cloneTiddler fields
> syncing permalink references'></div>
>
> should fix the problem.
> Let us know if it doesn't.
> Jon
>
> On Jan 8, 4:05 pm, MobileLibrary <tram...@yahoo.com> wrote:
>
> > hi there,
> > the fiddling goes on. I've been preparing some adaptations of
> > tiddlydesktop (I know, it's old, but in my opinion still the best/
> > fastest/most cross-browser example of freemovingtiddlers). The weird
> > thing is that in tiddlySpace I can't access the shadowtiddlers, or, to
> > be more precise, I can't access the shadows that I haven't been
> > editing.
> > Have a look athttp://tiddlydesktop.tiddlyspace.com/forthe 'naked'
> > example,
> > orhttp://kladblok.tiddlyspace.com/fora more cluttered up one.

MobileLibrary

unread,
Jan 9, 2011, 9:53:06 AM1/9/11
to TiddlyWeb
/edit/
it didn't do the trick for the layoutthing though. Tiddlyweb still
refuses to save the __tiddlyDesktopLayout. Any more of those really
helpful insights?

rakugo

unread,
Jan 9, 2011, 11:45:28 AM1/9/11
to TiddlyWeb
Since it is an old plugin I believe it is not Tiddly Web/Space aware.
At the moment to save things to the store you need to do

merge(tiddler.fields, config.defaultCustomFields);

before running save Tiddler


For example the following code would cause a save:
var tiddler = new Tiddler("__tiddlyDesktopLayout");
merge(tiddler.fields, config.defaultCustomFields);
tiddler = store.saveTiddler(tiddler);
autoSaveChanges(null, [tiddler]);

but this code would not:
var tiddler = new Tiddler("__tiddlyDesktopLayout");
tiddler = store.saveTiddler(tiddler);
autoSaveChanges(null, [tiddler]);

Are you able to edit the original plugin?
Jon

MobileLibrary

unread,
Jan 9, 2011, 1:37:12 PM1/9/11
to TiddlyWeb
Hi Jon,
great of you to look into this. I'm an absolute nobrainer when it
comes to code (i can read it but i haven't got a clue how to write/
change it and make it work)..
here's what happens in the plugin:

config.macros.saveLayout = {
label: "save layout",
prompt: "Save the current layout as the default",

handler:
function(place,macroName,params,wikifier,paramString,tiddler) {
createTiddlyButton(place,this.label,this.prompt,this.saveLayout);
},

saveLayout: function() {
var tiddlerName = "__tiddlyDesktopLayout";
var serializedLayout = layout.marshall();
serializedLayout = "/***\n@@''This tiddler is auto-generated - don't
edit it!''@@\n***/\n/*{{{*/\n"+ serializedLayout +"\n/*}}}*/\n";
var tiddler =
store.saveTiddler(tiddlerName,tiddlerName,serializedLayout,config.options.txtUserName,new
Date(),"excludeLists");

if (config.options.chkAutoSave) {
saveChanges();
}
}
};

rakugo

unread,
Jan 10, 2011, 4:20:05 AM1/10/11
to TiddlyWeb
Try replacing:
var tiddler =
store.saveTiddler(tiddlerName,tiddlerName,serializedLayout,config.options.t
xtUserName,new
Date(),"excludeLists");

with the following: (note there is one line change starting saveT

var tiddler =
store.saveTiddler(tiddlerName,tiddlerName,serializedLayout,config.options.txtUserName,new
Date(),"excludeLists", config.defaultCustomFields);

Let me know if that does the trick..
Jon

MobileLibrary

unread,
Jan 10, 2011, 8:28:27 AM1/10/11
to TiddlyWeb
Yiha! that dit it! I get a 'typeError:place is undefined' warning in
the browser, but yoho, saveAll does now really save all. Thanks a
million,
m
Reply all
Reply to author
Forward
0 new messages