Hello,
Could you expand a bit more about exactly what you're looking for? For example, do you want the user to connect the block, then have the block automatically disconnect, and then show the popup? Or do you want to detect when a user is trying to connect a block, and then show the popup?
If you're looking for the former, it's probably easier to not use the connection checking system hehe. I'd recommend that instead you use an
event listener that checks for the
move event. The process would basically look like this:
1) The "bad" block will connect to your input
2) This will fire a move event.
3) Your listener will then look at the connected blocks, and see if they're compatible (using your own system to track compatibility).
4) If they're not, you can disconnect them using connection.
disconnect for the relevant connection, and display your popup.
If you're looking for the latter, I'm not sure if that's possible with the current version of Blockly :/ The main issue will be detecting when the user is trying to connect a block to the bad input. You might be able to fork Blockly and add some logic to the
BlockDragger (or one of the related classes) but I'm really not sure :/
But then again, it might not be worth the hassle hehe. Personally I think that not allowing bad blocks to connect is really intuitive and useful to the user! And it makes sure that their code is never in a broken state (even momentarily =)
I hope that helps! If there's anything else you're curious about please reply =)
--Beka