Hi Ryan

That's working. However I don't understand what is user-data. Could you
explain it to me .

Thanks

Patrick


----- Original Message -----
From: "Ryan Cole" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 6:48 PM
Subject: [REBOL] Re: view indirection


> Hello,
> I am assuming the following wont work because you need to loop through
your checkboxes:
>
> C5/data: true
>
> I would consider somthing like this more elegant...
>
> win: view/new layout [check user-data 1 check user-data 2 check user-data
5]
>
> set-check: func [number value] [
>     repeat index length? win/pane [
>         if win/pane/:index/user-data = number [ win/pane/:index/data:
value ]
>     ]
>     value
> ]
>
> But its said "Beauty is in the eye of the beholder."
>
> --Ryan
>
>
> Patrick Philipot wrote:
>
> > Hi,
> >
> > I am stuck in a should-not-be-so-difficult problem with view. I have a
lot of checkboxes in a layout, named c1, c2, ... c16. At one time, given a
number X, I would like to do something on the cX checkbox.
> >
> > For now, I have this sort of code :
> >
> > set-check: func [n [integer!] /local code ][
> >  code: copy ""
> >  code: join join "set in c" n join " 'data true show c" n
> >  print ["generated code ; " code]
> >  do code
> > ]
> >
> > IT IS WORKING ! (the print is only for debugging purpose). However I am
not satisfied with this code. I'am looking for a more elegant way to do
that. Something like :
> >
> > myCheckBox: guru-function( "c" 5)
> > myCheckbox/data: true
> >
> > Patrick
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
>
> --
>
>
>      Ryan Cole
>  Programmer Analyst
>  www.iesco-dms.com
>     707-468-5400
>
> The contradiction so puzzling to the ordinary way
> of thinking comes from the fact that we have to use
> language to communicate our inner experience
> which in its very nature transcends lingistics.
> -D.T. Suzuki
>
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to