v1.2.0 — Hungarian notation refactor
Breaking changes — property rename to Hungarian
Every public control class in source/core/classes.prg migrates from Delphi-style property names to Harbour Hungarian notation. The dual-name aliases (Glyph/Picture, Color/nClrPane, …) are dropped — code using the old names must be updated.
Renamed accessors
- TControl / TForm:
Name → cName,Left → nLeft,Top → nTop,Width → nWidth,Height → nHeight,Text → cText,Enabled → lEnabled,Color → nClrPane,Title → cTitle,AppTitle → cAppTitle,FontName → cFontName,FontSize → nFontSize,BorderStyle → nBorderStyle,Position → nPosition,Cursor → nCursor,Sizable → lSizable,AppBar → lAppBar,ToolWindow → lToolWindow,KeyPreview → lKeyPreview,ShowHint → lShowHint,Hint → cHint,AutoScroll → lAutoScroll,DoubleBuffered → lDoubleBuffered,AlphaBlend → lAlphaBlend,ClientWidth/Height → nClientWidth/nClientHeight,ModalResult → nModalResult,ControlAlign → nControlAlign - TButton / TBitBtn:
Default/Cancel/Kind/ModalResult→lDefault/lCancel/nKind/nModalResult;Glyphdropped, usecPicture - TSpeedButton:
Kind/Flat→nKind/lFlat;Glyphdropped - TImage:
Picturedropped, usecPicture - TShape / TBevel:
Shape/PenColor/PenWidth/Style→nShape/nPenColor/nPenWidth/nStyle - TEarthView / TMap:
Lat/Lon/Zoom/MapType→nLat/nLon/nZoom/nMapType - TStringGrid:
ColCount/RowCount/FixedRows/FixedColsalln-prefixed - TMaskEdit:
EditMask/MaskKind→cEditMask/nMaskKind - TCheckBox / TRadioButton:
Checked → lChecked - TTimer:
Enabled → lEnabled - TApplication:
Title → cTitle
OnXxx event setters and the semantic Value alias on TEdit/TMemo/TComboBox/TListBox are preserved.
Build pipeline catches up
include/hbbuilder.chDSL (DEFINE FORM,BUTTON,CHECKBOX,RADIOBUTTON) expands to the new setters — fixes the IDE startup crashTFORM:_FONTNAMEon theFONTclause.- Code generators in
source/hbbuilder_{win,macos,linux}.prgemit the renamed identifiers;RestoreFormFromCodeparsers recognise them.
Samples
Every project under samples/projects/ now builds with a bare harbour.exe invocation (40/40):
#include \"hbbuilder.ch\"injected where missing.dotnet/java/rust/rubyeditor strings converted toe\"…\\\"…\"extended literals.- Duplicate
MsgInfoinhelloworld/Project1.prgremoved. - Stray
----separators and out-of-orderOF/PROMPTclauses cleaned up.
macOS build script
build_mac.shnow detects mysql-client and libpq dynamically. When either is absent,cocoa_mysql.c/cocoa_pgsql.ccompile under-DHB_NO_MYSQL/-DHB_NO_PGSQLand emitHB_FUNCstubs for everyHBMYSQL_*/HBPGSQL_*entry declaredEXTERNALinclasses.prg. The IDE still links and runs;TMySQL/TPostgreSQLcalls return nil/0/empty until brew install enables them.detect_brew_prefixnow returns 0 on all paths soset -edoes not abort the build before the optional-DB logic runs.
Stress
| Test | Result |
|---|---|
| Samples × 5 iterations (Windows) | 200/200 OK, 2.81s avg |
| IDE startups × 10 (Windows) | 10/10 alive, 21 MB stable, ~3.5s |
classes.prg × 4 platform defines |
0 errors |
| macOS build (iMac 13.7.8) | OK, IDE runloop entered |
Commits
- 2e106a8 refactor: TForm/TControl/TButton/... props to Hungarian notation
- 31b0027 docs(win): update stale Delphi-style refs in hbbuilder_win.prg comments
- 5b64876 fix(samples): standalone harbour compile across all projects
- 8137118 build(mac): make mysql-client and libpq optional
- 21c97fb fix(mac build): detect_brew_prefix must not abort under set -e