On Sun, 2003-04-06 at 16:43, Randall wrote:
> Thanks for the help.  I tried this method and it does what I need it to do.  I 
> am wondering though if there is a cleaner way to do this.
> 
> >             vmhs_hotbit = HotBit()
> >             vmhs_hotbit.pathdict = pathinfo.getPathDict()
> >             vmhs_hotbit.product  = pathinfo.get('product')
> >
> >             # add the hotbit container class to the request
> >             self.request().hotbit = vmhs_hotbit
> >
> >             # now, let's choose which template to use
> >             #
> >             if vmhs_hotbit.pathdict.get('game'):
> >                     self.includeURL('html/gameinfo.psp')
> >             else:
> >                     self.includeURL('html/megapage.psp

This looks reasonable to me.  There's some stuff in the WebKit.Request
about "args", which I think is supposed to be used like this too, but
it's not documented which makes it no better :-/  

> vmhs_hotbit was added to the request instance.  You could just as well add it 
> to the transaction instance.  Is there a convention for passing objects or 
> variables?  I would hate to clobber some attribute of request or transaction 
> by accident.

No, though your naming convention doesn't match Webware's, so no Webware
code will overlap.  Attributes don't get added often anyway, so I doubt
it will be a problem.

  Ian




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to