Hi again Mark,

Thank you, this did work.  I tried it out immediately (briefly) when
you posted and it just hung up my browser, but I must not have
corrected the changes Google groups make to code.  I finally tried it
again just now and it works perfectly!! :-)

I guess that this...

 var en = store.tiddlerExists("Note$1$2:"+i)?"N":"n" ;

is a kind of "if/then" statement.  I was preparing to attempt to
figure this out at a generic javascript tutorial site, but they never
have the tiddlywiki phrases, and I'm not usually successful at doing
so.  Anyway, I'm appreciative anytime smarter people like you are
willing to take the time.

Dave

On Feb 17, 9:15 am, Dave Parker <[email protected]> wrote:
> Thank you Mark, I will give that a try.
> Dave
>
> On Feb 15, 3:52 pm, "Mark S." <[email protected]> wrote:
>
> > Maybe something like:
>
> >  for (var i=cntStart; i<max; ++i) {
> >   var en = store.tiddlerExists("Note$1$2:"+i)?"N":"n" ;
> >   out += "|border-width:0px;++...@["+en+"] [[(go)|Note$1$2:"+ i + "]]
> >  <<tiddler [[Note$1$2:" + i +"]]>>===|border-width:0px;<<tiddler $1##
> >  $2." + i +">>|\n"
>
> >  }
>
> > On Feb 15, 1:05 pm, Dave Parker <[email protected]> wrote:
>
> > > Hi,  I have this part of a script that makes a table:
>
> > > for (var i=cntStart; i<max; ++i) {
> > >  out += "|border-width:0px;++...@[n] [[(go)|Note$1$2:"+ i + "]]
> > > <<tiddler [[Note$1$2:" + i +"]]>>===|border-width:0px;<<tiddler $1##
> > > $2." + i +">>|\n"
>
> > > }
>
> > > and I want to change the [n] to [N] (or maybe [''n'']) if the tiddler
> > > the script refers to exists.
>
> > > How would one do such a check?
>
> > > the only thing I could find that might help is the "NewMeansNewPlugin"
> > > that has this in it:
>
> > > String.prototype.getNextFreeName = function() {
> > >        var numberRegExp = / \(([0-9]+)\)$/;
> > >        var match = numberRegExp.exec(this);
> > >        if (match) {
> > >                var num = parseInt(match[1]) + 1;
> > >                return this.replace(numberRegExp," ("+num+")");
> > >        }
> > >        else {
> > >                return this + " (1)";
> > >        }
>
> > > }
>
> > > ...but I suspect this might not help because it appears to be
> > > comparing the existing tiddler with the current (thus the use of
> > > "this" ???) and my use would not be referring to the tiddler with the
> > > script at all.  (To summarize, I really don't know what I'm doing -
> > > help!)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/tiddlywiki?hl=en.

Reply via email to