lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] sequence input editor -- how to get accepted keywords


From: Greg Chicares
Subject: Re: [lmi] sequence input editor -- how to get accepted keywords
Date: Thu, 01 Jul 2010 17:55:12 +0000
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

On 2010-05-12 16:11Z, Vaclav Slavik wrote:
>   
> Also, I use a gross hack to get the Input instance InputSequence needs:
> I find the toplevel window, cast it to MvcController, get MvcModel from
> it and cast it to Input (assuming that InputSequenceEntry control cannot
> occur elsewhere). Any better suggestion would be appreciated; this is
> the best I could untangle the MVC code on my own. Note that this would
> be needed even with 2a), for the automagic duration number change when 
> you change duration mode, as proposed before.

[For the archives--I remembered your having said "gross hack",
and I couldn't find anything that seemed gross or a hack...]

You subsequently found a nicer way: MvcController::Model(). This:
  void InputSequenceEntry::UponOpenEditor(wxCommandEvent&)
is the only place Model() is used. It's driven by a command button
whose only connection to the rest of lmi is an XRC resource and its
associated handler. Adding trivial const accessor like Model() seems
a small price to pay for such strong encapsulation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]