MCPcopy Create free account
hub / github.com/EasyIME/PIME / __init__

Method __init__

python/input_methods/chearray/chearray_ime.py:33–66  ·  view source on GitHub ↗
(self, client)

Source from the content-addressed store, hash-verified

31 compositionChar = ''
32
33 def __init__(self, client):
34 TextService.__init__(self, client)
35
36 # 輸入法模組自訂區域
37 self.imeDirName = "chearray"
38 self.maxCharLength = 4 # 輸入法最大編碼字元數量
39 self.cinFileList = ["tharray.json", "array30.json", "ar30-big.json", "array40.json"]
40
41 self.cinbase = CinBase
42 self.curdir = os.path.abspath(os.path.dirname(__file__))
43
44 # 初始化輸入行為設定
45 self.cinbase.initTextService(self, TextService)
46
47 # 載入用戶設定值
48 CinBaseConfig.__init__()
49 self.configVersion = CinBaseConfig.getVersion()
50 self.cfg = copy.deepcopy(CinBaseConfig)
51 self.cfg.imeDirName = self.imeDirName
52 self.cfg.cinFileList = self.cinFileList
53 self.cfg.load()
54 self.jsondir = self.cfg.getJsonDir()
55 self.cindir = self.cfg.getCinDir()
56 self.ignorePrivateUseArea = self.cfg.ignorePrivateUseArea
57 self.cinbase.initCinBaseContext(self)
58
59 # 載入輸入法碼表
60 if not CinTable.curCinType == self.cfg.selCinType and not CinTable.loading:
61 loadCinFile = LoadCinTable(self, CinTable)
62 loadCinFile.start()
63 else:
64 while CinTable.loading:
65 continue
66 self.cin = CinTable.cin
67
68
69 # 檢查設定檔是否有被更改,是否需要套用新設定

Callers

nothing calls this directly

Calls 9

LoadCinTableClass · 0.90
initTextServiceMethod · 0.80
getCinDirMethod · 0.80
initCinBaseContextMethod · 0.80
__init__Method · 0.45
getVersionMethod · 0.45
loadMethod · 0.45
getJsonDirMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected