Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > Re: Newbie ques...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 821 of 917
Post > Topic >>

Re: Newbie question -> Observer pattern

by Peter Horan <peter@[EMAIL PROTECTED] > Sep 20, 2006 at 03:19 AM

iso8859-1@[EMAIL PROTECTED]
 wrote:

> for a GUI I want the View/Controller to observe the Model. The
> View/Controller registers at the Model as observer. I guess there is an
> easy way to get this functionality in ISE Eiffel - for example by
> inheriting from the correct class - but I don't know which one. Can
> someone point me in the right direction?

If you are using EiffelVision 2, use the action lists associated with the
Widgets.

For example,
     b: EV_BUTTON

         -- Initialisation code fragment
     ...
     button.select_actions.extend(agent set_me(button))
     ...
         set_me(b: EV_TOGGLE_BUTTON) is
                  --
             do
             end
-- 
Peter Horan               School of Engineering and Information Technology
peter@[EMAIL PROTECTED]
       Deakin University
+61-3-5227 1234 (Voice)   Geelong, Victoria 3217, AUSTRALIA
+61-3-5227 2028 (FAX)     http://www.eit.deakin.edu.au/~peter

-- The Eiffel guarantee: From specification to implementation
-- (http://www.cetus-links.org/oo_eiffel.html)




 4 Posts in Topic:
Newbie question -> Observer pattern
iso8859-1@[EMAIL PROTECTE  2006-09-19 14:19:00 
Re: Newbie question -> Observer pattern
Peter Horan <peter@[EM  2006-09-20 03:19:01 
Re: Newbie question -> Observer pattern
iso8859-1@[EMAIL PROTECTE  2006-09-19 22:06:02 
Re: Newbie question -> Observer pattern
Peter Horan <peter@[EM  2006-09-21 01:22:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 6:30:04 CDT 2008.