Bob,

First such a set of naming standards can help immediately by helping you 
keep track, but its also easier to bundle, transfer and share, and people 
hepling you can workout the components by looking at the tiddler titles.

On Wednesday, 7 October 2020 16:50:40 UTC+11, Bob Jansen wrote:

> just seeking some clarification.
>

sure 

>
> 1. All macros are stored in the text field of the tiddler 
> $:/bobj/gallery-ops/macros and this tiddler has the tag $:/tags/Macro or is 
> each macro stored in a separate tiddler named 
> $:/bobj/gallery-ops/name_of_macro with the tag $:/tags/Macro
>
   and this tiddler has the tag $:/tags/Macro or is each macro stored in a 
separate tiddler named $:/bobj/gallery-ops/name_of_macro with the tag 
$:/tags/Macro

One tiddler "$:/bobj/gallery-ops/macros" is fine as long as they are each 
single line or terminated with \end 
Incidentally after the last definition you can see the standard content and 
you can use there to document your own macros. Apparently this additional 
content is not included when generating the macros.

But you choose how to organise them. one or many

There is now an alternate tag that is a little more specific 
https://tiddlywiki.com/prerelease/#SystemTag%3A%20%24%3A%2Ftags%2FMacro%2FView


> 2. I assume all view templates would be renamed to have the prefix 
>  $:/bobj/gallery-ops/ and remain tagged with $:/tags/ViewTemplate
>

Yes, that makes sense because you only normally see view templates as they 
are displayed.

Using system tiddlers hides them by default from searches, they don't come 
up in recent.
 

>
> 3. What do you mean by 'You can then collect code into functional tiddlers'
>


   - Well the tiddler titles are within the project they belong to, without 
   using tags and have meaningfull and somewhat invariant names.
   - [prefix[$:/bobj/gallery-ops]] will list them all
   - All macros will be found in the same tiddler for each project or at 
   least have macros in the title
   - The tiddler viewTemplate perhaps even editTemplate will be clearly 
   named as such and that is where you find their content

By using such a standard I now have a large library of projects and have 
written another project designed to work with the project tiddlers.

I have attached an unpublished solution which gives an example, add it to 
tiddlywiki.com It creates to buttons that allow you to open tiddlers in 
full view (includes view template not just content)  or edit mode in a 
window,

After importing rename $:/import to any name to keep the list of tiddler 
and explore to see examples of how I organise (this is by no means complete)
Edit $:/PSaT/new-windows and look at the fields which define each project.

Not in the attached package but in others for example I include 
$:/PSaT/project-name/helper containing a set of macros I use in multiple 
projects;

Rather than make them global I use; 
\import $:/PSaT/project-name/helper
See here https://tiddlywiki.com/#ImportVariablesWidget

Regards
Tones

