Use classgen functions that were part of the ClassGenerator class. Put try/finally blocks around code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes RTBug #1904.