Docmods problem

Archives Forums/BlitzMax Bug Reports/Docmods problem

Jake L.(Posted 2008) [#1]
Hi,

Docmods does not work correct when two functions from different types share the same name:



I had a look into the docmods source but feel unable to find a fix for this (I'm not that familiar with parser stuff). Don't know if this matters, but I got this problem with two types located in two different include-files of my module.

A fix for this would be very nice...

Best regards
Jake


Jake L.(Posted 2008) [#2]
Any update on this topic?


Damien Sturdy(Posted 2008) [#3]
We are experiencing this too. No word, no fix, no help. I find the source impossible to follow- a fix would be really easy if the code was easier to read.

Strange how this stuff doesn't get a response when so many people complain about the docs.


Jake L.(Posted 2008) [#4]
The code is a mess. I guess that's why a fix isn't that easy.


Brucey(Posted 2008) [#5]
It's not that bad... you just have to know what you are looking for ;-)

What exactly are we wanting then?
You click on the link to the function, and it takes you to the correct one? I suppose that's fair.
I'm guessing the trick will be into inject a new anchor which is a tad more specific, kind of like "mod_type_func", or "mod_func" for example.

....


Brucey(Posted 2008) [#6]
Sorry for the delay... see if this works for you : docmods_linkfix.zip (source).

Build as non-gui in release mode if you want to replace the default one (in the bin folder).
Or, you can simply run it from the IDE - just to see what it does.


This is "docmods", the one for non BRL modules, so it will work on all the 3rd-party stuff, like my modules.

Lemme know how you get on with it :-)


Damien Sturdy(Posted 2008) [#7]
Oh, cheers.

yes I am unfamiliar with the code but the undescriptive vars really don't help. Also, I found jumping around source files so much a bit disorientating too- That's common with all Max stuff it seems.

Yes, I just want to inject the current type into the links- I shal try that when I get back to my coding machine. Thanks for taking a look Brucey.


SebHoll(Posted 2008) [#8]
It's not that bad... you just have to know what you are looking for ;-)

I had a look at the source and felt like crying!!!

Sorry for the delay... see if this works for you : docmods_linkfix.zip (source).

Brucey comes to the rescue... ;-) How do you do it???


However, now that you've proved your talents for doc parsing engines (hee-hee, you can tell what's coming next, can't you) I have another request if you can't find anything better to do, but it concerns makedocs - the parser for the official modules.

Basically, it doesn't currently write the ModuleInfo to bottom of the HTML files for the official docs (like docmods does). The makedocs source code looks far cleaner, and I don't want to mess it up with my limited understandings of the workings, so would you be able to look into getting ModuleInfo into the official docs too?

It's really useful checking the module version and changelog from the docs, especially for MaxGUI when there are so many versions flying around. I was going to ask Mark, but I'm assuming he's really busy with Max3D at the mo... ;-)

Thanks


Brucey(Posted 2008) [#9]
Okay... give this one a try : makedocs_modinfo.zip (source).

As before, build as non-gui in release mode if you want to replace the default one (in the bin folder).
Or, you can run it from the IDE - just to see what it does.

I've looked over a few of the modules, and it appears to be working as expected, but if you can have a look for yourself...


As for how... it usually takes me about half an hour to get my head around the code... then I have this picture in my head of what's going on, and it's fairly easy from then on to tweak things to suit :-p
I know... I need to get out more ;-)


Damien Sturdy(Posted 2008) [#10]
Awesome fixes- these should become official!


SebHoll(Posted 2008) [#11]
Okay... give this one a try : makedocs_modinfo.zip (source).

Fantastic! Three small niggles, though...

1) In fredborg.bmx, can we change the Emit line to:

Emit "<tr><th width=1%>"+key+"</th><td class=docright>"+val+"</td></tr>"
Notice, how the first column now uses <th> instead of <td> - it just makes them look more like headings like the old docmods.

2) For some reason, when you build docs, the front page also gets a Module Info section at the bottom (I think it's from BRL.AppStub). This maybe why Mark didn't add it himself - can we code something in so that it doesn't add this to homepage?

3) ModuleInfos at the top is great - I like the idea of a link. Can we change it to Module Info, though, so that it reads better?

Far better than it was before! Thanks!

Oh, and I noticed that sometimes some of the module titles in the header span over two lines (which looks a bit untidy as all the rest are on one line):



And if I was being really picky, then it would be nice if it didn't add a colon to titles the no links following them (like on the Language/Licenses pages)...



Is there anyway to fix these too? I know they are really picky, but it's the small things that improve the general appearance... ;-)


Brucey(Posted 2008) [#12]
1) I changed it *from* th, just to match the rest of the output :-p

2) Does it? I must have missed that. It's probably the way the nodes are built. I'll see what I can do.

3) Maybe :-p I left it as it is since it filled that bit in on its own - ie. no coding required.


As for the wrapped lines, I suppose we can have a nowrap added in there somewhere.


SebHoll(Posted 2008) [#13]
1) I changed it *from* th, just to match the rest of the output :-p

Ah well, I like either way, it's just I was used to the old bold title text from the docmods days.

As for the wrapped lines, I suppose we can have a nowrap added in there somewhere.

Does it? I must have missed that. It's probably the way the nodes are built. I'll see what I can do.

Cool!

Maybe :-p I left it as it is since it filled that bit in on its own - ie. no coding required.

Ah, I see. I love it when code sorts itself out where you don't expect. ;-) If it's too much bother, then it doesn't matter.


Jake L.(Posted 2008) [#14]
Brucey,

thank you very much for fixing this, BRL should pay you for doing their work! Seems like it was easy to fix (for you - should be so for the author of docmods, too).

This bug report was 3 months old and no single official word about this. I don't demand answers like "Will fix this asap!", but why can't they answer a simple "Thanks, we've noted it and it's on our ToDo list now" ? Just some words to reduce the feel of beeing ignored. That really would be great.


Damien Sturdy(Posted 2008) [#15]
Yeah, it took 3 months and me nudging it to get a reply from the community too. The legendary Brucey finally helped hehe. Ta Brucey!


Muttley(Posted 2008) [#16]
Just found this. You're a life saver Brucey! :D

Thanks

Muttley