closeOthers is not working.

62 views
Skip to first unread message

Nicholas Franks

unread,
Nov 16, 2012, 11:40:54 AM11/16/12
to tiddl...@googlegroups.com
Trying:

<<closeOthers>> macro is not working.  I plan to have this ability to close all other Tiddlers on each one I include, but cannot seem to get the syntax correct.

I've also tried "// Commands supported by the toolbar macro": config.commands.closeOthers

That has failed too, along with all variations that I can possible find.

A search only comes up with the SinglePagePlugin, but for my purposes I am not going to be able to use that because this is a distributed page that I am creating, and have not been able to acquire permission for it as well.

PMario

unread,
Nov 17, 2012, 9:46:50 AM11/17/12
to TiddlyWiki
closeOthers isn't a macro. It's a toolbar command. So it can only be
used within ToolbarCommands tiddler.
Do you want to use it within your own javascript code, or as tiddler
content.

-m

Nicholas Franks

unread,
Nov 17, 2012, 10:37:55 AM11/17/12
to tiddl...@googlegroups.com
Being new to this I did not know the difference between the macro's and commands.

All I was wanting to do is just have 1 tiddler open at a time since my current count is going to be something around 40 tiddlers.  Since I have not been able to get permission to use the SinglePagePlugin, I thought that I could just add something to each Tiddler to have them close all the other ones.  I was mistaken about this.

If I was going to use it in the javascript, I believe I would have to have the inline javascript plugin, which I would just as well need permission to use I believe since I am distributing the page.

I believe all I need to do is just make reference within the project of the plugins used...the actual HTML/Javascript code is going to be kept in tact, and the users will still have access to it.  I am just limiting the content being displayed to them, as well as limiting their ability to edit anything on the distributed pages since any edits might hinder the intended content that they see for help.

Eric Shulman

unread,
Nov 17, 2012, 1:23:17 PM11/17/12
to TiddlyWiki
> not been able to get permission to use the SinglePagePlugin, I thought that
> ...
> the inline javascript plugin, which I would just as well need permission to
> use I believe since I am distributing the page.

All TiddlyTools "components" (plugins, scripts, transclusions,
stylesheets, templates, etc.) are published under a Creative Commons
"BY SA" license:
http://creativecommons.org/licenses/by-sa/3.0/
which requires proper attribution (BY) -- you must keep all credits,
links, etc. intact -- and "share-alike" (SA) redistribution, which
means that you cannot charge people a separate licensing fee for any
TiddlyTools components included in *YOUR* product, because I don't
charge a licensing fee for the work product I've published on
TiddlyTools.com.

However, this does not in any way prevent you from re-distributing
TiddlyTools components in your product and charging whatever fees you
decide are reasonable for the additional value that your product
provides, as long as you are prepared to provide front-line support,
as described in the "Terms of Use" section of:
http://www.tiddlytools.com/#LegalStatements

Of course, if your product is successful at bringing in revenue, it
would be appropriate to "share the wealth" by making regular and
repeated donations back to TiddlyTools... and, since I don't charge
any specific fee for my work, you should decide what is a reasonable
payment based on how much you are bringing in from your product and
what proportion of that value is being provided by the TiddlyTools
components you have used.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact

Eric Shulman

unread,
Nov 17, 2012, 1:27:02 PM11/17/12
to TiddlyWiki
You *can* use toolbar commands as embedded tiddler content, by using
the <<toolbar>> macro:
<<toolbar closeOthers>>
You can place the macro directly into tiddler content, and the "close
others" command will be inserted.

-e

Eric Shulman

unread,
Nov 17, 2012, 1:38:19 PM11/17/12
to TiddlyWiki
> I could just add something to each Tiddler to have them close all the other
> ones.

The "closeOthers" toolbar command creates a clickable link that closes
any open tiddlers (other than the current one). Note that this
command link requires a user action (clicking the link) to trigger the
processing, so I don't think it's what you want.

TiddlyTools' SinglePageModePlugin will achieve your goal, and provides
several options for how to handle the display of one tiddler at a
time.

There is also another solution that you should consider:
http://www.TiddlyTools.com/#CloseOtherTiddlers

This tiddler is a "transclusion"... which means it's not a plugin (no
"systemConfig" tag), and it is invoked by using the <<tiddler>> macro
to embed content from one tiddler within another tiddler, like this:
<<tiddler CloseOtherTiddlers>>
When the transcluding tiddler is rendered, the CloseOtherTiddlers
transclusion will be triggered automatically, and will close any other
open tiddlers without needing a separate user action.

You can embed the <<tiddler CloseOtherTiddlers>> macro into
invdividual tiddler content to decide on a case-by-case basis which
tiddlers will be "one at a time" based on their content or, if you
prefer to have ALL tiddlers display "one at a time", you can embed the
macro call in the [[ViewTemplate]], so that it is invoked for every
tiddler. Simply place something like this at the end of the template
definition:
<span macro="tiddler CloseOtherTiddlers"></span>

Nicholas Franks

unread,
Nov 18, 2012, 1:24:26 PM11/18/12
to tiddl...@googlegroups.com
Thanks Eric for the clarifications.  I had no issues posting proper attributes about what the documentation was developed with, as well as providing shares of any donations that I was to receive...

Had, as in past tense.  It seems my program is moderately incompatible with 64-bit Windows users.  There is too many issues with them using the Access Database that I am including.  Moving to SQL would be one solution, provided I could understand what all was needed...but I don't.

Even though I am completely new to using TiddlyWiki, I had even thought about somehow using it instead for the entire application...I am sure work has been done on some front or another for using an external datafile for portability.  But after a few searches I can come up with nothing...even if I could I probably would lose my mind working out all the details of how it is supposed to work.

