Mario,

Ah yes, these related fields could be for a range  long-ago..from, 
long-ago..to meaning there is no need for long-ago or long-ago..

We need to be careful we do not confuse the type with the fieldname. I 
would not expect a fieldname.type in any tiddler but perhaps in a dedicated 
fieldname tiddler.

Thus there may be a tiddler named long-ago..from and another long-ago..to 
which include a field called field-type=ancient which demands a negative 
number or 0 ? and has a "year" as its units.

I once thought that I must decide on a set of modes that either the tiddler 
or a specific field can be "displayed in" such as view update(click to 
change) edit already in edit mode etc...
During this thread I have come to realise each time we add a field we can 
also add it to more than one mode tiddler eg edit-mode which can contain 
the wikitext for that field in edit mode, in fact all fields wiki text in 
edit mode. And another for view and update, I can just add another mode 
tiddler eg designer and decide what wiki text markup to use for the field 
in this mode.
The trick is to simplify this so you start with a default related to the 
tidler type, for example a view provided for long-ago..from woul;d be 
{{!!long-ago..from}} if I put the tiddler into edit mode, it looks to see 
if this field has an entry in the edit mode tiddler, if not it "steps back 
one" and inherits the view mode.

It would be easy to scan the wiki and identify all fields and store them in 
a view mode tiddler just with the {{!!fieldname}} as an initial value. Do 
the same for editmode and place in each field in the tiddler the code to 
edit each field defaulting to text edit. However as pointed out before 
having a field-type determine how to view or edit is more precise. Thus on 
creating a field add the field name to a $:/fields tiddler and provide a 
default field-type, then in separate mode tiddlers provide the wikitext to 
handle that field type in that mode.

I am working on an example now, and using some buttons to populate default 
fields.

Tones
On Tuesday, 4 May 2021 at 19:32:04 UTC+10 PMario wrote:

> On Tuesday, May 4, 2021 at 11:27:49 AM UTC+2 PMario wrote:
>
> I still want to have  sec-expanded-years 
>> <https://tc39.es/ecma262/#sec-expanded-years> as in 
>> https://groups.google.com/g/tiddlywiki/c/YaFzHXfjnFc/m/jpQJrSi8BwAJ
>> and: SI prefix multipliers 
>> <https://en.wikipedia.org/wiki/Year#SI_prefix_multipliershttps://en.wikipedia.org/wiki/Year%23SI_prefix_multipliers>
>>  
>> as in: 
>> https://groups.google.com/g/tiddlywiki/c/YaFzHXfjnFc/m/l5S9-TnaBwAJ from 
>> the same thread. 
>>
>
> And I want, that TW-fields can handle this. eg: long-ago..from, 
> long-ago..to   
>
> just an idea ;)
> -mario
>

-- 
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/282a6301-668b-4d7e-baf0-5216abb612abn%40googlegroups.com.

Reply via email to