[tw] Re: [TW5] button to edit draft of a transclusion

2015-11-14 Thread aaron . sotton


Hi Tobias,

As you have requested.

First, to give a bit of context, below is the layout. The top row are just 
buttons that generate new tabs for the same tiddler. By the way, these 
buttons were meant to be replaced by the dropdown list selection that I 
asked about in another earlier thread 
. 
Unfortunately I haven't been able to successfully implement your solution, 
but still working on it. Now in the individual tabs, some have a template 
that has a button to "add a sub topic". This sub topic is suppose to a new 
tab (this one vertical) to the tiddler of the selected tab - this is the 
tab within the tab. The tiddler of each tab is tagged with the title of the 
immediate parent tab. 




Here is the code for the "add sub topic" button (tiddler name = add-sub-tab)

\define the-tags()
[[$(currentTab)$]]
\end

\define create-new(title)
<$button>
<$action-sendmessage $message="tm-new-tiddler"
 title="$(currentTab)$" $param="CM_template"
 tags=<> />
 add sub topic
\end

<>


and here is the code the template called by action-send message (tiddler 
name = CM_template)

{{||edit-self-button}}{{||add-sub-tab}}
<$macrocall $name="tabs" state="$:/state/tabs/tab1" tabsList=
"[tag[$(currentTab)$]]" class="tc-vertical"/>

and here is the code for the button that is suppose to edit the transcluded 
tiddler (name = edit-self-button)

<$button to="$(currentTab)$" message="tm-edit-tiddler" >
<$list filter="[prefix[yes]]">
{{$:/core/images/edit-button}}



Let me know if there is any other specific detail you require.

Thank you


On Saturday, 14 November 2015 08:31:05 UTC-8, Tobias Beer wrote:
>
> Hi aaron,
>
> Please post your actual tabs code.
>
> Best wishes,
>
> — tb 
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1d824ff6-44bd-4e25-a8b5-cc3d11e66a5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] [TW5] button to edit draft of a transclusion

2015-11-13 Thread aaron . sotton
Hi all, once again another elementary question as I stumble my way through 
TW5

My UI makes use of some tabbing, and in some sections uses tabs within tabs 
as well. I had some issue figuring out how to getting some templates 
working, without running into all sorts of recursion issues. I eventually 
learned about the "currentTab" variable and it helped.

But I am now stuck because the templates of this tabbed interface really 
need to each have a button calling the editor. As it is, I am spending a 
lot of time trying to hunt down the transcluded tiddlers when I need to 
edit the notes; it would be nice if each transclusion carried its own 
little edit button so that I can launch the draft wherever it may get 
inserted - without having to recall and search for the title of it.

To this end, I am trying to figure out how to use tm-edit-tiddler to solve 
the problem. However, so far all the different way I have tried (e.g. using 
$set and name to currentTab), the edit button still ends up bringing up the 
draft of the parent tiddler - rather than the draft of the transcluded 
section I am interested in.

Any advice on how I can define the scope of the tm-edit-tiddler properly?

<$button ~~param???~~ message="tm-edit-tiddler" >
<$list filter="[prefix[yes]]">
{{$:/core/images/edit-button}}





-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1a81b4bc-2c51-407a-b49c-f13cf7954f6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: select word from list in dropdown/SelectWidget and create new tiddler with same title

2015-11-10 Thread aaron . sotton
Dear Tobias,

Thank you for kindly taking the time to review this issue. I have quite 
literally spent the last 4-5 hours trying to get around this issue... in 
the process I learned a lot about customizing TW5, but ultimately felt 
defeated as I couldn't reason my way through the macro documentation to a 
solution.

I'm going to upgrade to the pre-release, and try out your recommendations 
tomorrow.

Your help is much appreciated

