Re: Detecting unbound options

mozer <xmlizer@gmail.com> writes:
>> Alas, I think that would just trade a great big nested p:try/p:catch
>> for a great big p:choose...
>
> A small win, but a win !

Fair enough.

> Let's try to solve your use case
>
> Here are the ways to solve it with the lesser code
> 1) First, is to say that selecting an unbound variable will generate
> un unbound variable (a bit tricky)

No, I don't think that's practical. It could be made to work for
select expressions that contain only a single variable reference, but
what about more complex expressions?

> 2) To add an attribute on p:with-option that says
> @bound-like-this-option="$foo" ; if foo is bound then the variable
> will be bound and the value will be the content of the select and will
> not be bound if $foo isn't bound

Yeah, I guess that's an option.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | When the situation is desperate, it is
http://nwalsh.com/            | too late to be serious. Be
                              | playful.--Edward Abbey

Received on Wednesday, 27 May 2009 17:35:04 UTC