Closed achmed13 closed 1 year ago
I don't think so.
Can you please share a MapBasic code so I can try to debug?
Here is a simple script, zipped. The extension is .mb, and the syntax is similar to VB. The apostrophe is the comment character.
Thanks for taking a look.
I believe I have found the problem. In mapper_generic.js it is creating the "members" array, but it never sorts it. I added a sort on line 58 (before members.forEach) and it seems to be sorting fine now. It does not obey the extension preference Codemap: Sorting Enabled, but for my purposes I always sort alphabetically anyhow.
Thanks for the great extension!
The actual problem was caused by the very root level not being sorted. Unfortunately the approach you have proposed conflicts with the nested items and only works for the flat trees like in your sample.
The problem is fixed now (directly). The fix will be available in the very next release.
I have set up a custom mapper for MapBasic (syntax similar to VBScript) as follows:
It is correctly listing my Functions and Subs, but they are sorted by position and not by name. I have enabled Codemap: Sorting Enabled in the settings, as reflected in the above snippet from settings.json.
Do I need to do something else to enable alphabetical sorting?
Thanks!