On Tuesday, 10 November 2015 00:18:56 UTC-8, Tobias Beer wrote:
>
> Hi aaron,
>
> There are a few issues here.
>
>1. make sure not to confuse the terms widget and tiddler, i.e. there 
>are no "draft widgets" in the sense you described it
>2. you can't use the ViewWidget  in 
>a macro like that
>   - the documentation would probably benefit from mentioning that
>   - macros simply do text-substitution, no (evaluation via) 
>   wikification
>   - what you need to use instead is to get the selected option and 
>   save it into a variable using the SetWidget 
>   
>  - and to wrap your create button with all that to make the 
>  variable available to its scope
>   3. some examples for the SelectWidget 
> on tiddlywiki.com specify state 
>tiddlers that are not system tiddlers, a pattern you adopted
>   - this is a poor design choice as it pollutes the tiddler space
>   - any such state should be put either under *$:/temp/some-select*, 
>   or at best: *$:/state/some-select*, never just *some-select*
>   - so, someone should update those documentation tiddlers
>4. there's a bug in the current release 5.1.9  
> where 
>the set widget won't refresh properly, so changing what's selected won't 
>update any variable assignments based on that
>   - this is fixed in 5.1.10-prerelease 
>   
>   - which brings me to how your example could / would / should 
>   actually work...
>  - try the below out with the 5.1.10-prerelease 
>  :
>   
> \define the-tags()
> foo bar
> \end
>
> \define the-title()
> $(currentTiddler)$ — $(selected)$
> \end
>
> \define create-new(title)
> <$button>
> <$action-sendmessage $message="tm-new-tiddler"
>   title=<>
>   tags=<> />
> <$list filter="[prefix[yes]]">
> {{$:/core/images/new-button}}
> 
> 
> \end 
>
> <$select tiddler=<> default=''>
> <$list filter='[tag[HelloThere]sort[title]]'>
> >><$view field='title'/>
> 
> 
>
> <$set name="state" value=<>>
> <$set name="selected" filter="[get[text]]">
> <>
> 
> 
>
> Trying this out has one more *core* problem which is that we do not have 
> a way yet to tell a filter to not return a string of "listified" titles but 
> a plain string. What does that mean? It means that if [get[text]] 
> returns a title that has spaces in it, it will be returned as *[[the 
> title]]* instead of just *the title*... which obviously breaks your title 
> pattern in that you do not want any double square brackets in it.
>
> A solution to the problem is proposed in this issue which thus appears 
> crucial with respect to the usability of the *SelectWidget*:
>
> *#2057 list accessors for variables and text references*
> https://github.com/Jermolene/TiddlyWiki5/issues/2057
>
> Eventually, when all this is fixed and released, the SelectWidget 
>  documentation should show examples 
> of how to actually use a selected option, e.g. in a macro as you do, rather 
> than just show how it all writes some selected state to some state tiddler 
> and how we can display that somewhere else.
>
> Best wishes,
>
> — tb
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/decc87a0-e17d-4f45-8755-47de8ce4a507%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] select work from list in dropdown/SelectWidget and create new tiddler with same title

2015-11-09 Thread aaron . sotton
Hi all,

I'm only a few days into using TiddlyWiki, so please pardon my ignorance. 

This is what I am trying to do


   1. make a drop down list populated dynamically based on tags - I have 
   been successful in doing this. 
   2. create a button that when clicked, created a new draft widget with 
   the a title that has the words chosen in 1 as part of its title (but not 
   exactly it, it has some words added to what was selected).


This is the macro I have so far:


\define newHereButtonTags()
[[$(currentTiddler)$]]
\end

\define testWhy()
<$view tiddler=<>>
\end

\define newHereButton()
<$button>
<$action-sendmessage
  $message="tm-new-tiddler"
title=<>
  tags=<> />
<$list filter="[prefix[yes]]">
{{$:/core/images/chevron-up}}


\end 

<$select tiddler=<> default=''>
<$list filter='[sort[title]tag[JustSOmeTags]]'>
>><$view field='title'/>



<>
<>


I created the dropdown list, it is correctly populated with the tags 
[justsomeTags]


What happens is that when I press the button <>, it does 
indeed create a new draft widget, and it tags it automatically with the 
title of the $(currentTiddler)$.


However, for the life of me I can't figure out why the title of the draft 
is not getting fetched properly. What I am getting is something like: 
<$view tiddler=<>> as the title.


The ultimate goal is to have the title of the new tiddler to be: " title of 
the parent tiddler (the one that has the button)" + appended text based one 
what was selected using the selectWidget drop down list.



-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4337b19a-4464-4ae6-ab1a-afc6548aba13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] fastest way to include frequent screen shots

2015-11-06 Thread aaron . sotton
I'm a recent discoverer of TW5, and everything about it is magical. But 
this one hang up is approaching a deal breaker in my application.

I require taking screen shots of various things to include along the notes 
very frequently. Being used to OneNote, I grew to take the rapid fire 
ability to call up the snippet tool and pasting screenshots for granted.

In TW5, this what I have tried so far


   - The long route: taking a screen shot to clipboard --> using a 
   clipboard auto-save utility to automatically save it to a set location --> 
   importing the screenshots to TW5 --> the including the image with the 
   syntax. This may not be so bad if I had just a few images here or there I 
   wanted to document as part the notes, but it is not uncommon for me to take 
   10-30 screenshot in a given hour. You can imagine it quickly grinds the 
   whole process to a halt
   - The alternative route: installed CKEditor with VisualEditor plugin. It 
   enables direct image pasting. The downside is that I can't use Wiki syntax 
   anymore.

Either compromise is very undesirable.


Any suggestions on what else I may try to get around the issue?

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6d43291d-e890-4302-8af1-de7aa9ee6883%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.