Example #1
0
def createApplicationEvent(name, category, **kw):
    try:
        from storytext import applicationEvent
        # Everything that comes from here is to do with editing files in external programs
        applicationEvent(name, category, **kw)
    except ImportError:
        pass
Example #2
0
 def applicationEvent(self, name, **kw):
     try:
         from storytext import applicationEvent
         # Everything that comes from here is to do with editing files in external programs
         applicationEvent(name, "files", **kw)
     except ImportError:
         pass
Example #3
0
 def tryApplicationEvent(self, event, method):
     if isinstance(event.getSource(), swing.JButton) and event.getActionCommand() is not None and \
            event.getActionCommand().startswith("ApplicationEvent"):
         appEventName = event.getActionCommand().replace("ApplicationEvent", "").lstrip()
         applicationEvent(appEventName, delayLevel=PhysicalEventManager.getAppEventDelayLevel())
     else:
         method(event, self)
Example #4
0
def createStoryTextAppEvent(text):
    try:
        import storytext
        storytext.applicationEvent(text)
    except AttributeError:
        pass
    except ImportError:
        pass
Example #5
0
def createStoryTextAppEvent(text):
    try:
        import storytext
        storytext.applicationEvent(text)
    except AttributeError:
        pass
    except ImportError:
        pass
Example #6
0
 def runCheck(self, dataMethod, initial):
     data = dataMethod()  
     if (data is None or data == self.latestData) and not self.loadingFromEmpty():
         return True
     self.latestData = data
     if initial:
         self.connect("current-folder-changed", self.currentFolderChanged, dataMethod)
     applicationEvent("file chooser to read file system", "filechooser")
     self.checkHandler = None
     return False
Example #7
0
 def addApplicationEvent(self, event):
     message = event.getApplicationEventMessage()
     self.allEvents.append(message)
     applicationEvent(message, delayLevel=self.getAppEventDelayLevel())
Example #8
0
 def completed(self, e):
     newText = self.getUrlOrText()
     if newText != self.urlOrText:
         applicationEvent(self.widget.getNameForAppEvent() + " to finish loading")
         self.urlOrText = newText
Example #9
0
 def handleEvent(listenerSelf, e):
     applicationEvent(e.text)
 def setComplete(self):
     applicationEvent("completion of " + self.nonSystemEventName)
     self.nonSystemEventName = None
Example #11
0
	def _operation_finish(self):
		storytext.applicationEvent('data to be loaded')
		self.label_out["text"] = self._calc()