bobj
>
> On Wednesday, 7 October 2020 at 15:30:33 UTC+11 Bob Jansen wrote:
>
>> Tones, Saq and Joshua,
>>
>> Thank you for all your help. My code now works as expected so I can move 
>> forward to the next 'obstacle' :-)
>>
>> bobj
>>
>> On Wednesday, 7 October 2020 at 15:28:44 UTC+11 Bob Jansen wrote:
>>
>>> Tones,
>>> Sounds interesting as a way for me to provide an update mechanism for my 
>>> TW users. I will study what you say and make changes accordingly.
>>>
>>> bobj
>>>
>>> On Wednesday, 7 October 2020 at 15:17:41 UTC+11 TW Tones wrote:
>>>
>>>> Bob,
>>>>
>>>> Lest say you choose a name bobj
>>>>
>>>> It would serve you well to put macros in a tiddler 
>>>> $:/bobj/project-name/macros and tag it macros
>>>>
>>>> In this case the project-name may be gallary-ops
>>>>
>>>> So it you were using a viewTemplate it would be called 
>>>> $:/bobj/gallary-ops/viewTemplate
>>>>
>>>> This not only allows you to build the solution with a distinct set of 
>>>> hidden system tiddlers for code etc but allows you to list export them as 
>>>> [prefix[$:/bobj/gallary-ops]] and apply to another wiki.
>>>>
>>>> You can then collect code into functional tiddlers and help those 
>>>> debugging look for macros etc.. in the correct place by tiddler title.
>>>>
>>>> Additional filters in a single tiddler could also list all relevant 
>>>> tiddlers. Rather than tagging exhibitions artworks consignments etc.. 
>>>> set a field object-type to each of these values. You can then list them 
>>>> with a filter [object-type[artworks]] and save tags for ad hoc 
>>>> organisation.
>>>>
>>>> Regards
>>>> Tony
>>>>
>>>> On Monday, 5 October 2020 17:05:50 UTC+11, Bob Jansen wrote:
>>>>
>>>>> I am trying to implement a simple function in my TW.
>>>>>
>>>>> <code>
>>>>> <$button>
>>>>> <$list filter="[tag[Mark]]">
>>>>>      <!--append exhibition_id to exhibition_id of each marked artwork 
>>>>> tiddler-->
>>>>>      
>>>>>            <$action-setfield 
>>>>>                $field="exhibition_id" 
>>>>>                $value={{{ [{!!exhibition_id}addsuffix[ 
>>>>> ]addsuffix{$:/TLS/exhibition_id}] }}}
>>>>>           />
>>>>>    
>>>>>      <!--append each artwork_id to artwork_id of the exhibition 
>>>>> tiddler-->
>>>>>      
>>>>>           <$action-setfield 
>>>>>                $tiddler= {{{ [{$:/TLS/exhibition_id}] }}}
>>>>>                $field="artwork_id" 
>>>>>                $value={{{ 
>>>>> [{$:/TLS/exhibition_id!!artwork_id}addsuffix[ 
>>>>> ]addsuffix{$:/TLS/artwork_id}] }}}
>>>>>           />
>>>>>      
>>>>> </$list>
>>>>>
>>>>> Link Artworks to Exhibition
>>>>> </$button>
>>>>> </code>
>>>>>
>>>>> The first action-setfield works. The second one doesn't but I can not 
>>>>> determine why. It differs from the first in that the first is editing a 
>>>>> field of the <currentTiddler> from a $list widget whilst the second is 
>>>>> editing a field of a tiddler whose title is stored in the tiddler 
>>>>> $:/TLS/exhibition_id.
>>>>>
>>>>> Is it possible to edit a tiddler not part of the $list widget set?
>>>>>
>>>>> To my understanding, there are essentially two transclusions involved, 
>>>>> first to get to the tiddler whose title is in $:/TLS/exhibition_id and 
>>>>> the 
>>>>> second to the field artwork_id stored in this tiddler.
>>>>>
>>>>> From Tones' excellent cheat sheet, I thought I has it right but 
>>>>> obviously not. 
>>>>>
>>>>> There is obviously an error in my wikitext. But what??
>>>>>
>>>>> Secondly, an earlier query regarding conditional operators with some 
>>>>> advice from Saq Imtiaz.
>>>>>
>>>>> I want to only perform the action-setfield if the value to be inserted 
>>>>> is not already in the field.
>>>>>
>>>>> I thought this would work (replacement for the first action-setfield 
>>>>> statement from above).
>>>>> <code>
>>>>>      <$list [{!!exhibition_id}!contains{$:/TLS/exhibition_id}] 
>>>>>  variable="_null" >
>>>>>            <$action-setfield 
>>>>>                $field="exhibition_id" 
>>>>>                $value={{{ [{!!exhibition_id}addsuffix[ 
>>>>> ]addsuffix{$:/TLS/exhibition_id}] }}}
>>>>>           />
>>>>>      </$list>
>>>>> </code>
>>>>>  but it doesn't.
>>>>>
>>>>> What an I doing wrong here?
>>>>>
>>>>> bobj
>>>>>
>>>>

-- 
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/48646391-ccdb-4e2f-aa0b-26e049c220d7o%40googlegroups.com.

Attachment: new-windows.json
Description: application/json

Reply via email to