[Gambas-user] a observer in a form can't catch an event from other class

Fabián Flores Vadell fabianfloresvadell at ...626...
Fri Jul 1 23:28:09 CEST 2011

2011/6/29 Benoît Minisini <gambas at ...1...>:
> Can you make a little project for me so that I can test exactly your code?
> --
> Benoît Minisini

Thanks Benoît, but that's unnecesary. I quickly found the error in my
code. By the way, I thought that Gambas events could be useful to
decoupling the logic of my program from the presentation, but I found
that would need a selective mecanism to lock the receiver, so, some
events would be blocked but no others. Gambas event haven't this
feature, as far I know.

Now, I'm thinking of using some design pattern, maybe observer or MVC,
I don't know yet. What I want is have the view separated from the

My program is a reimplementation the classic sokoban game, inspired in
the example of Pablo Mileti. But I want explore the posibility of
implement several views: the first (finished) is the basic one, using
a form, containers and controls PictureBox; the second, maybe, by
using a Drawing Area; and the third using SDL.

So, to me is fundamental separate the logic (the model) from the
presentation (the view).

¿Some suggestion? ¿How would be possible implement the MVC pattern in
Gambas? (The controller is the part that I'm not figured how to do)

Fabián Flores Vadell

More information about the User mailing list