MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / nextID

Method nextID

gui/contextMenu.py:179–193  ·  view source on GitHub ↗

Fetches an ID from the pool of IDs allocated to Context Menu. If we don't have enough ID's to fulfill request, create new ID and add it to the pool. See GH Issue #589. Has to be static method to properly handle modifications of primitives from subclass

()

Source from the content-addressed store, hash-verified

177
178 @staticmethod
179 def nextID():
180 """
181 Fetches an ID from the pool of IDs allocated to Context Menu.
182 If we don't have enough ID's to fulfill request, create new
183 ID and add it to the pool.
184
185 See GH Issue #589.
186 Has to be static method to properly handle modifications of primitives from subclasses (_idxid).
187 """
188 ContextMenu._idxid += 1
189
190 if ContextMenu._idxid >= len(ContextMenu._ids): # We don't ahve an ID for this index, create one
191 ContextMenu._ids.append(wx.NewId())
192
193 return ContextMenu._ids[ContextMenu._idxid]
194
195 def isChecked(self, i):
196 """If menu item is toggleable, this should return bool value"""

Callers 15

getMenuMethod · 0.80
addEffectMethod · 0.80
getSubMenuMethod · 0.80
getSubMenuMethod · 0.80
addSkillMethod · 0.80
getSubMenuMethod · 0.80
addOptionMethod · 0.80
addOptionCustomMethod · 0.80
getSubMenuMethod · 0.80
addFitMethod · 0.80
getSubMenuMethod · 0.80
addModeMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected