Yesterday I wrote a post about executing some code automatically when a method ends. Today I’ll show you why this approach must be used with care.
Thursday, February 28, 2013
Wednesday, February 27, 2013
Just like (some) other programmers, I like to abuse the fact that the Delphi compiler only destroys local interfaces when a method ends. If you don’t know what I’m talking about, check out the latest Nick’s post in the Fun Code of the Week series.
As an example, Nick put together a function which changes application cursor and at the end of the method reverts it back to the previous state.
procedure test; begin AutoCursor(crHourGlass); // some long operation // cursor is automatically reverted when ‘test’ exits end;
My approach to this pattern is usually slightly different. I like to mark the scope of the local interface with a with statement.
Thursday, February 21, 2013
Sunday, February 17, 2013
The “Embarcadero Academy 2012” series of Delphi-related workshops was very well accepted in Slovenia so we (Embarcadero, Slovenian distributer Marand and me) have extended it into year 2013. The first workshop will be – due to a popular demand – revisited extended workshop on multithreaded programming. I’ll be extending the topics covered in the first workshop with many practical examples.
The date is slightly awkward – February 21st, the same date when Embarcadero will present the “Delphi for iOS” programming tool. Luckily, we’ll finish around 01:00PM which will give everyone enough time to return to the office and watch the webinar which starts at 03:00PM. (We apologize for this – we selected the date when Embarcadero’s webinar was still announced for the 14th but then Emb. moved the date a week ahead.)
As always, workshop will be lead in Slovenian language. Register here!