1. The goal for the 4.0 release is to mimic as good as possible the current HMG functionality only, so, submit code related to the achievement of this goal exclusively (the new features will be part of HMG 4.1).
2. The code submitted must have the same license as HMG (GPL+'Harbour Exception').
3. Use the same policy as existing project code for variables naming. This is: the initial letter indicates data type and the rest of the name is mixed case and as descriptive as possible ie:
4. Indent the code to make clearly readable the control structures.
5. Comment the code you've added or modified as verbosely as possible (the rest of us must understand it too )
6. Please, add a commentary when commit changes (Tortoise commit window- 'message' frame).
7. Each control has three samples:
- Standard OOP
- xBase Syntax
- Alternate Syntax
Please, continue this way, so, we can show the three coding styles available for each control.
8. I've deliberately broke HMG compatibility in some special cases, using constants to signal property values to allow a OOP coding according standard way and a better (correct) alternate syntax.
ie: For label I've created the following constants:
#define LBL_LEFT 0
#define LBL_CENTER 1
#define LBL_RIGHT 2
So, when coding using OOP (ie):
:Alignment := LBL_RIGHT
When using alternate syntax:
This is more correct than current HMG's alternate syntax where RightAlign and LeftAlign are treated as properties:
RIGHTALIGN .T. | .F.
CENTERALIGN .T. | .F.
This is obviously wrong and we have the opportunity to correct now.
For full backwards compatibility we can create some preprocessor directives to make old syntax still working, but we must discourage its use. So, please consider this when required.
9. Remember that all controls inherits from Control class.
So, if you believe that the property, method or event you are coding can be reused 'as is' for other controls, it must be located at control class, if not you can put in the class of the control you are working on.
10. Other important thing is that you must 'double code' for prior/post control creation, since you can't access to a QT object before that this be created (done at Create() method executed by default at window activation).
So, your code must look at this:
Code: Select all
If ::lCreated * Access to QT object (ie) If pcount() == 0 Return ::oQTObject:Something ElseIf pcount() == 1 ::oOQTObject:Something(xValue) EndIf Else * Access to instance variables only (ie) If pcount() == 0 Return ::xVar ElseIf pcount() == 1 ::xVar := xValue EndIf EndIf
**** If the code submitted does not meet these guidelines, it could be removed by the project administrators ****
* To download the binary release (containing compiler, libraries and tools needed):
UNPACK IT IN ITS DEFAULT LOCATION (C:\HMG.4) OTHERWISE IT WILL NOT WORK.
* To become a contributor:
a. Download Tortoise SVN client (http://sourceforge.net/projects/tortoisesvn/).
b. Install according the setup wizard directions.
c. Open Windows explorer.
d. Right click in the C:\HMG.4\SVN folder.
e. Select 'SVN Checkout' (project url is: https://hmg.svn.sourceforge.net/svnroot/hmg).
f. If you change the code of your local copy and want to upload, Right click in the C:\HMG.4\SVN and select SVN Commit...
g. If you want download the changes from the server, Right click in the C:\HMG.4\SVN and select SVN Update.
* QT 4.5.3 Documentation: http://doc.trolltech.com/4.5/index.html
* HMG Documentation: hmgdoc/hmgdoc.htm
* Recommended Code Editor: I'm using Notepad++ (https://sourceforge.net/projects/notepad-plus/). It is open source and has a lot of nice features that makes it better that my previous choice (PsPad). ie: it shows lines to enclose control structures (It's very cool )