Hi

On Tuesday, 29 December 2015 11:14:52 UTC+2, PMario wrote:
>
>  
>
>> Also, if we are forcing fields to be all-lowercase,
>> then *tiddler.getFieldsString* must always turn a requested field to 
>> lowercase first! => ticket?
>>
>
If I am not mistaken, the getFieldString() function is also used for 
retrieving titles -- can not, therefore, enforce lowercase for all calls.

Perhaps a better tactic would be to force lowercase upon creation (they are 
enforced upon a save/refresh):
 -- the $fieldmangler widget does this already with this statement:
var trimmedName = name.toLowerCase().trim();
-- the $action-setfield widget does not contain any equivalent
-- neither does the $navigator widget when handling a "tm-new-tiddler" 
message

Perhaps another utility function is needed to process field names upon 
creation (which may then be called from these widgets)
-- enforce lowercase and trim `var trimmedName = name.toLowerCase().trim();`
-- check for valid name `$tw.utils.isValidFieldName(trimmedName)`
-- (the isValidFieldName() function, currently converts to lower case 
before testing -- therefore returning a valid response for an invalid name)
-- and return a valid name or fail

regards

-- 
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 post to this group, send email to [email protected].
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/a42d81fb-8220-4b6e-917f-88d740416ae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to