[tw5] Re: Use a button to create a tiddler in view mode: Is this legal or illegal?

2018-08-06 Thread TonyM
Thinking about conventions and methods. In the above examples whats with 
the <<_title>>?

Is this not going to confuse the use of <<__var__>> ?

Or do I not know this convention perhaps from JavaScript?

Tony

On Monday, August 6, 2018 at 3:45:20 AM UTC+10, Mohammad wrote:
>
> Hello FrD,
>
>  I like your solution! It uses widgets for the purpose they are designed 
> (here you used the meaningful action-setfield and your code is much more 
> clearer than what I wrote!
> I use your code!
>
> Thank you
> *Mohammad*
>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9aa1f540-051b-4c6d-a13a-2d0cc4943df3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Use a button to create a tiddler in view mode: Is this legal or illegal?

2018-08-06 Thread Mohammad

>
> Many thanks Mario!
>

Best 

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d664d5d8-1a09-4b20-ac3f-f50f2053aa3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Use a button to create a tiddler in view mode: Is this legal or illegal?

2018-08-06 Thread PMario
On Sunday, August 5, 2018 at 7:40:07 PM UTC+2, Mohammad wrote:
>
> I mean from programming point of view! The good programming practice or 
> standard always recommend clean and non error prone programming!
> For example in Matlab or Fortran I use to program always we follow some 
> rules!
>

> So, here I mean standard (defacto) or good programming style!
>

There is no documented "best practice"  ... but TiddlyWiki UI itself is a 
"defacto" standard. 

Jeremy is very strictly maintaining backwards-compatibility. So if you do 
things as they are done in the default UI, you should be save, that they 
will work in the future too. 
 

> I believe the elements shall be used for the purpose they were created! 
> this help other understand code and can follow it and also it is easier to 
> debug and mainatin
>

If you use "side-effects" (bugs) to do certain things, ... they may break 
in the future, if the bugs are fixed. ... 

So imo it's better to report "buggy" behaviour, instead of using their 
side-effects :)

-m


-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e332a714-3920-458e-9a20-1a32384703a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Use a button to create a tiddler in view mode: Is this legal or illegal?

2018-08-05 Thread Mohammad
Hello FrD,

 I like your solution! It uses widgets for the purpose they are designed 
(here you used the meaningful action-setfield and your code is much more 
clearer than what I wrote!
I use your code!

Thank you
*Mohammad*

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0a7d1952-8a15-4829-bf9a-ee68027e8080%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Use a button to create a tiddler in view mode: Is this legal or illegal?

2018-08-05 Thread FrD
Hi,

Seems fine to me ! Nothing to worry about -:)
The FBI (Fake Button Investigators) won't be alerted ...

Another way to do the same :

\define _title() $(currentTiddler)$-thumbnails
\define _text() <>
\define actions()
<$action-setfield $tiddler=<<_title>> text=<<_text>>/>
<$action-navigate $to=<<_title>> />
\end

<$button actions=<>>Thumbnails2




Regards

FrD

Le dimanche 5 août 2018 19:17:00 UTC+2, Mohammad a écrit :
>
>
> Problem: 
>
> I.  I want a button to create a tiddler put some text inside it and 
> navigate to it in view mode NOT edit mode
> II. If the tiddler is already exists, I want to navigate to tiddler and 
> not create it again or create a new one with a numerical counter at the end 
> (don't want to do what action create tiddler does)
>
>
> So, I did like below:
>
> \define _title() $(currentTiddler)$-thumbnails
> \define _text() <>
>
> <$button set=<<_title>> setTo=<<_text>> >Thumbnails
> <$action-navigate $to=<<_title>> />
> 
>
>
>
> This button create a tiddler with the title of current tiddler with 
> -thumbnails suffix and put this text <> inside it and 
> then navigate to it!
>
> Is this legal or illegal?
>
> Actually I used ilegally from set/setTo parameters in button widget to 
> create a new tiddler and if it exists use and navigate to it!
>
>
>
> *Mohammad*
>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/727585a7-4fc0-4902-be7e-db8f62cd512e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Use a button to create a tiddler in view mode: Is this legal or illegal?

2018-08-05 Thread Mohammad
I mean from programming point of view! The good programming practice or 
standard always recommend clean and non error prone programming!
For example in Matlab or Fortran I use to program always we follow some 
rules!

So, here I mean standard (defacto) or good programming style!

I believe the elements shall be used for the purpose they were created! 
this help other understand code and can follow it and also it is easier to 
debug and mainatin


*Mohammad*

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5b4cc82b-997e-4ddd-ba57-c4dfdc24208b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.