From: Kevin A. <al...@se...> - 2002-01-12 15:10:19
|
I updated the 'isdefault' attribute for the Button component. I renamed it to 'default', changed the _setDefault method and added a _getDefault method so that it can be used like a normal attribute. You can have only one default button (obviously) for a dialog or background, so doing something like: self.components.btn1.default = 1 will automatically change the default status of any other button that might have been the default. I updated the all the dialogs in the samples to use the new name and added 'default' to the Property Editor and resourceEditor. I also updated both the findfiles and searchexplorer samples so they have default buttons defined in the their resource files. The default button works fine on Windows, let me know if it doesn't work under GTK. Other changes: I changed the gotoLine method in the textEditor sample to ignore wrapped lines under Windows and jump to the correct line based on newlines ('\n') in the field; textEditor should always jump to the right line when you double-click a result line in findfiles. This is different than Notepad which counts wrapped lines when doing a go to and is part of a larger issue about how wxTextCtrl reports positions depending on platform and whether the wxHSCROLL style is used on Windows (PythonCard doesn't use it). Simon and I got weary of looking at this stuff when he was working on textRouter, but I'm going to have to get back into it soon to document how our TextArea class behaves differently on GTK and Windows (and eventually the Mac). I already switched to the wxTE_RICH style to fix most of the issues back at release 0.5.3. added shell key bindings and usage link to toc.html http://pythoncard.sourceforge.net/toc.html ka ps. I've been using the textEditor sample instead of notepad or PythonWin for quick edits lately and it has been working fine. I typically grep in findfiles for things like 'isdefault' which I want to change, then I just double-click on a result line which opens up the file and jumps to the right line in the textEditor sample. Then I make my fix, hit Save and repeat. I also use findfiles all day long to find code in the framework, samples, and wxPython; I really need to refactor the sgrepmod.py I stole from PythonWin to make it more efficient and possibly use threads with notification for updating the results. Of course you can do the same grep/replaces in PythonWin, Emacs, and probably vim, but sometimes it is nice to eat your own dog food ;-) |