#68 object named

closed-fixed
MiddleKit (4)
5
2008-11-07
2004-03-29
xorb
No

When creating an object with the name "Store" most
things work until you start trying to add objects to
the object store that reference "Store". At that point
you get an error message talking about the type not
matching the type you are trying to add.

I fixed the problem and don't have an exact printout of
the message on hand, but basically it fails on "value
isinstance Store" in the setStore() method in
GenStore.py, because value is set to the
MySQLObjectStore instance.

Discussion

    • summary: object named "Store" results in unintuitive failure --> object named
     
  • Logged In: YES
    user_id=173690

    Could you attach a unified diff (diff -u) of the change you
    made? That would help us fix this quickly.

     
  • xorb
    xorb
    2004-04-01

    Logged In: YES
    user_id=1008907

    I should have clarified, I appologize. I fixed the problem
    by renaming the object from "Store" to "Location" in the
    program I was writing and the problem went away.

    If I get some time I'll try to fix the problem in MiddleKit
    as well and keep you posted.

     
  • Unfortunately, 'store' was one of very few attribute names that cannot be used in MK because the corresponding attribute setter has already a specific meaning. Since r7601, the MK Python generator now checks that these reserved names are not used and gives an appropriate warning, so that you won't be confused later.

     
    • status: open --> closed-fixed