wrote:
>obviously you haven't seen my macro collection :)
that would be quite interesting to see those macros you use to work with bcb
I personally have lots of one-liners such as BEGIN_END_UPDATE(SomeObject) SAVE_RESTORE_PROPERTY(PropName,TObject*,SetValue) SHOW_HIDE_BUSY(BusyMessage,ProgressMin,ProgressMax) SAVE_RESTORE_CURSOR DISABLE_ENABLE_CONTROLS(DataSet) SAVE_RESTORE_BOOKMARK(DataSet) etc. not to mention numerous ON_BLOCK_EXIT, ON_BLOCK_EXIT_OBJ and other scopeguards created from variadic macros
that would be lots of deeply nested try/finally's nightmare if I used delphi to create the very same code
so while using macros are error-prone sometimes (especially for those who have no experience with them) they're inevitable at the same time for those who like to write compact and expressive code
-- Vladimir Ulchenko aka vavan