Issue
Currently there is no communication or broken communication between the harbors of the inner widgets of the molecules.
Explaination
Scenario right now:
1. molecule clock was never being started. (fixed it)
2. when the molecule harbor is fired, it has no ship to send.
Consider a molecule widget which has a single button in it. While creating such a molecule assume we have added an harbor which will trigger when the button is clicked. Now suppose we use this molecule widget in a sample fluency application and connect the molecule widget with some other widget.
Now when you click the button , the event generated will berth the ships in its "Input" harbor of the button widget and not in the Molecule widget harbor (this is the one that we use). Now this harbor is different from the , harbor of the molecule which is exposed while creating the connection.
Now we have to berth the ship from the "Input" harbor of the Button widget to the , harbor of the molecule (which we created while making the molecule).
The Molecule uses the same Clock as used by the Widget. I feel the molecule should use a different clock or different harbor , as it has now to perform additional activity of berthing the ship from the internal widget harbor to the molecule widget harbor.
I feel this should solve the problem , but not sure. But logically speaking we should have such behavior with the Molecule Widget.
Most part of the Molecule code is copy-paste of Widget code. That confuses more also debugging is really difficult as these are threads and they get called in intervals. Many a times eclipse crashes while debugging. Thats the reason I have used System.out.println. I did not use log4j , because I thought there is no uses logging these debug messages. because i will remove them.
thus this explains what the problem is with molecules.
Regarding making the inner molecule clock a observer of the main clock, thats a good idea. I never though that way. Thanks.
Solution
1. Look whether the molecule clock is working.
2. Check out how to pass the Ship from inner widget harbor to the Harbor of Molecule.