J
Jimbo
Hi, I always seem to fall foul of the same issues when programming with a
user interface and that is showing/hiding controls depending on what the
user is doing.
Maybe it's the way I design my interfaces (web mostly) but I always end up
with what I consider a real mess of text1.visible = false stuff all over
the place, I hate it.
Anyway I was reading about the "Observer" pattern which to my mind seems to
be made for this type of scenario, but I cant seem to find a pratical
example of some working code.
So say I have a dropdown list with three items "1", "2" and "3" and each
specifies a text box to show with some info (drawn from a db) how would one
go about using the observer for this simple scenario? What messages would
be passed around to do the updates, etc?
You'll have to excuse if this is the wrong group but I tried the patterns
ng and it seems a bit dead.
user interface and that is showing/hiding controls depending on what the
user is doing.
Maybe it's the way I design my interfaces (web mostly) but I always end up
with what I consider a real mess of text1.visible = false stuff all over
the place, I hate it.
Anyway I was reading about the "Observer" pattern which to my mind seems to
be made for this type of scenario, but I cant seem to find a pratical
example of some working code.
So say I have a dropdown list with three items "1", "2" and "3" and each
specifies a text box to show with some info (drawn from a db) how would one
go about using the observer for this simple scenario? What messages would
be passed around to do the updates, etc?
You'll have to excuse if this is the wrong group but I tried the patterns
ng and it seems a bit dead.