Repository: nvaccess/nvda

Issue:
wxPython 4: wx.TextEntryDialog no longer accepts defaultValue kwarg
Hi,
Regression found with #7077: wx.TextEntryDialog no longer supports defaultValue kwarg, seen when trying to edit comments in Excel and rename config profiles.

### Steps to reproduce:
1. Open Excel.
2. Move to a cell and press Shift+F2 to edit comment.

### Actual behavior:
Error tone is heard or NVDA appears to do nothing.

### Expected behavior:
Text entry dialog shows up.

### System configuration:

#### NVDA Installed/portable/running from source:
Installed

#### NVDA version:
Alpha.15608

#### Windows version:
Windows 10 Version 1803

#### Name and version of other software in use when reproducing the issue:
Microsoft Office 365 Excel version 16.0.10228.20134

#### Other information about your system:

### Other questions:

#### Does the issue still occur after restarting your PC?
Yes

#### Have you tried any other versions of NVDA?
Yes (2018.2.1, 2018.3 beta)


### Traceback:

ERROR - scriptHandler.executeScript (07:51:44.562):
error executing script: <bound method ExcelCell.script_editComment of <NVDAObjects.window.excel.ExcelCell object at 0x051E4EF0>> with gesture u'shift+f2'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 187, in executeScript
  File "NVDAObjects\window\excel.pyc", line 1407, in script_editComment
TypeError: TextEntryDialog(): arguments did not match any overloaded call:

Thanks.


Discussion:

Resolving patch:
diff --git a/source/NVDAObjects/window/excel.py b/source/NVDAObjects/window/excel.py
--- a/source/NVDAObjects/window/excel.py
+++ b/source/NVDAObjects/window/excel.py
@@ -1403,7 +1403,7 @@ def script_editComment(self,gesture):
 			_("Editing comment for cell {address}").format(address=self.cellCoordsText),
 			# Translators: Title of a dialog edit an Excel comment 
 			_("Comment"),
-			defaultValue=commentObj.text() if commentObj else u"",
+			value=commentObj.text() if commentObj else u"",
 			style=wx.TE_MULTILINE|wx.OK|wx.CANCEL)
 		def callback(result):
 			if result == wx.ID_OK:
diff --git a/source/gui/__init__.py b/source/gui/__init__.py
--- a/source/gui/__init__.py
+++ b/source/gui/__init__.py
@@ -213,12 +213,12 @@ def onExecuteUpdateCommand(self, evt):
 
 	def evaluateUpdatePendingUpdateMenuItemCommand(self):
 		try:
-			self.sysTrayIcon.menu.RemoveItem(self.sysTrayIcon.installPendingUpdateMenuItem)
+			self.sysTrayIcon.menu.Remove(self.sysTrayIcon.installPendingUpdateMenuItem)
 		except:
 			log.debug("Error while removing  pending update menu item", exc_info=True)
 			pass
 		if not globalVars.appArgs.secure and updateCheck and updateCheck.isPendingUpdate():
-			self.sysTrayIcon.menu.InsertItem(self.sysTrayIcon.installPendingUpdateMenuItemPos,self.sysTrayIcon.installPendingUpdateMenuItem)
+			self.sysTrayIcon.menu.Insert(self.sysTrayIcon.installPendingUpdateMenuItemPos,self.sysTrayIcon.installPendingUpdateMenuItem)
 
 	def onExitCommand(self, evt):
 		if config.conf["general"]["askToExit"]:
diff --git a/source/gui/configProfiles.py b/source/gui/configProfiles.py
--- a/source/gui/configProfiles.py
+++ b/source/gui/configProfiles.py
@@ -218,7 +218,7 @@ def onRename(self, evt):
 		# Translators: The label of a field to enter a new name for a configuration profile.
 		with wx.TextEntryDialog(self, _("New name:"),
 				# Translators: The title of the dialog to rename a configuration profile.
-				_("Rename Profile"), defaultValue=oldName) as d:
+				_("Rename Profile"), value=oldName) as d:
 			if d.ShowModal() == wx.ID_CANCEL:
 				return
 			newName = api.filterFileName(d.Value)


Test patch: