On Tue, 2005-08-02 at 17:24 -0700, Chuck Esterbrook wrote: 
> On 8/2/05, Seth Remington <[EMAIL PROTECTED]> wrote:
> > Hello All,
> > 
> > I have a need to clone instances of my MiddleKit objects and so far I
> > have come up with this:
> 
> Seth, another developer needed this and enhanced
> MiddleKit.Run.MiddleObject by adding a clone() method. I recently had
> cause to use it and ended up fixing a bug in it. See the doc string
> for it for more details.
> 
> I recommend that you use Webware out of svn trunk:
> http://www.webwareforpython.org/Wiki/subversionrepositoryaccess
> 
> ...or the 0.9b1 release:
> http://www.webwareforpython.org/downloads/Webware-0.9b1.tar.gz
> 
> If you have further questions or problems, let us know.
> 
> -Chuck

Thanks Chuck. That looks even better than what I would have hoped for.

I have tried to upgrade my app from 0.8.1 to svn HEAD twice but gave up
after a couple of hours... your message has inspired me to try again but
this time I guess I'll ask for a little help ;)

The main issue I'm running into is with UserKit and UserManagerToMiddle
Kit. One issue appears to be a bug:


<traceback>
  File "model/UserFactory.py", line 10, in __init__
    UserManagerToMiddleKit.__init__(self, userClass, store, useSQL)
  File "UserKit/UserManagerToMiddleKit.py", line 55, in __init__
  File "/home/sremington/Webware/UserKit/UserManager.py", line 86, in
__init__
    self.setUserClass(userClass)
  File "UserKit/UserManagerToMiddleKit.py", line 100, in setUserClass
  File "/home/sremington/Webware/UserKit/UserManager.py", line 110, in
setUserClass
    assert type(userClass) is types.ClassType
AssertionError
</traceback>


<code snippet>
def setUserClass(self, userClass):
        """ Sets the userClass, which cannot be None and must inherit
from User. See also: userClass(). """
====>   assert type(userClass) is types.ClassType  <=====
        from User import User
        assert issubclass(userClass, User)
        self._userClass = userClass
</code snippet>

Because MiddleObject is a now a new style class and inherits from object
it presents itself as <type 'type'> instead of the old school
types.ClassType that it is expecting. It would seem like that assertion
is unnecessary anyway since the following "assert issubclass(userClass,
User)" would catch any incorrectly passed parameter. Am I correct on
that? 

I am having another problem as well but that may be the subject of
another email.

-Seth

-- 
Seth Remington
SaberLogic, LLC
661-B Weber Drive
Wadsworth, Ohio 44281
Phone: (330)335-6442
Fax: (330)336-8559



-------------------------------------------------------
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

Reply via email to