def getValue as String
"""Returns text in entry box"""
return .entry.getValue
def setValue(text as String)
"""Sets the text in the entry box"""
.entry.setValue(text)
That's fine for two methods. It gets annoying for 30. I propose the following syntax:
- Code: Select all
forward to .entry
getValue
setValue
forward to .label
getLabel
setLabel
The above is the equivalent of:
def getValue as String
"""Docstring imported from wx.TextCtrl method"""
return .entry.getValue
def setValue(text as String)
"""Docstring"""
.entry.setValue(text)
def getLabel as String
"""Docstring"""
return .label.getLabel
def setLabel(text as String)
"""Docstring"""
.label.setLabel(text)
This makes code much shorter, and generates docstrings from TextCtrl and StaticText (the programmer may make a mistake in the docstring, or may be too lazy to write docstrings for all the borrowed methods)
Thoughts?
Wow, trying to post this on a smartphone was annoying.