Resetting ERD2WModel

Mark Jackson <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Dear Wonderites,

Our App. is quite rule-based, and we are adding new ones all the  
time. It would greatly reduce the turn-around time for development if  
we could reset the ERD2WModel during development, so we don't have to  
re-start the App every time we edit rules (using the great  
RuleModeler, btw!).

So, I created a simple component, which appears on all pages in  
development, and which simply calls 'ERD2WModel.erDefaultModel 
().resetModel()' when clicked, which I thought should do the trick.

This only partially works, as I found out when testing it. Simple  
rules, e.g. *true* => testRule = "Hello World", will work if the rhs  
is changed. More complex rules, e.g. (task='edit') and  
(entity.name='DummyEntity') => componentName = 'EditDummyEntity' don't.

I noticed, on browsing the ERD2WModel code for 'resetModel', that the  
calls to 'invalidateCaches()' and 'resetRules()' are commented out,  
so I think that (but not 100% sure) although the new rule files are  
correctly re-loaded, there are rules still in the cache which get  
fired instead of the new ones. Is there a reason for this, or am I  
barking up the wrong tree?

Any help appreciated.

Regards,

:tecc
Simon,Jackson GbR

Mark C. Jackson BSc. Pg. Dipl.
Telephone: +49 228 3388448-4
Fax: +49 228 3388448-9
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.