Fixed OSX import errors - now running

This commit is contained in:
Skyler Lehmkuhl 2012-01-04 14:13:19 -05:00
parent 20b0db12e3
commit 8190f8010b
1 changed files with 5 additions and 2 deletions

View File

@ -149,6 +149,7 @@ elif sys.platform=="linux-armv6l":
print str(sys.platform) print str(sys.platform)
elif sys.platform=="darwin": elif sys.platform=="darwin":
import pickle import pickle
import misc_funcs
import GUI # Using PyGUI. Experimental. import GUI # Using PyGUI. Experimental.
from GUI import Window as OSXWindow, Button as OSXButton, Image as OSXImage from GUI import Window as OSXWindow, Button as OSXButton, Image as OSXImage
from GUI import Frame as OSXFrame, Color as OSXColor, Grid as OSXGrid from GUI import Frame as OSXFrame, Color as OSXColor, Grid as OSXGrid
@ -635,11 +636,13 @@ class Canvas(Widget):
obj.x = x obj.x = x
obj.y = y obj.y = y
self.objs.append(obj) self.objs.append(obj)
if SYSTEM=="html":
jscommunicate("cchildren["+str(self.tid)+"]="+str(self.objs)) jscommunicate("cchildren["+str(self.tid)+"]="+str(self.objs))
def delete(self, obj): def delete(self, obj):
self.objs.remove(obj) self.objs.remove(obj)
del obj del obj
self.draw() self.draw()
if SYSTEM=="html":
jscommunicate("cchildren["+str(self.tid)+"]="+str(self.objs)) jscommunicate("cchildren["+str(self.tid)+"]="+str(self.objs))
class TextView(Widget): class TextView(Widget):