-
Yup, that fixed it.
I changed my definition to:
Code:
<template name="list_text" merge="join">
<windowlist>
<child mergerule="resetandadd"></child>
<child><backcolor>1A40301E</backcolor></child>
<allowcreate />
<allowdelete />
<script file="common/scripts/list_text.lua" />
</windowlist>
</template>
And added the "onSortCompare" from above to the newly copied "list_text.lua" file I grabbed from CoreRPG.
I assume that was my only choice? Anyone have any better suggestions for me than copying code whole cloth like that?
-
EDIT:
Turns out - I could ignore what I did above.
ie: delete the copied text_list.lua from CoreRPG.
Remove the entry for templates_list.xml in extension.xml in my extension (and delete the xml file)
because this in the record_char_more.xml file handles it for each control I wanted that functionality on:
Code:
<!-- Customize sorting for the Attributes list -->
<list_text name="cliroller1" merge="join">
<script file="utility/scripts/sort_methods/sort_on_alt_sort_order.lua" />
</list_text>
oops - I guess I left some orphaned stuff in git and forgot.
===> So the TAKEAWAY I should learn here, correct if wrong:
If I added the <script> to a redefined (with merge="join") template of same name "list_text" only the <script> in MY override goes into effect. BUT if I merely do an override of an named INSTANCE of that template (e.g. <list_text name="cliroller1" merge="join">) - I am able to ADD more "code" to the template's ummm... "code space?"
??
-
Yes... if i understood you correctly - that is correct.