injection of the mediator into a nested context

31 views
Skip to first unread message

guillaume kuhler

unread,
Nov 9, 2017, 2:53:40 PM11/9/17
to StrangeIoC
Hi,

I have a problem that I can't solve.
I try to make independent components that embark each their own context, all this being in a parent context.
here is an example of the type of hierarchy I use:
-root context
--start button context (child)
--quit button context (child)

The problem is when I launch the game, randomly the mediator of the button views is instantiating and sometimes not. 

Someone has the same problem and how do you please solve it?

wco...@gmail.com

unread,
Nov 10, 2017, 10:20:16 AM11/10/17
to guillaume kuhler, StrangeIoC
I'm not sure a context for a button is the right approach. Why would you want to wire up an entire context for a single button?

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "StrangeIoC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strangeioc+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

guillaume kuhler

unread,
Nov 11, 2017, 11:07:50 AM11/11/17
to StrangeIoC
The button is a simple example, I have more complex independent components like the best score management. This allows me to reuse them in another game without too many changes. 
The example of buttons may not be the right one, my goal is to create components that carry their own logic and internal signals etc. without having to declare them in the parent context, a bit like the angular components.

Maybe I'm not doing the right thing, I'm designing a mini test game, I was thinking about structuring elements of the independent graphical user interface with their own context so that I could reuse them later on in another scene or in another game, is that a good approach?
Reply all
Reply to author
Forward
0 new messages