[tw] Re: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-19 Thread David Gifford
haha sorry, couldn't resist mentioning that I thought for a moment that you 
wrote "Seinfeld widget".  :-) Is probably a widget that fixes everything by 
throwing a Junior Mint into TiddlyWiki 
(https://www.youtube.com/watch?v=M29A6rZpKqk)

Dave

On Thursday, June 19, 2014 7:00:07 PM UTC-4, Måns wrote:
>
> Hi Matabele
>
>
> Does  Setfield widget work with radiobuttons?
>
> I tried this to no avail:
>
> <$setfield set="!!gender2c" setTo="Han">
> <$setfield set="!!gender2" setTo="han">
> <$setfield set="!!genderc" setTo="Ham">
> <$radio field="gender" value="ham"> dreng
> 
>
> <$setfield set="!!gender2c" setTo="Hun">
> <$setfield set="!!gender2" setTo="hun">
> <$setfield set="!!genderc" setTo="Hendes">
> <$radio field="gender" value="hende"> pige
> 
>
> I think it would be very nice if the widget did work with radio buttons 
> and even checkmarks.
>
> Cheers Måns Mårtensson
>

-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-19 Thread Matabele
Hi Mans

No -- the <$setfield> widget responds to a widget message -- this would 
require a new radio type widget which sends a widget message when the 
button is clicked.

I presume your intention is to set the value of several fields to a value 
upon checking a radio button?

I did play around with a checkbox type widget which sets the value of a 
field when clicked -- I was busy trying to get it to toggle a field between 
two values, that is, send different widget messages when checked and 
unchecked. 

I'll have another look at it  -- and, perhaps, rename it the <$einfeld> 
widget :-)

regards



On Friday, June 20, 2014 1:00:07 AM UTC+2, Måns wrote:
>
> Hi Matabele
>
>
> Does  Setfield widget work with radiobuttons?
>
> I tried this to no avail:
>
> <$setfield set="!!gender2c" setTo="Han">
> <$setfield set="!!gender2" setTo="han">
> <$setfield set="!!genderc" setTo="Ham">
> <$radio field="gender" value="ham"> dreng
> 
>
> <$setfield set="!!gender2c" setTo="Hun">
> <$setfield set="!!gender2" setTo="hun">
> <$setfield set="!!genderc" setTo="Hendes">
> <$radio field="gender" value="hende"> pige
> 
>
> I think it would be very nice if the widget did work with radio buttons 
> and even checkmarks.
>
> Cheers Måns Mårtensson
>

-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-20 Thread Matabele
Hi Mans

The radio 'button' reports on the value of a field -- it is checked if the 
value matches and unchecked if it does not. This behaviour is not 
compatible with a radio 'button' that sets the value of multiple fields.

I'm not sure what the best avenue is to take with this king of use case -- 
my current idea is to create a widget that sends one widget message upon 
being checked and another upon being unchecked. This would allow several 
fields to be toggled between two values using two stacks of <$setfield> 
widgets around a button. 

I think the usage I had in mind differed -- this was to list a number of 
tiddlers according to some filter expression, then toggle the value of a 
field between two values for all tiddlers in the list.

I don't know if either of these tactics (or some other tactic) is best 
suited to your needs.

regards 

On Friday, June 20, 2014 1:00:07 AM UTC+2, Måns wrote:
>
> Hi Matabele
>
>
> Does  Setfield widget work with radiobuttons?
>
> I tried this to no avail:
>
> <$setfield set="!!gender2c" setTo="Han">
> <$setfield set="!!gender2" setTo="han">
> <$setfield set="!!genderc" setTo="Ham">
> <$radio field="gender" value="ham"> dreng
> 
>
> <$setfield set="!!gender2c" setTo="Hun">
> <$setfield set="!!gender2" setTo="hun">
> <$setfield set="!!genderc" setTo="Hendes">
> <$radio field="gender" value="hende"> pige
> 
>
> I think it would be very nice if the widget did work with radio buttons 
> and even checkmarks.
>
> Cheers Måns Mårtensson
>

-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-20 Thread Måns
Hi Matabele

My actual usecase is that I use two radio 'buttons' to toggle the value of 
one field 'gender' between "him" or "her" 

