sorry, accidentally hit enter (cold hands / fingers) Questions (continued) 3) How can I invoke a refresh of the tiddler containing the macro properly at the end of the plugin?
4) Finally can I disable / enable the autosave as part of the plugin? One answer, Four questions, I imagine that shows my minimal experience, I am trying to learn - and I don't mean to be a bother. As for the formatting, I would like to learn the correct methods, so I do not inherit the bad habits of others, I have spent more time looking at / modifying other code examples then trying to write my own, hopefully in the future this will be opposite (and I will have less questions) Thank You, Mike On May 17, 2:58 am, Eric Shulman <[email protected]> wrote: > > Any other troubleshooting ideas? > > (if I disable TrashPlugin, and use the Else statement, everything > > works like before I started to try and add compatibility to > > TrashPlugin) > > This is the error message shown by FireBug: > "story.findContainingTiddler(place) is null or undefined" > > This is the offending line of code: > story.refreshTiddler(story.findContainingTiddler(place).getAttribute > ("tiddler"),null,true); > > The problem is that 'place' is not defined within your *onclick* > handler. As a result, findContainingTiddler() return null, and then > the attempt to invoke getAttribute() on that value triggers a fatal > error inside the loop... thus, only the first item is processed before > the error occurs. > > Curiously, an examination of the rest of the code would suggest that > this error *should* also affect the direct store.delete() handling as > well, but this doesn't seem to be the case. Unfortunately, it's very > difficult to read your code, as it lacks proper K&R indentation and > formatting, so I'm not going to spend a great deal of time trying to > figure out why... > > Also, for performance reasons, you should consider disabling > config.options.chkAutosave before the loop, and then re-enabling it > afterwards and only then invoke saveChanges(), after all the tag > changes have been applied. > > -e --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/TiddlyWikiDev?hl=en -~----------~----~----~----~------~----~------~--~---
