-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> It's kind of lame, but SecureMixIn could have a method:
>
>     def awake(self, trans):
>         SiteLayout.awake(self, trans)

Yuck =) That goes against the idea of mixins...

if I where to use this mixin with say... SubSiteLayout ... ah well you get the 
idea =)


> I can't think of a good way to have PSP do this.  Unless perhaps it used
> the new-and-fancy super() call (which I don't completely understand
> yet).  Or PSP could add something to __init__, like:

Is there a way to test if a method exists within a class?

If so... the code PSP creates could recurse through the parent classes looking 
for the first class that implements the awake method.

so you might end up with something like this in your generated class:

def awake(self.trans):
    for baseclass in self.__class__.__bases__
        if ... (code to check if the method exists?):
            baseclass.awake(self, trans)
            break
    self.initPSP()

This should should hopefully make calling the awake method simular to how 
Python looks up methods in parent classes.... So the first class to implement 
the method is the one which gets used for that method.


- -- 
Luke Holden
eBI Solutions
Main: (949) 387-5182
Email: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+G6U+3q5xXfLZTQkRApqQAKDGfaoORXOKDsz4TQ0BTxW9uwivtwCeLD06
EEuiIbtre/Zp8k3w3ggT3J4=
=TIik
-----END PGP SIGNATURE-----



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to