当前位置: 首页>>代码示例>>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;未经允许,请勿转载。