本文整理匯總了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()
示例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)
示例3: onClick
# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
def onClick(self, sender):
Window.alert("object called")
示例4: onButtonClick
# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
def onButtonClick(sender):
Window.alert("function called")
示例5: greet
# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
def greet(sender):
Window.alert("Hello, AJAX!")
示例6: execute
# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
def execute(self):
Window.alert("Thank you for selecting a menu item.")
示例7: onError
# 需要導入模塊: import Window [as 別名]
# 或者: from Window import alert [as 別名]
def onError(self, error):
Window.alert("Save failed: "+error)
示例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)
示例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())