For months, I've been running with a modified WebKit.Object (the
ancestor class to all other WebKit classes) which also inherits
Python's "object":

# Object.py
class Object(object, NamedValueAccess):


This requires a slight tweak in Application.py:
                assert isinstance(klass, ClassType) or issubclass(klass, Object)

I just checked these changes into svn.
http://www.webwareforpython.org/Wiki/subversionrepositoryaccess

-Chuck


On 6/26/05, Tracy S. Ruggles <[EMAIL PROTECTED]> wrote:
> If you put 'object' second in the parent classes it seems to work...
> 
>      from WebKit.Page import Page
> 
>      class MyPage(Page, object):
>          def awake(self, trans):
>              super(MyPage, self).awake(trans)
> 
> --Tracy
> 
> 
> On Jun 25, 2005, at 5:50 PM, Jose Galvez wrote:
> 
> > BTW if I comment out the assert statement in the application.py
> > file then it appears to work correctly,
> > Jose
> >
> > Jose Galvez wrote:
> >
> >
> >> looking at the application.py the line causing the problem is:
> >>
> >> assert type(klass) is ClassType
> >>
> >> which I think makes sense because classes and types have been
> >> combined, but like I said before I'm pretty green with new style
> >> classes, so how do you get around this?
> >> Jose
> >>
> >> Chuck Esterbrook wrote:
> >>
> >>
> >>> Try changing the class declaration in WebKit/Object.py to:
> >>>
> >>> class Object(object, NamedValueAccess):
> >>>
> >>>
> >>> and then I think it will start working. I've been running like this
> >>> for months and plan on checking in this change in sometime soon.
> >>>
> >>> Let us know how it goes,
> >>>
> >>> -Chuck
> >>>
> >>>
> >>> On 6/25/05, Jose Galvez <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>> Shouldn't super work with webkit?   basically why does this
> >>>> generate an
> >>>> error:
> >>>>
> >>>> from WebKit.Page import Page
> >>>>
> >>>> class sutest(Page):
> >>>>    def __init__(self):
> >>>>        super(sutest, self).__init__()
> >>>>        self.val = 'test'
> >>>>    def writeContent(self):
> >>>>        self.write(self.val)
> >>>>
> >>>> the error I get is :
> >>>>
> >>>> super() argument 1 must be type, not classobj
> >>>>
> >>>>
> >>>> I'm still pretty green about pythons new style classes,
> >>>> but I thought that webware was compatible with new style classes
> >>>> and thus super should work.
> >>>> Is this not the case?
> >>>>
> >>>> Jose
> >>>>
> >>>>
> >>>>
> >>>> -------------------------------------------------------
> >>>> SF.Net email is sponsored by: Discover Easy Linux Migration
> >>>> Strategies
> >>>> from IBM. Find simple to follow Roadmaps, straightforward articles,
> >>>> informative Webcasts and more! Get everything you need to get up to
> >>>> speed, fast. http://ads.osdn.com/?
> >>>> ad_id=7477&alloc_id=16492&op=click
> >>>> _______________________________________________
> >>>> Webware-discuss mailing list
> >>>> Webware-discuss@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/webware-discuss
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> -------------------------------------------------------
> >> SF.Net email is sponsored by: Discover Easy Linux Migration
> >> Strategies
> >> from IBM. Find simple to follow Roadmaps, straightforward articles,
> >> informative Webcasts and more! Get everything you need to get up to
> >> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> >> _______________________________________________
> >> Webware-discuss mailing list
> >> Webware-discuss@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/webware-discuss
> >>
> >>
> >>
> >>
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> > from IBM. Find simple to follow Roadmaps, straightforward articles,
> > informative Webcasts and more! Get everything you need to get up to
> > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> > _______________________________________________
> > Webware-discuss mailing list
> > Webware-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/webware-discuss
> >
> >
> 
> 
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to