[tw] Re: [TWC] autosave and function problem

2014-08-29 Thread PMario
On Friday, August 29, 2014 4:44:30 PM UTC+2, sklpns wrote:

 Again: thank you very much, sir

 sklpns

 ps. my friend I'm preparing the TeamTasks file for also says *hi* and *thank 
 you*.   


:)) You are welcome!
have fun!
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 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.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TWC] autosave and function problem

2014-08-28 Thread PMario
Hi sklpns,

As I thought. ... There is no need to modify the plugin. .. It would even 
break it ..

Your fet_report calls eg: tiddler.data(peter_info) with its default 
behaviour that returns undefined
If you call it like so:  tiddler.data(peter_info, -)it will do, what 
you want, without modifying the plugin. The plugin author already designed 
it for your usecase. 

see: 

data(field,defaultValue) ..Returns the value of the given data field of the 
 tiddler. When no such field is defined or its value is undefined the 
 defaultValue is returned.

 so if you call data(yourFieldName, -) it should return the dash.


From my first post.


So the defaultValue can be any string. eg some text 
tiddler.data(peter_info, 
some text)
If you test this with your modified plugin, you'll see, the plugin doesn't 
work anymore. ... - Just use the unmodified plugin with the new call.

have fun!
mario
PS: perfect mtc. Nice project btw ;)





-- 
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.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TWC] autosave and function problem

2014-08-27 Thread sklpns

hey mario, thank you very much for your response

taking from your input I've ended up


   - using the uncompressed 
   
http://tiddlywiki.abego-software.de/archive/DataTiddlerPlugin/1.0.7/DataTiddlerPlugin-1.0.7-src.js
 
   version of the DataTiddlerPlugin
   - finding the lines

Tiddler.prototype.data = function(field, defaultValue) {
return (field) 
 ? DataTiddler.getTiddlerDataValue(this, field, defaultValue)
 : DataTiddler.getTiddlerDataObject(this);
};


   - and replacing with

Tiddler.prototype.data = function(field, defaultValue) {
return (field) 
 ? DataTiddler.getTiddlerDataValue(this, field, -)
 : DataTiddler.getTiddlerDataObject(this);
 };

this seems to give me what I need, ie:

   - when a fet runs and a field and value are defined the value is 
   returned in the fet resulting table
   - when a fet runs and a field/data are undefined a dash is returned in 
   the fet resulting table (instead of the word 'undefined')
   
(see before 
https://www.dropbox.com/s/hwx3zvzwkg1z64e/Screenshot%202014-08-27%2017.01.37.png?dl=0
 
and after 
https://www.dropbox.com/s/vifh8iv78cvbg1n/Screenshot%202014-08-27%2017.06.45.png?dl=0
 
screenshots of the relevant fet table columns)

this seems to be working for now, yet I'm wondering if the aforementioned 
code change brakes something

crucial in the way the plugin works I'm not seeing at the moment.

Any thoughts are extremely welcome and again thank you very much for your 
input

sklpns



-- 
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.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TWC] autosave and function problem

2014-08-27 Thread PMario
Hi, sklpns
I thought you should change you fet code, not the plugin code. 

Can you post the fet code, that produces your table?

-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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TWC] autosave and function problem

2014-08-23 Thread PMario
On Friday, August 22, 2014 9:52:22 PM UTC+2, sklpns wrote:

 A final question: using DataTiddlerPlugin when no fields are defined or 
 their values are undefined, 'undefined' is returned.

 Is there a way to either:

- change the result from the word 'undefined' to a dash (-), or 
nothing even, or


- when presented in a fet table somehow style them with css, so as the 
word undefined is not displayed?

 The goal is exactly that: avoid the word 'undefined' presented in table 
 produced by a fet gathering various data from various tiddlers.


If you have a look at the DataTiddlerPlugin docs, there is a function 
description:

data(field,defaultValue) ..Returns the value of the given data field of the 
tiddler. When no such field is defined or its value is undefined the 
defaultValue is returned.

so if you call data(yourFieldName, -) it should return the dash.

hope that helps.
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 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.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TWC] autosave and function problem

2014-08-14 Thread sklpns

An addition, if I may:

The code above, I'm realizing, presents with an even bigger problem:

If you double click a random tiddlerA and then navigate to a tiddler with 
the input form in it
(for example test1 ) and select a radio button, the data do not get written 
in the tiddler test1 but in  TiddlerA.

Seems that the code above sends the data not in the tiddler where the form 
was clicked (as desired) but in the tiddler that was last edited? Major 
problem. Is there a way to fix that?

thanks again and apologies for my possibly silly questions, what I lack in  
javascript knowledge (amounts to zero) I try to make up with TW enthusiasm, 
but...

thank you

sklpns

 

-- 
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.
For more options, visit https://groups.google.com/d/optout.