Because I need different variations on "him" or "her" I need to be able to 
more fields at once - with different versions - eg. "Him", "he", "He" and 
"her", "Her", "she", "She" etc...

This way I can use eg.: {{!!gender}}, {{!!gender2}}, {{!!gender3}} in my 
text templates.

Imo - it seems to be an 'overkill' if you have to set all variations with a 
radio button for each individual variation every time you use the 
template...

Maybe there's a better way to control this via some kind of aliassing  - 
don't know...?

Cheers Måns Mårtensson


Den fredag den 20. juni 2014 13.57.09 UTC+2 skrev Matabele:
>
> Hi Mans
>
> The radio 'button' reports on the value of a field -- it is checked if the 
> value matches and unchecked if it does not. This behaviour is not 
> compatible with a radio 'button' that sets the value of multiple fields.
>
> I'm not sure what the best avenue is to take with this king of use case -- 
> my current idea is to create a widget that sends one widget message upon 
> being checked and another upon being unchecked. This would allow several 
> fields to be toggled between two values using two stacks of <$setfield> 
> widgets around a button. 
>
> I think the usage I had in mind differed -- this was to list a number of 
> tiddlers according to some filter expression, then toggle the value of a 
> field between two values for all tiddlers in the list.
>
> I don't know if either of these tactics (or some other tactic) is best 
> suited to your needs.
>
> regards 
>
> On Friday, June 20, 2014 1:00:07 AM UTC+2, Måns wrote:
>>
>> Hi Matabele
>>
>>
>> Does  Setfield widget work with radiobuttons?
>>
>> I tried this to no avail:
>>
>> <$setfield set="!!gender2c" setTo="Han">
>> <$setfield set="!!gender2" setTo="han">
>> <$setfield set="!!genderc" setTo="Ham">
>> <$radio field="gender" value="ham"> dreng
>> 
>>
>> <$setfield set="!!gender2c" setTo="Hun">
>> <$setfield set="!!gender2" setTo="hun">
>> <$setfield set="!!genderc" setTo="Hendes">
>> <$radio field="gender" value="hende"> pige
>> 
>>
>> I think it would be very nice if the widget did work with radio buttons 
>> and even checkmarks.
>>
>> Cheers Måns Mårtensson
>>
>

-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-20 Thread Matabele
Hi Mans

The variations of gender could be looked up in two data tables 'male' and 
'female', in such a way that:

male##gender1 --> him
female##gender1 --> her
male##gender2 --> Him
female##gender2 --> Her 
...
and so on

Then the only variable that needs to be set for each person is male/female 
-- all variations of gender are text-reference lookups using either 'male' 
or 'female' (the titles of the two data tables) as the only variable

regards

On Friday, June 20, 2014 6:51:51 PM UTC+2, Måns wrote:
>
> Hi Matabele
>
> My actual usecase is that I use two radio 'buttons' to toggle the value of 
> one field 'gender' between "him" or "her" 
>
> Because I need different variations on "him" or "her" I need to be able to 
> more fields at once - with different versions - eg. "Him", "he", "He" and 
> "her", "Her", "she", "She" etc...
>
> This way I can use eg.: {{!!gender}}, {{!!gender2}}, {{!!gender3}} in my 
> text templates.
>
> Imo - it seems to be an 'overkill' if you have to set all variations with 
> a radio button for each individual variation every time you use the 
> template...
>
> Maybe there's a better way to control this via some kind of aliassing  - 
> don't know...?
>
> Cheers Måns Mårtensson
>
>
> Den fredag den 20. juni 2014 13.57.09 UTC+2 skrev Matabele:
>>
>> Hi Mans
>>
>> The radio 'button' reports on the value of a field -- it is checked if 
>> the value matches and unchecked if it does not. This behaviour is not 
>> compatible with a radio 'button' that sets the value of multiple fields.
>>
>> I'm not sure what the best avenue is to take with this king of use case 
>> -- my current idea is to create a widget that sends one widget message upon 
>> being checked and another upon being unchecked. This would allow several 
>> fields to be toggled between two values using two stacks of <$setfield> 
>> widgets around a button. 
>>
>> I think the usage I had in mind differed -- this was to list a number of 
>> tiddlers according to some filter expression, then toggle the value of a 
>> field between two values for all tiddlers in the list.
>>
>> I don't know if either of these tactics (or some other tactic) is best 
>> suited to your needs.
>>
>> regards 
>>
>> On Friday, June 20, 2014 1:00:07 AM UTC+2, Måns wrote:
>>>
>>> Hi Matabele
>>>
>>>
>>> Does  Setfield widget work with radiobuttons?
>>>
>>> I tried this to no avail:
>>>
>>> <$setfield set="!!gender2c" setTo="Han">
>>> <$setfield set="!!gender2" setTo="han">
>>> <$setfield set="!!genderc" setTo="Ham">
>>> <$radio field="gender" value="ham"> dreng
>>> 
>>>
>>> <$setfield set="!!gender2c" setTo="Hun">
>>> <$setfield set="!!gender2" setTo="hun">
>>> <$setfield set="!!genderc" setTo="Hendes">
>>> <$radio field="gender" value="hende"> pige
>>> 
>>>
>>> I think it would be very nice if the widget did work with radio buttons 
>>> and even checkmarks.
>>>
>>> Cheers Måns Mårtensson
>>>
>>

