gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Delete Photo - not sure what this means ?


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Delete Photo - not sure what this means ?
Date: Thu, 19 Aug 2004 14:58:20 +0200
User-agent: Mutt/1.3.22.1i

> So as I can improve my nomenclature, can you explain why the use of:
When I review code I almost subconsciously change things to
the coding style I am used to. It isn't necessarly better but
helps *me* read/understand the code faster and safer.

>  ID_PUP (instead of just ID_SOMETHING)
ID_ : is customary in wxPython for action IDs
PUP : you used "Popup" which I found too verbose

> and the underscore  in terms such as:
> 
> _on_ExportPhoto
A "private" method not part of the normal API. Should be two
underscore (__) but I am not sure whether that will break at
some point. Difference:

a_module._something will always be a_module._something. It will
just not be exported when
    from a_module import *
is done. So, private in a sense.

a_module.__a_module will internally be treated as
a_module._a_module_something. Eg, it isn't easily callable
directly (one would have to mangle the name manually).

Now, _on_ExportPhoto() is an internal method (an event
handler) - not part of the API - so "_*". However, I am not so
sure about using __* since I don't know whether the namespace
mangling will be done right when the event handler is called
by the wxPython framework (eg from out-of-namespace). I didn't
muck around with the "ExportPhoto" part as that was your own
suggestion. Personally, I prefer export_photo but that's a
matter of taste, I suppose.

> That way if I understand I will do it as I go and not waste your time having 
> to fix my code.
You can adopt it but I am not enforcing that.

> Also I'll try and remember the underscore bracketed texts which from memory 
> is 
thanks

> to allow translation into other languages
correct

> Pretty booked out today - 
> will have about 40 + patients so won't get to it till tonight I suspect.
Don't rush.

> Thanks again for your patience with my learning - but I'm getting there.
Welcome.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]