當前位置: 首頁>>代碼示例>>Python>>正文


Python Window.alert方法代碼示例

本文整理匯總了Python中Window.alert方法的典型用法代碼示例。如果您正苦於以下問題:Python Window.alert方法的具體用法?Python Window.alert怎麽用?Python Window.alert使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Window的用法示例。


在下文中一共展示了Window.alert方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: onClick

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
    def onClick(self, sender):
        if (sender == self.signOutLink):
            Window.alert("If this were implemented, you would be signed out now.")
        elif (sender == self.aboutLink):
            # When the 'About' item is selected, show the AboutDialog.
            # Note that showing a dialog box does not block -- execution continues
            # normally, and the dialog fires an event when it is closed.
            dlg = AboutDialog()

            # Position it roughly in the middle of the screen.
            left = (Window.getClientWidth() - 512) / 2
            top = (Window.getClientHeight() - 256) / 2
            #Logger("TopPanel", "left: " + left)
            #Logger("TopPanel", "top: " + top)
            dlg.setPopupPosition(left, top)

            dlg.show()
開發者ID:pombredanne,項目名稱:pyjamas-desktop,代碼行數:19,代碼來源:TopPanel.py

示例2: onModuleLoad

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
 def onModuleLoad(self):
     slot = RootPanel("calendar")
     Window.alert("slot:" + slot)
     if slot:
         calendar = SchoolCalendarWidget(15)
         Window.alert(len(slot.children))
         Window.alert(slot.children)
         slot.add(calendar)
         
         slot = RootPanel("days")
         if slot:
             filterWidget = DayFilterWidget(calendar)
             slot.add(filterWidget)
開發者ID:pombredanne,項目名稱:pyjamas-desktop,代碼行數:15,代碼來源:DynaTable.py

示例3: onClick

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
	def onClick(self, sender):
		Window.alert("object called")
開發者ID:AwelEshetu,項目名稱:cwm,代碼行數:4,代碼來源:OnClickTest.py

示例4: onButtonClick

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
def onButtonClick(sender):
	Window.alert("function called")
開發者ID:AwelEshetu,項目名稱:cwm,代碼行數:4,代碼來源:OnClickTest.py

示例5: greet

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
def greet(sender):
    Window.alert("Hello, AJAX!")
開發者ID:luiseduardohdbackup,項目名稱:pyjs,代碼行數:4,代碼來源:pyjamas.operator_precedence.test.py

示例6: execute

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
 def execute(self):
     Window.alert("Thank you for selecting a menu item.")
開發者ID:AwelEshetu,項目名稱:cwm,代碼行數:4,代碼來源:Menus.py

示例7: onError

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
 def onError(self, error):
     Window.alert("Save failed: "+error)
開發者ID:pombredanne,項目名稱:pyjamas-desktop,代碼行數:4,代碼來源:TemplatePanel.py

示例8: onSubmit

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
 def onSubmit(self, event):
     # This event is fired just before the form is submitted. We can take
     # this opportunity to perform validation.
     if (self.tb.getText().length == 0):
         Window.alert("The text box must not be empty")
         event.setCancelled(true)
開發者ID:pombredanne,項目名稱:pyjamas-1,代碼行數:8,代碼來源:FormPanelExample.py

示例9: onSubmitComplete

# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
 def onSubmitComplete(self, event):
     # When the form submission is successfully completed, this event is
     # fired. Assuming the service returned a response of type text/plain,
     # we can get the result text here (see the FormPanel documentation for
     # further explanation).
     Window.alert(event.getResults())
開發者ID:pombredanne,項目名稱:pyjamas-1,代碼行數:8,代碼來源:FormPanelExample.py


注:本文中的Window.alert方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。