Thank you very much Jon!
Now I master <checkboxes> (ah aha h)
What do you think about this version?

: <my-checkboxes> ( alist orientation -- gadget )
    <pack> { 15 10 } >>gap swap
    [ swap <checkbox> add-gadget ] assoc-each ;

michele pes


On 20/09/2011 14.54, Jon Harper wrote:
> When you write a literal sequence, the contents of the sequence is not
> evaluated. For example, writing { 1 2 + } results in the sequence
> containing 1, and then 2, and then the word +. So the sequence you're
> passing to <checkboxes> is not of the form { { string model } }, but
> in the form { { string bool word } }. To force the evaluation of
> litterals in sequences, you can use the literals vocab:
> http://docs.factorcode.org/content/vocab-literals.html
>
> In your simple example case, that would be:
> {
>    { "Checkbox" $[ f <model> ] }
> }
>
> Jon
>
> On Tue, Sep 20, 2011 at 2:07 PM, Michele Pes <mp8...@rambler.ru> wrote:
>> Hi to all!
>> I cannot use <checkboxes> correctly.
>> Looking at its definition, it seems to me that It takes an assoc
>> where the key is the checkbox label (a string), and the value should be
>> the model.
>> I tried something like:
>>
>> {
>>    { "Checkbox 1" f <model> }
>> }
>>
>> but no way.
>> Can someone give me an example of a single entry of this assoc?
>> Thank you all,
>> michele pes
>>
>> P.S.:
>> Please do not post on pastebin since I cannot access it
>>
>>
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure contains a
>> definitive record of customers, application performance, security
>> threats, fraudulent activity and more. Splunk takes this data and makes
>> sense of it. Business sense. IT sense. Common sense.
>> http://p.sf.net/sfu/splunk-d2dcopy1
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to