[Interest] Access forms from an called class?
Tony Rietwyk
tony at rightsoft.com.au
Tue Mar 5 01:40:34 CET 2013
> Sent: Tuesday, 5 March 2013 3:08 AM
>
> OK, I did that and I finally got the btle class returning the data. I must
say
> though, I am not at all convinced this is a great way of doing it, because
now
> I'll have a couple of hundred routines in the main class that deal with
> decoding each message that's passed back. I can't pass a generic message
> back, because different BTLE messages contain different sorts of data that
> need to be dealt with in their own way. It seems to me a much nicer way to
> do this would be in the btle class and not clutter up the MainWindow.
>
> I'm probably misunderstanding something or just going about this in
totally
> the wrong way though. :~/
Hi Robert,
Unfortunately, there is really no way around matching complicated data to
UI, unless you add a modelling layer. That would give you other benefits
like saving and restoring data, but it takes at least as much code anyway.
In our case we had 70 different exam questions, each with different data and
each requiring 2 dialogs. We used separate classes for each with a
registration system and virtual methods to create, load, show, scrape and
save each dialog.
We also used a designer plugin to add composite widgets for common data
groups across the question types. This makes designing the UI much easier.
Hope that helps,
Tony
More information about the Interest
mailing list