thanks for your response. I was not criticizing the aproach, I just want to make sure I understand correctly the recommended approach in the environment I am using. There are probably good reasons for this (and you gave some), and I do not want to break with the established techniques thoughtlessly.
2. That is of course true. But as I understand, a http://lejos.sourceforge.net/p_technologies/nxt/nxj/api/lejos/nxt/SensorPortListener.html
can be added to the sensor, right? Of course that may require a separate thread, and callbacks may come back to my Behaviour in that thread, but the additional thread is now hidden farther away from the caller
3. Yes, you understand that correctly. If the Behaviour checks whether the touch sensor is pressed, it may be pressed only for 10ms during which takeControl() was not called. (I understand this is unlikely, but you get the point.)
4. Yes, thanks.
Ok. Just for playing around with it (and I guess that's what we are doing here
), I will try it out. I will probably even inherit from Behaviour, so my behaviours can be used in both environments, and provide a simple adapter to use generic Behaviours in my version. I'll share my experiences.