Comment #3 on issue 169 by vinetouu: A big one
http://code.google.com/p/ulipad/issues/detail?id=169

Let me reply to your comment by the same number you commented my patch.


####################
1. Yes, I have realized that I made a huge mistake thinking that those are actually documents. But they are not. They are files. So please fix this as proposed in the patch, with one little word different as is in the patch; please read on to know
which one is that.

-- menu item name: 'Recent Documents...' --> 'Recent Files...'

-- helpstring of this item: 'Shows the recently closed documents pop-up.' --> 'Shows recently used files in a pop-up menu.' (this is a little bit fixed as is in the patch; the word 'opened' is changed here to 'used', which is better; please fix it as proposed here; this is the word that is proposed to be different as is in the patch)

-- string in the preferences: 'Maximum number of recent documents:' --> 'Maximum
number of recent files:'

It wasn't a mistake that I proposed this to be fixed as it was before. Sorry that I
was dumb. :)


####################
2. You are right. But please remove the []. So please fix it like so:

-- "Can't open the file [%s]." --> "Can't open the file %s."
You really don't need the []. It works without them. I have tested. So please remove [].


####################
3. Let me explain:

-- if wx.Platform == '__WXMSW__'
This code checks if the graphical toolkit is of Windows OS. The wx.Platform class is a class of the wx graphical library, and all that the class Platform yields is which graphical toolkit is used on the OS you are on. There is no particular name (as far as I know) of the Windows graphical library, so it's just MSW I guess. If you do import wx; wx.Platform on a Linux machine, you would get '__WXGTK__'. And this means that on the Linux machine you are using the graphical library named GTK.

-- if sys.platform == 'win32'
This code checks if the OS is Windows. Actually it checks which API is used. And the API of the Windows OS is named Win32. Under Linux, doing import wx; sys.platform
would yield 'linux2'.


In the case of your UliPad source code, I suggest to test which API is used rahter than which graphical library is used, because the user can run the GTK graphical library on Windows, so your code would fail in that case. Better to check which OS is used and then execute code by that. So I suggest if sys.platform == 'win32'.



Okay, now for the 'except vs. except Exception'. If you use 'except', the user can crash UliPad with pressing Ctrl+C when that code is executing, because the result is a KeyboardInterrupt event which you didn't catch. There is a simple solution: use except Exception! The Exception is the base class of all exceptions in Python. It's generally not a good idea to catch all exceptions because a lot of them can't even be triggered. But as I looked at the code, I also didn't know which exceptions can occur in this case, so the only way is to check for all exceptions. I suggest that you use 'except Exception' everytime you want to catch all exceptions. There is also another exceptions not being caught by 'except' and that is SystemExit. Please use 'except
Exception' everywhere you are catching all exceptions.


####################
4. Yes, your version of the help string is better than mine. Please fix it as you proposed. But have in mind that this menu item is toggling, so you need to make this
correctly by fixing two helpstrings.


####################
5. Yes, you are right. I think that the current string is okay after all.


####################
6. Yes, it is better. I agree.



###################################
You forgot to fix one helpstring which needs a dot at the end.

'Toggles the word wrap feature of the current document' --> 'Toggles the word wrap
feature of the current document.'



Limodou, you need to trust me more. If I fix something, I have put a lot of thought into the fix. Next time, please trust me that my version is good. I don't always have the time to explain why my version is better. I really love UliPad and I want that it becomes perfect. I have a lot of patches to give you because there are a lot of things to be fixed, especially strings. I know that it's difficult for you to correctly express yourself in the English language because your native language is Chinese, and between those two languages is a huge difference. So let me help you correct your expressions. I must admit that English is not my native language as well, but I am a professional English speaker. I don't want to brag myself but I think I am good at this so I can help. I am a human so I make mistakes. Please forgive me for that. But as time goes by, I re-think about the fixes I proposed and I sometimes realize that I was wrong; then I propose that some string (or whatever) be fixed back as it was, just with a little change to be made to the original version of
the string (or whatever).

I must say that I am very precise. I can even say that you won't find any mistake in the text of this reply to your comment. I am editing it so long that it's perfect.
The same goes for UliPad's strings (or whatever I propose).

Oh, I almost forgot. I don't know if you noticed but I am Chester Dunn. :) Well, that's not my real name but I am the same person. So I am asking if you can remove the author 'Chester Dunn' under 'Also thanks a lot' from the AUTHORS.txt file, because you already have 'Vinetouu' in that authors list under 'Great thanks to'. Why have two same authors? :) My real name is Boštjan Mejak. You can copy & paste my real name into the authors list and replace 'Vinetouu' with 'Boštjan Mejak'. The 3rd letter of my name is a non-ASCII character, so please make the file AUTHORS.txt use the encoding UTF-8 (if it doesn't use it already), otherwise the 3rd letter of my
name won't be correctly displayed there.

Okay, so this is everything I wanted to say. Be good and have fun! ;) I have some stuff to do, so I'll provide new patches some other day. Please fix all the things mentioned in this reply to your comment. That would certainly improve UliPad.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply via email to