Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9c0358

Browse files
committed
e macresource.need() to open the W resource file in the application init
code (if it isn't open already). PythonIDE still opens the resource file "manually" because it also uses presence of the CURS resource to determine whether it needs to adjust sys.path.
1 parent 71cc46e commit e9c0358

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Mac/Tools/IDE/Wapplication.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import traceback
88
from types import *
99
from Carbon import Menu; MenuToolbox = Menu; del Menu
10+
import macresource
1011

1112
if hasattr(Win, "FrontNonFloatingWindow"):
1213
MyFrontWindow = Win.FrontNonFloatingWindow
@@ -19,6 +20,8 @@
1920
class Application(FrameWork.Application):
2021

2122
def __init__(self, signature='Pyth'):
23+
# Open our resource file, if it is not open yet
24+
macresource.need('CURS', 468, "Widgets.rsrc")
2225
import W
2326
W.setapplication(self, signature)
2427
FrameWork.Application.__init__(self)

Mac/Tools/IDE/Wminiapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class TestApp(Wapplication.Application):
88

99
def __init__(self):
1010
from Carbon import Res
11-
macresource.open_pathname("Widgets.rsrc")
11+
# macresource.open_pathname("Widgets.rsrc")
1212
self._menustocheck = []
1313
self.preffilepath = os.path.join("Python", "PythonIDE preferences")
1414
Wapplication.Application.__init__(self, 'Pyth')

0 commit comments

Comments
 (0)