mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 12:41:10 +02:00
Merge pull request #840 from RobinD42/fix-issue836
Fix wx.TextCompleterSimple.GetCompletions
This commit is contained in:
@@ -105,6 +105,9 @@ Changes in this release include the following:
|
||||
* Ensure that the page exists in book controls GetPage and RemovePage methods.
|
||||
At least one of the wx ports do not do this. (#830)
|
||||
|
||||
* Change wx.TextCompleterSimple.GetCompletions to send the list of strings
|
||||
as a return value, rather than a parameter that gets filled. (#836)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -42,8 +42,9 @@ def run():
|
||||
c.copyFromClass(tc, 'Start')
|
||||
c.copyFromClass(tc, 'GetNext')
|
||||
|
||||
# TODO: Change GetCompletions to return the wxArrayString instead of
|
||||
# passing it as a parameter?
|
||||
# Change GetCompletions to return the wxArrayString instead of passing it
|
||||
# as a parameter
|
||||
c.find('GetCompletions.res').out = True
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
@@ -27,9 +27,11 @@ class testcompleter_Tests(wtc.WidgetTestCase):
|
||||
class MyTextCompleterSimple(wx.TextCompleterSimple):
|
||||
def __init__(self):
|
||||
wx.TextCompleterSimple.__init__(self)
|
||||
def GetCompletions(self, prefix, res):
|
||||
def GetCompletions(self, prefix):
|
||||
res = []
|
||||
res.append("one")
|
||||
res.append("two")
|
||||
return res
|
||||
t = wx.TextCtrl(self.frame)
|
||||
t.AutoComplete(MyTextCompleterSimple())
|
||||
|
||||
|
Reference in New Issue
Block a user