Re: Defaults in flags()
David Wheeler <[email protected]> Wed, 9 Aug 2006 11:54:02 -0400
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
On Aug 9, 2006, at 11:28, Marius Feraru wrote:
> Ah (good morning to myself) - now I see your point: there is a
> _public_
> flag() method (and custom flags functionality, OFC).
Exactly. I'm using it in a subclass (essentially) of component, so
I'd rather use the public interface than reach into the flags hash
directly or call a private method.
> Agree. But the current functionality of the "inherit" flag in one good
> old Mason feature that many of us (me included) would miss if it would
> cease to exist. ;-)
Yes, Hans explained the issue rather well (and yes, John is right wrt
what I mean about hte use of the term "flags"—especially since there
is a <%flags> block in Mason! But I had forgotten that it didn't
specify only booleans, because Bricolage users actually use it to
turn off inheritance:
<%flags>
$inherit => undef
</%flags>
So I was thinking of it as a boolean.
> Now, what would you prefer flag('inherit') to return?
I want it to return whatever the inherit flag is set to. In the above
example, it would return undef. If it's not specified in a dhandler,
I assume that it should return the parent.
Uh, but then maybe I could just call parent(), instead? Would it
return undef when I have the inherit flag set to undef in the component?
Best,
David
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642