Re: inflating columns to objects

[prev] [thread] [next] [Date index for 2004/10/27]

From: Drew Taylor
Subject: Re: inflating columns to objects
Date: 14:37 on 27 Oct 2004
On Wed, 27 Oct 2004 15:33:45 +0100, Dave Howorth
<dhoworth@xxxxxxx.xxx.xx.xx> wrote:
> Drew Taylor wrote:
> > Ahhh... stringification. By default CDBI uses the primary key(s) when
> > stringified, but that is configurable.
> >
> > # the easy way
> > Widget->columns(Stringify => qw/your_col/);
> >
> > # the more powerful way
> > sub stringify_self {
> >   my $self = shift;
> >   return join ":", $self->id, $self->name;
> > }
> 
> Well this is how to set up how a table reference is presented, and I do
> use that where appropriate, but that's not what we're talking about. The
> problem is getting my desired representation of a particular column on a
> particular page.
> 
> To do get a particular representation of a column, I've overloaded the
> stringification operator with a method of your choice (display, in my
> case). See the code I posted for how to do it. That works on Maypole's
> list page but doesn't work when processed by AsForm for Maypole's edit page.

Oh, that's a bummer. Very strange how one page would get it right but
another does not. Sounds like there is some strong voodoo going on in
AsForm. Guess you'll need that debugger after all. Sorry I couldn't be
more help. :-(

Drew
        -- 
        ----------------------------------------------------------------
 Drew Taylor                 *  Web development & consulting
 Email: drew@xxxxxxxxxx.xxx  *  Site implementation & hosting
 Web  : www.drewtaylor.com   *  perl/mod_perl/DBI/mysql/postgres
 ----------------------------------------------------------------

(message missing)

inflating columns to objects
Dave Howorth 16:23 on 26 Oct 2004

Re: inflating columns to objects
Drew Taylor 16:30 on 26 Oct 2004

Re: inflating columns to objects
Dave Howorth 16:41 on 26 Oct 2004

Re: inflating columns to objects
Drew Taylor 17:40 on 26 Oct 2004

Re: inflating columns to objects
Dave Howorth 13:24 on 27 Oct 2004

Re: inflating columns to objects
Drew Taylor 14:13 on 27 Oct 2004

Re: inflating columns to objects
Dave Howorth 14:33 on 27 Oct 2004

Re: inflating columns to objects
Drew Taylor 14:37 on 27 Oct 2004

Re: inflating columns to objects
Dave Howorth 16:17 on 27 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52