I am new in overriding Magento code.
I function _loadNodes i just want to change the sort order which works when changing the core file, but as this is not the correct approach i want to override the class/function.
I currently have as config.xml
<config>
<modules>
<MyModule_Catalog>
<version>0.1.0</version>
</MyModule_Catalog>
</modules>
<global>
<models>
<catalog>
<rewrite>
<resource_category_flat>MyModule_Catalog_Model_Resource_Category_Flat</resource_category_flat>
</rewrite>
</catalog>
</models>
</global>
</config>
Flat.php
class MyModule_Catalog_Model_Catalog_Resource_Category_Flat extends Mage_Index_Model_Resource_Abstract
{
Xml file in etc\modules
<config>
<modules>
<MyModule_Catalog>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Catalog />
</depends>
</MyModule_Catalog>
</modules>
</config>
it doesn't run the new code, it doesn't override