On Jun 29, 2011, at 12:46 PM, Jeff Smith wrote:
> I have a PY file (eDirectory.py) that defines an LDAP wrapper class (edir).
> I've also created a small form via ClassDesigner. Now I want to use my LDAP
> wrapper class from within Dabo. Here is what I've done:
>
> 1) I put the import statement in File/Import Declarations.
> import eDirectory
>
> 2) Created an OnHit event handler for a button. Here is the first line of
> code to create an instance of my class
> con = eDirectory.edir()
> Here is the error I get
> NameError: global name 'eDirectory' is not defined
>
> I'm fairly new to Python so I may be making a real newbie error. Any help
> would be greatly appreciated.
Try re-opening your class in the Class Designer, and see if that import
statement is still in the Import Declarations. There was (and may still be!) a
bug that would cause the Class Designer to "forget" the import declarations. It
should be fixed in the current version, but as I was never able to reproduce
the cause of the problem, I can't say for sure.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]