Art,

Le 24 nov. 05 à 14:51, Art Haas a écrit :

That is a lot of typing, so it may be better to again adjust the
'import' statments to look like this ...

from PythonCAD.Interface.Cocoa import Globals
agreed :
Index: CocoaEntities.py
===================================================================
--- CocoaEntities.py	(revision 2065)
+++ CocoaEntities.py	(working copy)
@@ -27,7 +27,7 @@
 
 import objc
 
-import PythonCAD.Interface.Cocoa.Globals
+from PythonCAD.Interface.Cocoa import Globals
 import PythonCAD.Interface.Cocoa.ImageDocument
 import PythonCAD.Generic.tools
 import PythonCAD.Generic.util
but above rule was not applied in PythonCad.py
Index: PythonCad.py
===================================================================
--- PythonCad.py	(revision 2065)
+++ PythonCad.py	(working copy)
@@ -55,15 +55,15 @@
 # set up global variables ...
 #
 
-Generic.globals.prefs = PythonCAD.Generic.baseobject.LockedDict(str)
-Generic.globals.colors = PythonCAD.Generic.baseobject.TypedDict(Generic.color.Color,
+PythonCAD.Generic.globals.prefs = PythonCAD.Generic.baseobject.LockedDict(str)
+PythonCAD.Generic.globals.colors = PythonCAD.Generic.baseobject.TypedDict(PythonCAD.Generic.color.Color,
                                                       PythonCAD.Generic.color.Color)
-Generic.globals.linetypes = PythonCAD.Generic.baseobject.TypedDict(Generic.linetype.Linetype, PythonCAD.Generic.linetype.Linetype)
-Generic.globals.styles = PythonCAD.Generic.baseobject.TypedDict(Generic.style.Style,
+PythonCAD.Generic.globals.linetypes = PythonCAD.Generic.baseobject.TypedDict(PythonCAD.Generic.linetype.Linetype, PythonCAD.Generic.linetype.Linetype)
+PythonCAD.Generic.globals.styles = PythonCAD.Generic.baseobject.TypedDict(PythonCAD.Generic.style.Style,
                                                       PythonCAD.Generic.style.Style)
-Generic.globals.dimstyles = []
+PythonCAD.Generic.globals.dimstyles = []
 
-Generic.globals.selectobj = PythonCAD.Generic.selections.Selection()
+PythonCAD.Generic.globals.selectobj = PythonCAD.Generic.selections.Selection()
 
 
 def _initialize_booleans():


Application is now running with the following exception :

2005-11-24 18:24:09.624 PythonCad[1684] An exception has occured:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/PyObjC/PyObjCTools/AppHelper.py", line 235, in runEventLoop
    main(argv)
File "/Users/pierreva/Documents/pythoncad2/build/PythonCad.app/ Contents/Resources/PythonCAD/Interface/Cocoa/ImageDocument.py", line 157, in init
    self.setImage(PythonCAD.Generic.image.Image())
File "/Users/pierreva/Documents/pythoncad2/build/PythonCad.app/ Contents/Resources/PythonCAD/Generic/image.py", line 148, in __init__
    add_defaults(self)
File "/Users/pierreva/Documents/pythoncad2/build/PythonCad.app/ Contents/Resources/PythonCAD/Generic/image.py", line 2076, in add_defaults
    image.setOption('DIM_STYLE', _ds)
File "/Users/pierreva/Documents/pythoncad2/build/PythonCad.app/ Contents/Resources/PythonCAD/Generic/image.py", line 1715, in setOption
    if value != _gval: _set = True
File "/Users/pierreva/Documents/pythoncad2/build/PythonCad.app/ Contents/Resources/PythonCAD/Generic/dimension.py", line 2280, in __ne__
    return not self == obj
File "/Users/pierreva/Documents/pythoncad2/build/PythonCad.app/ Contents/Resources/PythonCAD/Generic/dimension.py", line 2256, in __eq__
    if ((_key == 'DIM_PRIMARY_TEXT_SIZE') or
TypeError: 'bool' object is not callable

Pierre


_______________________________________________
PythonCAD mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pythoncad

Reply via email to