本文整理汇总了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())