On Tue, Sep 19, 2006 at 01:25:24AM +0100, Angus Leeming wrote: > Unfortunately, there's no obvious better solution than these big, ugly > switch statements. At least, not in C++.
Well, dispatching an LFUN is basically triggering an action and there's no reason why action handling needs to be done in a big switch. There could be e.g. slots connected to the action's 'triggered()' signal or such. The big switch is not unusual, though. > Maybe you could plan an Alexandrescou-like factory so that the > stakeholders could register there interest in particular LFUNs... (inset > A says "I'm interested in LFUN B, etc.) Did I mention 'signal/slot' recently? ;-} Andre'