-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-20 Thread Måns
Hi Matabele
 

> The variations of gender could be looked up in two data tables 'male' and 
> 'female', in such a way that:
>
> male##gender1 --> him
> female##gender1 --> her
> male##gender2 --> Him
> female##gender2 --> Her 
>

 

> all variations of gender are text-reference lookups using either 'male' or 
> 'female' (the titles of the two data tables) as the only variable
>

I think I understand what you are saying - however I don't have a clue how 
I should set it up... 

Could you perhaps write a small example - in a TW5 - or point to a similar 
practical example which might give me an idea how to implement it myself?  

Cheers Måns Mårtensson
 

> On Friday, June 20, 2014 6:51:51 PM UTC+2, Måns wrote:
>>
>> Hi Matabele
>>
>> My actual usecase is that I use two radio 'buttons' to toggle the value 
>> of one field 'gender' between "him" or "her" 
>>
>> Because I need different variations on "him" or "her" I need to be able 
>> to more fields at once - with different versions - eg. "Him", "he", "He" 
>> and "her", "Her", "she", "She" etc...
>>
>> This way I can use eg.: {{!!gender}}, {{!!gender2}}, {{!!gender3}} in my 
>> text templates.
>>
>> Imo - it seems to be an 'overkill' if you have to set all variations with 
>> a radio button for each individual variation every time you use the 
>> template...
>>
>> Maybe there's a better way to control this via some kind of aliassing  - 
>> don't know...?
>>
>> Cheers Måns Mårtensson
>>
>>
>> Den fredag den 20. juni 2014 13.57.09 UTC+2 skrev Matabele:
>>>
>>> Hi Mans
>>>
>>> The radio 'button' reports on the value of a field -- it is checked if 
>>> the value matches and unchecked if it does not. This behaviour is not 
>>> compatible with a radio 'button' that sets the value of multiple fields.
>>>
>>> I'm not sure what the best avenue is to take with this king of use case 
>>> -- my current idea is to create a widget that sends one widget message upon 
>>> being checked and another upon being unchecked. This would allow several 
>>> fields to be toggled between two values using two stacks of <$setfield> 
>>> widgets around a button. 
>>>
>>> I think the usage I had in mind differed -- this was to list a number of 
>>> tiddlers according to some filter expression, then toggle the value of a 
>>> field between two values for all tiddlers in the list.
>>>
>>> I don't know if either of these tactics (or some other tactic) is best 
>>> suited to your needs.
>>>
>>> regards 
>>>
>>> On Friday, June 20, 2014 1:00:07 AM UTC+2, Måns wrote:

 Hi Matabele


 Does  Setfield widget work with radiobuttons?

 I tried this to no avail:

 <$setfield set="!!gender2c" setTo="Han">
 <$setfield set="!!gender2" setTo="han">
 <$setfield set="!!genderc" setTo="Ham">
 <$radio field="gender" value="ham"> dreng
 

 <$setfield set="!!gender2c" setTo="Hun">
 <$setfield set="!!gender2" setTo="hun">
 <$setfield set="!!genderc" setTo="Hendes">
 <$radio field="gender" value="hende"> pige
 

 I think it would be very nice if the widget did work with radio buttons 
 and even checkmarks.

 Cheers Måns Mårtensson

