[REBOL] Re: Dynamic Views possible
From: yvan_iigs::gmx::net at: 3-Dec-2006 14:50
Hello Cesar,
I think I see what you mean. The concept of dynamic views doestn't exist and
I more or lesse have to make the layout myself before entering it into the
view. Okay, I think I have to modify your func-lay a little bit before it
takes me to my goal.
Thank you for the hint.
Cheers
Yvan
On 2.12.2006, you wrote:
>
> Hi Yvan,
>
> Try something like this, of course you can do the function as complex as
> you want but, this is the idea
>
>
> func-lay: func [fld-block /local lay-block][
> lay-block: copy [across]
> foreach [f-name f-data] fld-block [
> append lay-block reduce ['txt rejoin [to-string f-name ": "] 'txt
> to-string f-data 'return]
> ]
> lay-block
> ]
>
> view layout func-lay [name1 text1 name2 text2]
>
> C=E9sar
>
>
>
> ----- Original Message -----
> From: "Yvan" <yvan_iigs-gmx.net>
> To: <rebolist-rebol.com>
> Sent: Saturday, December 02, 2006 10:11 AM
> Subject: [REBOL] Dynamic Views possible
>
>
>>
>> Hello,
>>
>> is there a way to tell a view which fields it should show by passing any
>> kind of parameters?
>>
>> Lets assume I have a video database with the following strings per
>> video:
>>
>> title, producer, release-date, length
>>
>> Now if I want to look at a video record I can do it the following way:
>>
>> view layout
>> [
>> text title
>> text producer
>> text release-date
>> text length
>> ]
>>
>> But if I just want to see the title I would have to do the following:
>>
>> view layout [ text title]
>>
>> and if I just want to see the title and the producer
>>
>> view layout
>> [
>> text title
>> text producer
>> ]
>>
>> okay, it's getting boring. I have much more than just 4 different
>> variable
>> per video record and I'm looking to program a function which let's me
>> chose
>> which fields of the video-record should be shown without having to
>> program
>> a special view for each possible combination.
>>
>> Is there a way to to this?
>>
>>
>> Cheers Yvan
>> --
>> To unsubscribe from the list, just send an email to
>> lists at rebol.com with unsubscribe as the subject.
>>
>>
>>
>
Regards