I'm running into what seems to be a scope issue and not sure how to work
around it. I'm hoping that some experts here might see what I'm doing
wrong.
I have an edit-text widget for the user to enter a new title name, and then
I need to append a date to the end of it and create a new tiddler for it. I
can have that work with the button no problem, but can't figure out how to
add they keyboard shortcut properly.
This works from a button standpoint:
\define newtiddlername() $(mytitle)$ $(now)$
\define addnewtiddler() <$action-createtiddler
$basetitle=<<newtiddlername>>/>
<$edit-text tiddler="$:/temp/mytitle" tag="input" default=""/>
<$vars mytitle={{$:/temp/mytitle}}>
<$button actions=<<addnewtiddler>>>
Add
</$button>
</$vars>
but this doesn't work
\define newtiddlername() $(mytitle)$ $(now)$
\define addnewtiddler() <$action-createtiddler
$basetitle=<<newtiddlername>>/>
<$keyboard key="enter" actions=<<addnewtiddler>>>
<$edit-text tiddler="$:/temp/mytitle" tag="input" default=""/>
<$vars mytitle={{$:/temp/mytitle}}>
<$button actions=<<addnewtiddler>>>
Add
</$button>
</$vars>
</$keyboard>
I tried moving the vars outside of the keyboard, but then each character
typed makes the input box lose focus...
Ideas?
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/c2c6064e-139c-4d5e-9ea8-bca3d10feffcn%40googlegroups.com.