Fernando Padilla wrote:
The model.addModel and block.addModel was another issue that I forgot to bring up :) thank you for reminding me :) I was wondering why there are two addModels as well. One in block and one in model; especially since I had to use block.addModel to properly add Hello ( it didn't work if I added it directly to the block.containmentModel ).
There are not two models - but the problem was related to the fact that two APIs were enabled the same function but doing in in different ways. What I have done is to remove the block based manipulation so that both addition and removal goes through the model.
I like your proposal of making the MerlinRuntime be event driven off of the AvalonModel. Could this be used to add/remove blocks from a running kernel? ( so I don't have to shutdown/startup? ) :)
That's what everyone wants! Current no - and not in the short term either. Modification to a running system are not localized to a simple block - you have to take into account all of the appliances that are dependent on the block you are modifying, and all of the appliances under the block you are modifying. Then you have to do the same for every block that is impacted by the above. It's non-trivial - so for the now you need to stop the kernel, modify the model and invoke startup.
I had another idea as well. Since technically we can only ( or should
only ) change the model while the kernel is shutdown ( for now ), could we
have a flag, and have modification methods throw an exception or
something, if the kernel it not in a modifiable state?? So people don't put it in an inconsistent state, that we can't back out from.
I agree (patchs are welcome). What I have in mind is a flag the marks the model as sealed. If the model is sealed and an attempt is made to modify it then we throw an IllegalStateException.
So you got the removeModel working on my code. Is there anything that I have to change on my code ( like use the block.removeAppliance instead of the model.removeModel )? or simply cvs up the latest avalon/merlin?
Update cvs, some updates to sources (which I'll post to you directly in a tick), you'll be in business.
Stephen.
I'm going to post a followup note on this subject to [EMAIL PROTECTED]
Cheers, Steve.
Thank you!! :)
Fernando
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/ | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
