Permalink
Browse files

remove sender=None

git-svn-id: https://pyjamas.svn.sourceforge.net/svnroot/pyjamas/trunk@596 7a2bd370-bda8-463c-979e-2900ccfb811e
  • Loading branch information...
1 parent 84a193f commit 5b10b7b44e932cb4688320986cf1694e7966c366 lkcl committed May 30, 2009
View
2 examples/addonsgallery/CanvasTab.py
@@ -155,7 +155,7 @@ def __init__(self):
Canvas.__init__(self, 150, 150)
self.img = CanvasImage('images/wallpaper.png', self)
- def onLoad(self, sender=None):
+ def onLoad(self, sender):
if sender==self.img:
self.draw()
View
4 examples/dynamictable/DayFilterWidget.py
@@ -19,7 +19,7 @@ class DayCheckBoxListener:
def __init__(self, calendar):
self.calendar = calendar
- def onClick(self, sender=None):
+ def onClick(self, sender):
self.calendar.setDayIncluded(sender.day, sender.isChecked())
@@ -59,7 +59,7 @@ def setAllCheckBoxes(self, checked):
widget.setChecked(checked)
self.dayCheckBoxListener.onClick(widget)
- def onClick(self, sender=None):
+ def onClick(self, sender):
if self.buttonAll == sender:
self.setAllCheckBoxes(True)
elif self.buttonNone == sender:
View
2 examples/dynamictable/DynaTableWidget.py
@@ -37,7 +37,7 @@ def __init__(self, owner):
self.gotoPrev.setEnabled(False)
self.gotoFirst.setEnabled(False)
- def onClick(self, sender=None):
+ def onClick(self, sender):
if sender == self.gotoNext:
self.owner.startRow += self.owner.getDataRowCount()
self.owner.refresh()
View
2 examples/formpanel/FormPanelExample.py
@@ -53,7 +53,7 @@ def onModuleLoad(self):
RootPanel().add(self.form)
- def onClick(self, sender=None):
+ def onClick(self, sender):
self.form.submit()
def onSubmitComplete(self, event):
View
2 examples/gears/GearsDemo.py
@@ -30,7 +30,7 @@ def __init__(self):
except ex:
log("could not create database" + str(ex))
- def onClick(self, sender=None):
+ def onClick(self, sender):
phrase = self.tb.getText()
currTime = Datetime().getTime()
self.db.execute('insert into Demo values (?, ?)', phrase, currTime);
View
2 examples/gridtest/GridTest.py
@@ -34,7 +34,7 @@ def __init__(self):
self.add(self.addb)
self.add(self.g)
- def onClick(self, sender=None):
+ def onClick(self, sender):
print sender
if sender==self.addb:
self.page+=1
View
2 examples/infohierarchy/InfoDirectory.py
@@ -80,7 +80,7 @@ def setInitialWidth(self, width):
def setHeight(self, height):
SimplePanel.setHeight(self, height)
- def onClick(self, sender=None):
+ def onClick(self, sender):
if self.collapsed == False:
self.collapse.setUrl("./tree_closed.gif")
self.collapsed = True
View
2 examples/jsobject/TestDict.py
@@ -51,7 +51,7 @@ def display_value(self):
RootPanel().add(HTML("Value using javascript:" ))
RootPanel().add(HTML(self.r.javascript_get_value(key)))
- def onClick(self, sender=None):
+ def onClick(self, sender):
self.display_value()
View
2 examples/jsobject/TestRect.py
@@ -51,7 +51,7 @@ def onModuleLoad(self):
RootPanel().add(HTML("Current value: %d %d" % ( self.r.get_x(), self.r.get_y())))
- def onClick(self, sender=None):
+ def onClick(self, sender):
x = int(self.xbox.getText())
y = int(self.ybox.getText())
View
2 examples/jsonrpc/JSONRPCExample.py
@@ -70,7 +70,7 @@ def onModuleLoad(self):
RootPanel().add(panel)
- def onClick(self, sender=None):
+ def onClick(self, sender):
self.status.setText(self.TEXT_WAITING)
method = self.methods[self.method_list.getSelectedIndex()]
text = self.text_area.getText()
View
4 examples/kitchensink/Images.py
@@ -42,7 +42,7 @@ def __init__(self):
self.loadImage(0)
- def onClick(self, sender=None):
+ def onClick(self, sender):
if sender==self.prevButton:
self.loadImage(self.curImage - 1)
elif sender == self.nextButton:
@@ -51,7 +51,7 @@ def onClick(self, sender=None):
def onError(self, sender):
pass
- def onLoad(self, sender=None):
+ def onLoad(self, sender):
self.loadingImage.setUrl(self.baseURL() + "images/blanksearching.gif")
def loadImage(self, index):
View
4 examples/kitchensink/Popups.py
@@ -33,7 +33,7 @@ def __init__(self):
def onShow(self):
pass
- def onClick(self, sender=None):
+ def onClick(self, sender):
if sender == self.fPopupButton:
p = MyPopup()
left = sender.getAbsoluteLeft() + 10
@@ -86,7 +86,7 @@ def __init__(self):
iframe.setHeight("20em")
self.setWidget(dock)
- def onClick(self, sender=None):
+ def onClick(self, sender):
self.hide()
View
2 examples/kitchensink/Text.py
@@ -58,7 +58,7 @@ def __init__(self, parent, textBox, echo, select_all):
self.parent=parent
self.select_all=select_all
- def onClick(self, sender=None):
+ def onClick(self, sender):
if sender == self.select_all:
self.textBox.selectAll()
self.textBox.setFocus(True)
View
2 examples/mail/AboutDialog.py
@@ -50,7 +50,7 @@ def __init__(self):
self.setWidget(outer)
- def onClick(self, sender=None):
+ def onClick(self, sender):
self.hide()
def onKeyDownPreview(self, key, modifiers):
View
2 examples/mail/Contacts.py
@@ -76,7 +76,7 @@ def __init__(self, contact, link):
self.cont = contact
self.link = link
- def onClick(self, sender=None):
+ def onClick(self, sender):
if (sender == self.link):
popup = ContactPopup(self.cont)
left = self.link.getAbsoluteLeft() + 32
View
2 examples/mail/MailList.py
@@ -57,7 +57,7 @@ def onCellClicked(self, sender, row, cell):
if (row > 0):
self.selectRow(row - 1)
- def onClick(self, sender=None):
+ def onClick(self, sender):
if (sender == self.olderButton):
# Move forward a page.
self.startIndex = self.startIndex + MailList.VISIBLE_EMAIL_COUNT
View
2 examples/mail/TopPanel.py
@@ -39,7 +39,7 @@ def __init__(self):
inner.setStyleName("mail-TopPanel")
links.setStyleName("mail-TopPanelLinks")
- def onClick(self, sender=None):
+ def onClick(self, sender):
if (sender == self.signOutLink):
Window.alert("If this were implemented, you would be signed out now.")
elif (sender == self.aboutLink):
View
2 examples/onclicktest/OnClickTest.py
@@ -14,7 +14,7 @@ def onModuleLoad(self):
RootPanel().add(self.b)
RootPanel().add(self.b2)
- def onClick(self, sender=None):
+ def onClick(self, sender):
Window.alert("object called")
View
2 examples/shell/Popups.py
@@ -213,7 +213,7 @@ def __init__(self, identifier, title, iframe):
def setUrl(self, url):
self.iframe.setUrl(url)
- def onClick(self, sender=None):
+ def onClick(self, sender):
self.hide()
def set_width(self, width):
View
2 examples/shell/Screen.py
@@ -30,7 +30,7 @@ def onMouseUp(self, sender, x, y):
if not self.dragged:
self.screen.raise_or_lower(self)
- def onClick(self, sender=None):
+ def onClick(self, sender):
if sender == self.closeButton:
self.screen.close_app(self)
View
2 examples/toggle/Toggle.py
@@ -42,7 +42,7 @@ def onModuleLoad(self):
RootPanel().add(self.vpanel)
self.i = False
- def onClick(self, sender=None):
+ def onClick(self, sender):
if sender == self.button:
if self.i:
self.i = False
View
4 examples/widgets/Widgets.py
@@ -40,7 +40,7 @@ def __init__(self, img_url):
self.isActive = True
self.onTimer()
- def onLoad(self, sender=None):
+ def onLoad(self, sender):
el = self.clock.getElement()
self.width = DOM.getAttribute(el, "width")
self.height = DOM.getIntAttribute(el, "height")
@@ -50,7 +50,7 @@ def onLoad(self, sender=None):
def onError(self, sender):
Window.alert("error of some kind (probably missing image at url)")
- def onTimer(self, sender=None):
+ def onTimer(self, sender):
if not self.isActive:
return

0 comments on commit 5b10b7b

Please sign in to comment.