Atleast I know if I make something I can include documentation built with TiddlyWiki and plugins without violating any licensing.

Eric Shulman

unread,
Nov 18, 2012, 3:05:23 PM11/18/12
to TiddlyWiki
> Even though I am completely new to using TiddlyWiki, I had even thought
> about somehow using it instead for the entire application...I am sure work
> has been done on some front or another for using an external datafile for
> portability.  But after a few searches I can come up with nothing...even if
> I could I probably would lose my mind working out all the details of how it
> is supposed to work.

Depending on the complexity of your data handling needs, you can use
TiddlyWiki itself as a simple database system, where individual
tiddlers are records containing data fields (using slices, sections,
or custom fields), and tiddler tags are used to identify different
groups of tiddlers that can be handled as separate tables.

You can use
http://www.TiddlyTools.com/#TaggedTemplateTweak
combined with customized pairs of [[TagnameViewTemplate]] and
[[TagnameEditTemplate]] to implement different "typed" view/edit mode
displays for tiddlers that are tagged with specific tag values. Once
defined, these templates allow you to quickly enter custom field
values to construct the tiddlers containing the 'database records'.

After you've created some tiddlers with data content, you can then use
plugins such as
http://www.TiddlyTools.com/#MatchTagsPlugin
http://www.TiddlyTools.com/#GridPlugin
http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin
and others to select tiddlers by matching tags and/or field values and
then generate and format output to present reports that show the
desired field values from those tiddlers.

While there IS a learning curve, I think you may find that TiddlyWiki
is a very flexible and powerful environment for to create self-
contained, single-page 'database' applications, at least for some well-
defined use-cases. Perhaps your application is one of those cases?

whatever

unread,
Nov 19, 2012, 9:30:00 AM11/19/12
to TiddlyWiki
Hi!

Off the top of my head, here are two examples of "database"
applications using tiddlers for storing information:

http://www.strm.us/tw/cigars
http://tiddlymarks.tiddlyspot.com/

This should give you some idea as to what you can do with
TiddlyWiki. :)

w

Nicholas Franks

unread,
Nov 19, 2012, 11:53:53 AM11/19/12
to tiddl...@googlegroups.com
Thanks for the information Eric & Whatever.

After looking over the links, I am not too sure that I could use TiddlyWiki for the database.  My first application was just a simple calculator that calculated preset prices that the user could tweak.  User liked the "Click-click-click = price" method of calculating.  However, a lot of people wanted a more in-depth application, being able to set their own items and prices, as well as save the information somehow...pretty much a POS (point of sale) application.  In order to cover the requests from the users in requirements for exactly "what" they were charging and "how", I had to develop a manufacturing database with MS Access, since I know jack-diddly about MS SQL-anything (we didn't get to go over that in school).

Of course the explanation makes it very generalized and vague as to why I will most likely be unable to use TiddlyWiki for the needs of the users.  My recent application, Cake Price Calculator 2.0, was designed with the ability to "Create an Order with Cakes" - "Create a Cake with Layers" - "Create a Layer with a Pan & Cake/Filling/Icing Recipes"...each of these have "Extras" that can be added with prices to calculate in such a way to allow the user to fully control "what" the were charging and "how".  Pan Servings would calculate "price per servings" for the Recipes, other "Extras" would calculate a flat rates depending on what they were.  The user can have Rental Items...etc, etc, etc...

So, if you understand that basic description of what the application currently does, I am building an Order with Items, that must be built with Components first, all before calculating and assigning a Customer to the order and setting Delivery information.  The downsides of the current application is Mac users cannot use it, and 64-bit users have architecture issues with the MS Access database.  On top of that there are features that I have not been able to implement as I require feedback from the users before I can proceed...since the majority of the users have 64-bit systems, I have not had too many positive results :(

I have currently been reading through all the TiddlyWiki documentation with the mindset of a way to use it for the documentation only for my application.  However, now I'm looking into the interaction of TiddlyWiki, along with the much appreciated links, as to have I can achieve the same essential application.  That would not only allow Mac users to possibly use the application, but would also keep me from needing to mess with MS SQL for the data.

Sorry for the novel here...I'm pretty much new to developing anything outside of C# & VB.NET, so this has been somewhat of a new experience trying to adjust to.  While I don't understand how it will all work yet, I am working on that atleast ;)

whatever

unread,
Nov 19, 2012, 12:37:42 PM11/19/12
to TiddlyWiki
Obviously, while TiddlyWiki can be used for many things, it's not
suitable for everything. As for calculating and table editing, see
Vincent's TWcalc and TWtable (1).

http://twtable.tiddlyspace.com/

w

Nicholas Franks

unread,
Nov 19, 2012, 1:25:46 PM11/19/12
to tiddl...@googlegroups.com
Yes, which is why initially I was thinking that I would not be able to use TiddlyWiki for my purpose.  However, after looking over what I have so far I am beginning to think that it might, it just will take me a long time to sort out the details.

I'm not going to list all the small details of how I am thinking this is going to work, but for starters:  If I have entry forms on a TW, users can edit stuff to use for calculating, so if they entered a CakeRecipe & Price, it could be tagged "CakeRecipe" or something.  When I got ready to use it I could just populate a list with all the tagged "CakeRecipe" in it...the user selects which one...it calculates, then I could just save that as a new tiddler tagged "Layer" that would go into a "Cake" tagged tiddler...

So yeah, all the details are there, just understanding how it is supposed to work together is where I will likely have issues at...but I am working on it ;)

And I appreciate all the links to give me ideas of how this "could" be possible.

whatever

unread,
Nov 19, 2012, 1:30:47 PM11/19/12
to TiddlyWiki
Reply all
Reply to author
Forward
0 new messages