>>>

-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-20 Thread Matabele
Hi Mans

1. create a new tiddler and name this 'male'
2. create a new tiddler and name this 'female'
3. set the type of both of these tiddlers to 'data dictionary'
4. in the text field of 'male' make entries like:
gender1:him
gender2:Him
gender3:Mr
... and so on
5. in the text field of 'female' make entries like:
gender1:her
gender2:Her
gender3:Mrs
... and so on
6. when you want 'him' -- you can use the text reference {{male##gender1}} 
... and so on
7. when you want 'her' -- you can use the text reference 
{{female##gender1}} ... and so on

I think in your use case you would want a variable as the name of the data 
tiddler -- so references might look something like {{$gender$##gender1}}, 
where the variable takes the value 'male' or 'female' as appropriate. I 
think you'll need a macro call to insert the variable before using the 
text-reference as the syntax I've used above won't work (this was for 
illustration only.)

regards

On Friday, June 20, 2014 8:28:40 PM UTC+2, Måns wrote:
>
> Hi Matabele
>  
>
>> The variations of gender could be looked up in two data tables 'male' and 
>> 'female', in such a way that:
>>
>> male##gender1 --> him
>> female##gender1 --> her
>> male##gender2 --> Him
>> female##gender2 --> Her 
>>
>
>  
>
>> all variations of gender are text-reference lookups using either 'male' 
>> or 'female' (the titles of the two data tables) as the only variable
>>
>
> I think I understand what you are saying - however I don't have a clue how 
> I should set it up... 
>
> Could you perhaps write a small example - in a TW5 - or point to a similar 
> practical example which might give me an idea how to implement it myself?  
>
> Cheers Måns Mårtensson
>  
>
>> On Friday, June 20, 2014 6:51:51 PM UTC+2, Måns wrote:
>>>
>>> Hi Matabele
>>>
>>> My actual usecase is that I use two radio 'buttons' to toggle the value 
>>> of one field 'gender' between "him" or "her" 
>>>
>>> Because I need different variations on "him" or "her" I need to be able 
>>> to more fields at once - with different versions - eg. "Him", "he", "He" 
>>> and "her", "Her", "she", "She" etc...
>>>
>>> This way I can use eg.: {{!!gender}}, {{!!gender2}}, {{!!gender3}} in my 
>>> text templates.
>>>
>>> Imo - it seems to be an 'overkill' if you have to set all variations 
>>> with a radio button for each individual variation every time you use the 
>>> template...
>>>
>>> Maybe there's a better way to control this via some kind of aliassing  - 
>>> don't know...?
>>>
>>> Cheers Måns Mårtensson
>>>
>>>
>>> Den fredag den 20. juni 2014 13.57.09 UTC+2 skrev Matabele:

 Hi Mans

 The radio 'button' reports on the value of a field -- it is checked if 
 the value matches and unchecked if it does not. This behaviour is not 
 compatible with a radio 'button' that sets the value of multiple fields.

 I'm not sure what the best avenue is to take with this king of use case 
 -- my current idea is to create a widget that sends one widget message 
 upon 
 being checked and another upon being unchecked. This would allow several 
 fields to be toggled between two values using two stacks of <$setfield> 
 widgets around a button. 

 I think the usage I had in mind differed -- this was to list a number 
 of tiddlers according to some filter expression, then toggle the value of 
 a 
 field between two values for all tiddlers in the list.

 I don't know if either of these tactics (or some other tactic) is best 
 suited to your needs.

 regards 

 On Friday, June 20, 2014 1:00:07 AM UTC+2, Måns wrote:
>
> Hi Matabele
>
>
> Does  Setfield widget work with radiobuttons?
>
> I tried this to no avail:
>
> <$setfield set="!!gender2c" setTo="Han">
> <$setfield set="!!gender2" setTo="han">
> <$setfield set="!!genderc" setTo="Ham">
> <$radio field="gender" value="ham"> dreng
> 
>
> <$setfield set="!!gender2c" setTo="Hun">
> <$setfield set="!!gender2" setTo="hun">
> <$setfield set="!!genderc" setTo="Hendes">
> <$radio field="gender" value="hende"> pige
> 
>
> I think it would be very nice if the widget did work with radio 
> buttons and even checkmarks.
>
> Cheers Måns Mårtensson
>


-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-20 Thread Måns
Hi Matabele

Thank you very much!!!
Yet another mystery has been solved :-)

To me it seems as if the syntax for retrieving "slices" uses the old syntax 
for retrieving "sections" (TWc lingo) in TW5...

Cheers Måns Mårtensson

Den fredag den 20. juni 2014 22.39.56 UTC+2 skrev Matabele:
>
> Hi Mans
>
> 1. create a new tiddler and name this 'male'
> 2. create a new tiddler and name this 'female'
> 3. set the type of both of these tiddlers to 'data dictionary'
> 4. in the text field of 'male' make entries like:
> gender1:him
> gender2:Him
> gender3:Mr
> ... and so on
> 5. in the text field of 'female' make entries like:
> gender1:her
> gender2:Her
> gender3:Mrs
> ... and so on
> 6. when you want 'him' -- you can use the text reference 
> {{male##gender1}} ... and so on
> 7. when you want 'her' -- you can use the text reference 
> {{female##gender1}} ... and so on
>
> I think in your use case you would want a variable as the name of the data 
> tiddler -- so references might look something like {{$gender$##gender1}}, 
> where the variable takes the value 'male' or 'female' as appropriate. I 
> think you'll need a macro call to insert the variable before using the 
> text-reference as the syntax I've used above won't work (this was for 
> illustration only.)
>
> regards
>
> On Friday, June 20, 2014 8:28:40 PM UTC+2, Måns wrote:
>>
>> Hi Matabele
>>  
>>
>>> The variations of gender could be looked up in two data tables 'male' 
>>> and 'female', in such a way that:
>>>
>>> male##gender1 --> him
>>> female##gender1 --> her
>>> male##gender2 --> Him
>>> female##gender2 --> Her 
>>>
>>
>>  
>>
>>> all variations of gender are text-reference lookups using either 'male' 
>>> or 'female' (the titles of the two data tables) as the only variable
>>>
>>
>> I think I understand what you are saying - however I don't have a clue 
>> how I should set it up... 
>>
>> Could you perhaps write a small example - in a TW5 - or point to a 
>> similar practical example which might give me an idea how to implement it 
>> myself?  
>>
>> Cheers Måns Mårtensson
>>  
>>
>>> On Friday, June 20, 2014 6:51:51 PM UTC+2, Måns wrote:

 Hi Matabele

 My actual usecase is that I use two radio 'buttons' to toggle the value 
 of one field 'gender' between "him" or "her" 

 Because I need different variations on "him" or "her" I need to be able 
 to more fields at once - with different versions - eg. "Him", "he", "He" 
 and "her", "Her", "she", "She" etc...

 This way I can use eg.: {{!!gender}}, {{!!gender2}}, {{!!gender3}} in 
 my text templates.

 Imo - it seems to be an 'overkill' if you have to set all variations 
 with a radio button for each individual variation every time you use the 
 template...

 Maybe there's a better way to control this via some kind of aliassing 
  - don't know...?

 Cheers Måns Mårtensson


 Den fredag den 20. juni 2014 13.57.09 UTC+2 skrev Matabele:
>
> Hi Mans
>
> The radio 'button' reports on the value of a field -- it is checked if 
> the value matches and unchecked if it does not. This behaviour is not 
> compatible with a radio 'button' that sets the value of multiple fields.
>
> I'm not sure what the best avenue is to take with this king of use 
> case -- my current idea is to create a widget that sends one widget 
> message 
> upon being checked and another upon being unchecked. This would allow 
> several fields to be toggled between two values using two stacks of 
> <$setfield> widgets around a button. 
>
> I think the usage I had in mind differed -- this was to list a number 
> of tiddlers according to some filter expression, then toggle the value of 
> a 
> field between two values for all tiddlers in the list.
>
> I don't know if either of these tactics (or some other tactic) is best 
> suited to your needs.
>
> regards 
>
> On Friday, June 20, 2014 1:00:07 AM UTC+2, Måns wrote:
>>
>> Hi Matabele
>>
>>
>> Does  Setfield widget work with radiobuttons?
>>
>> I tried this to no avail:
>>
>> <$setfield set="!!gender2c" setTo="Han">
>> <$setfield set="!!gender2" setTo="han">
>> <$setfield set="!!genderc" setTo="Ham">
>> <$radio field="gender" value="ham"> dreng
>> 
>>
>> <$setfield set="!!gender2c" setTo="Hun">
>> <$setfield set="!!gender2" setTo="hun">
>> <$setfield set="!!genderc" setTo="Hendes">
>> <$radio field="gender" value="hende"> pige
>> 
>>
>> I think it would be very nice if the widget did work with radio 
>> buttons and even checkmarks.
>>
>> Cheers Måns Mårtensson
>>
>

-- 
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 

[tw] Re: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-21 Thread Alberto Molina

>
> Hi Mans
>
> 1. create a new tiddler and name this 'male'
> 2. create a new tiddler and name this 'female'
> 3. set the type of both of these tiddlers to 'data dictionary'
> 4. in the text field of 'male' make entries like:
> gender1:him
> gender2:Him
> gender3:Mr
> ... and so on
> 5. in the text field of 'female' make entries like:
> gender1:her
> gender2:Her 
>
gender3:Mrs
> ... and so on
> 6. when you want 'him' -- you can use the text reference 
> {{male##gender1}} ... and so on
> 7. when you want 'her' -- you can use the text reference 
> {{female##gender1}} ... and so on
>
> I think in your use case you would want a variable as the name of the data 
> tiddler -- so references might look something like {{$gender$##gender1}}, 
> where the variable takes the value 'male' or 'female' as appropriate. I 
> think you'll need a macro call to insert the variable before using the 
> text-reference as the syntax I've used above won't work (this was for 
> illustration only.)
>
>
Very interesting! Thanks!

Alberto 

-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-23 Thread Måns
Hi Matabele
 

> I think in your use case you would want a variable as the name of the data 
> tiddler -- so references might look something like {{$gender$##gender1}}, 
> where the variable takes the value 'male' or 'female' as appropriate. I 
> think you'll need a macro call to insert the variable before using the 
> text-reference as the syntax I've used above won't work (this was for 
> illustration only.)
>

You are absolutely right :-)

I set gender as a field "gender" to male or female - now I need to retrieve 
the result from the correct library..

I tried to do it like this: {{!!gender##gender2b}} 

It doesn't seem to be possible to use templates with substitutions as 
values either

Sth. like:

index1:Value of {{!!gender##gender2b}} should be Him

Simply:

index2:{{!!title}}

Doesn't show the title when you input it as {{IndexTiddler##index2}}

Does anyone know how to exploit a datalibrary as a library of textsnippets 
with substitution markers? 

Cheers Måns Mårtensson

-- 
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: [tw5] SetField Widget and radiobuttons? @matabele

2014-06-23 Thread Matabele
Hi Mans

Use a macrocall:

\define getGender(gender,type)
{{$gender$##$type$}}
\end

<>



if this doesn't work -- try set widgets:

\define getGender()
{{$(gender)$##$(type)$}}
\end

<$set name="gender" value={{!!gender}}>
<$set name="type" value={{!!type}}>
<>


regards


On Monday, June 23, 2014 3:29:38 PM UTC+2, Måns wrote:
>
> Hi Matabele
>  
>
>> I think in your use case you would want a variable as the name of the 
>> data tiddler -- so references might look something like 
>> {{$gender$##gender1}}, where the variable takes the value 'male' or 
>> 'female' as appropriate. I think you'll need a macro call to insert the 
>> variable before using the text-reference as the syntax I've used above 
>> won't work (this was for illustration only.)
>>
>
> You are absolutely right :-)
>
> I set gender as a field "gender" to male or female - now I need to 
> retrieve the result from the correct library..
>
>
>

-- 
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.