[squeak-dev] [Q on MVC] How can I make my MVC app to save/accept
on enter/return key input?
David T. Lewis
lewis at mail.msen.com
Sat Sep 4 14:36:31 UTC 2010
On Thu, Sep 02, 2010 at 02:41:44PM +0900, Sungjin Chun wrote:
> Hi,
>
> I've developed an app which receives text input using
> PluggableTextView. The problem is that
> users should input cmd-s to save his/her editing. They want to use
> enter/return to save the text
> input. How can I do this?
>
> Thank you in advance.
>
> PS)
> I know everybody uses morphic, but if there's someone who can help me... :-)
Hi,
I did this for the MVC user interface in CommandShell. I made subclasses
of PluggableTextView and PluggableTextController, and implemented
PluggableTextController>>dispatchOnCharacter:with: to cause enter/return
to accept the input. It's not elegant but it works.
I have attached a copy of these two classes, and you can find
the complete CommandShell package on SqueakSource or at
http://wiki.squeak.org/squeak/1914
HTH,
Dave
-------------- next part --------------
??W?L CommandShell-MVC.st ?Xmo?6??@???&l??z???T?p??`???`'?l ZY?pE?H?????~??Z????u?8+?3??g???4?????%????o?5W?Q?%???`c~?efoe??????L?????????;;?^???^Yk???k[b?;?<_?z??S;??2w={??tg??]L)?p?/??V?????Z????CU?m??h??#5%ENO+?????ULN??c?`?@?>????ty???B?Q%?$???a?A??i??}a3?V?????Z??_w???f???????x4:??ar?.f????S[??????????g??????,?4x$;???%??N3?vM?5-??Xb?#?sH?)W?}y??|??_4??`<?^??er4?A?L???W???#?w>?k??6?? ??-??2??b?p?%??MV??:7????????????1?/?????zq0??;?.9<???SdDU??~???k?*?B??E??T?w?n?eC:?9???????n??,??<?jH'?2?y????I at d???1??2????u?b|8???q?????^????m?o?????$????y????xjX?????*?Ce%$%@[T???????U?J]]b????
?\??}8{?Q?Q
rK&??/???Q?#?h??X?'e??ti?Yc??g???
1??r}w????_p; ~3?!????a??V?N??+,?????
??w?
G??XP?2????
???m?~??Q???????:???/YBQ??X6??????\??K????v?>=???= ?x?+b????+5'??? 7w????_!$1% ??n?i?a]?U\?ZVAW)T????U??1?n{???k.9HE???R????????$?k?????$T??????77?+?GkJ???-???/]?YY5?????????hH%J?yl?{??p
???<??>???|F?Y?,?\p?o????????C?a??a?Xt??6 }ZZJ^S???X????~????_?????????$<Z??(~?88|?:???????BE^??Z?b??2t?F*j[?????Mh?-?? ??T?
???i?Q?>IAyTN??r!T6?X?K?S???=k?a???t9???*xQ(?]???HQ???(9?G?F????????T???#?rg^??D?????s??????u ? V?? ??????/???Ur?y+??BB?e?n\]$B?E????V8Ej\?N {??W?P?????^??w??:?Io???w??#?Wj??[????+???r" :-#28
?=?^'{?????8p?EB'?????J?@?w?+??k??2f??g??n?????[??????W???~???b>? te??)&?B??B????e!?;?{0y?uT??4??P???????S???(?\?;~?O???d?]R???(?l??>GN?8?G?{M??0???5a2???}&L"[?\ym%?om??-^u?q|??????????v?? ??&p????)???f???=/?k?<?_?h???B??T ?99?,a?F??&??U!GMU?z????;?????]?|Z???+# E???????B?/?)??T???l????/?`S-
4??????>????K?{?D?? ? ?lx?Pm??c?^?J??#??u?w?????F??
;x v^PZ?Q?B#^S?d??=G ?%???a.?l?2K????!?d>?@hW??$<???[?O??@?N????P4-?V????[?3?
?????9???:???????????b?
More information about the Squeak-dev
mailing list
|