本文整理汇总了Python中pyjamas.Window.open方法的典型用法代码示例。如果您正苦于以下问题:Python Window.open方法的具体用法?Python Window.open怎么用?Python Window.open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.Window
的用法示例。
在下文中一共展示了Window.open方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onClick
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import open [as 别名]
def onClick(self, sender):
if sender == self.newpage:
self.todoId = None
self.todoTextName.setText("")
self.todoTextArea.setHTML("")
return
elif sender == self.view:
name = self.todoTextName.getText()
html = self.todoTextArea.getHTML()
if not html:
return
p = HTMLDialog(name, html)
p.setPopupPosition(10, 10)
p.setWidth(Window.getClientWidth() - 40)
p.setHeight(Window.getClientHeight() - 40)
p.show()
return
elif sender == self.fDialogButton:
Window.open(fileedit_url, "fileupload", "width=800,height=600")
return
dlg = FileDialog(fileedit_url)
left = self.fDialogButton.getAbsoluteLeft() + 10
top = self.fDialogButton.getAbsoluteTop() + 10
dlg.setPopupPosition(left, top)
dlg.show()
id = self.remote.getPage(sender.getValue(sender.getSelectedIndex()), self)
if id < 0:
self.status.setHTML("Server Error or Invalid Response")
示例2: onRemoteResponse
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import open [as 别名]
def onRemoteResponse(self, response, request_info):
#Window.alert(response)
if(request_info.method == 'get_search_results'):
#Window.alert('remote response search results')
self.storeResults(response)
elif request_info.method == 'get_app_info':
self.app_info = response
self.app_info['res'] = self.app_info['url'] + "book?asin="
#if(request_info.method == 'add_to_list'):
#Window.alert("added to list")
#Window.alert(response)
if(request_info.method == 'search_check'):
Window.open(response, "_top", "")
示例3: run
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import open [as 别名]
def run(self):
self.tries += 1
if self.context.facebook_user == None or "vk" not in self.context.get_data:
return False
# stop timer after a certain time
if self.tries >= self.max_tries:
Window.alert("It looks like there's a connection problem. We're sorry about the inconvenience. Please try again later.")
self.context.lbl_confirm_result.setText("User verification unsuccessful...")
self.cancel()
return False
self.context.remote.verify_email(self.context, self.context.facebook_user['facebook_id'], self.context.get_data['vk'])
if self.context.verification_status:
self.context.lbl_confirm_result.setText("User verification successful!")
self.cancel()
Window.open(self.context.app_info['url'], "_top", "")
return True
示例4: onClickDrawing
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import open [as 别名]
def onClickDrawing(self, sender, event):
Window.open(self._img.getUrl() + '&render=html&title=%s'%self._perspective, self._perspective, "status=1,resizeable=1,scrollbars=1")
示例5: urlwindow
# 需要导入模块: from pyjamas import Window [as 别名]
# 或者: from pyjamas.Window import open [as 别名]
def urlwindow(link,title):
Window.open(link,title)