flex - Design pattern for 2 linked items -


suppose have following visual custom components:

2 blocks: & b

1 link: c, connecting block & b

now, if either block or b change, link c has updated.

i never sure how handle this.

do :

a) pass both block & b line c can add event listener each of them , act when change happens.

b) pass link c both block & b when block changes can notify link.

c) make parent of both blocks , link responsible updating components.

i feel common problem, wonder if there sort of design pattern describing best approach.

any appreciated.

after reading seems mediator pattern might want.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -