Adding a module

BlitzMax Forums/BlitzMax Programming/Adding a module

Czar Flavius(Posted 2008) [#1]
I have downloaded a module (muttley.mod/inifilehandler.mod) but can't add it. I've tried bmk makemod(s) -r muttley.inifilehandler but it doesn't do anything, not even an error message, just a blank line.

Normally this wouldn't bother me but I'm using Blide unfortunately which completely changes itself every other update (PLEASE STOP THIS) and I can't import modules that aren't in the list but I can find no way to add a module to the list.

This is holding me back and made me hit a small child.


Brucey(Posted 2008) [#2]
When nothing happens, it usually means that either it's in the wrong place, or there's a typo, or the module file, inifilehandler.bmx isn't there, or the file inifilehandler.bmx is setup wrong... or you have a letter-case problem somewhere.

Once you've checked all those, it should work.... probably ;-)


Czar Flavius(Posted 2008) [#3]
It's in the mod folder, all the files are there..


Ked(Posted 2008) [#4]
If you just type "bmk makemods muttley.inifilehandler" then it will create a Debug module and a Release module all at once. No need for the -r.


Czar Flavius(Posted 2008) [#5]
Yay that worked! Stupid tutorial.


ziggy(Posted 2008) [#6]
@Czar Flavius: Just in case that happens to you again. that 'list' of modules is based on the BLIde modules data-base (also called modules cache). If you change the modules structure, you may tell BLIde so it can reflect the changes (so any newly installed module appears on every list and on the intellisense). To do so, you can run blide updating modules, from the start menu. This has not been changed on any BLIde version since 2005 (version 0.5.25 introduced the modules cache on BLIde). Obviously, as some users doesn't care about mantaining sync between BLIde and the Max mods, BLIde automatically update its module cache after a number of restarts. That's what surely has solved your problem using BLIde.


Muttley(Posted 2008) [#7]
@Czar Flavius: Glad you got it working. You shouldn't have needed to compile it unless you're on MacOSX or Linux.

With BLIde you do need to remember to refresh the Module Cache if you add a new module, but it's a small price to pay for the time you will save having a decent editor. :)

Let me know if you run into any problems with the module. I know the examples are a little... sparse. ;)

Muttley


Czar Flavius(Posted 2008) [#8]
Hi, I think it's working but I can't get the documentation to add, or even know how to do this properly.


Muttley(Posted 2008) [#9]
Hmm, it seems the docmods is not documenting the module any more (it used to work). I'll try and have a look at why that may be.

In the meantime, have a look at the INIFileHandler-Example.bmx file in the inifilehandler.mod/doc folder. Should get you started at least.


ziggy(Posted 2008) [#10]
@Muttley: Latest docmods version requiered a bbdoc: before the MODULE sentence:

rem
bbdoc:This is my module
end rem
Module modserver.modname

The module keyword is optional for modules that doesn't provide documentation.


Muttley(Posted 2008) [#11]
@ziggy: Cheers, I gave that a try and it now shows up in the Third party modules list, but it doesn't show any of the types or methods. :?


ziggy(Posted 2008) [#12]
bbdoc stops working when it finds an error. Be sure everything is properly documented. As instance, a type without bbdoc won't show any of its methods or functions, and the like... If the Max docmods utility could provide compilation errors...


Muttley(Posted 2008) [#13]
Cheers ziggy, I'll give that a go.


Muttley(Posted 2008) [#14]
I think I've sussed it. Looks like the document keywords are case sensitive now.

I was using BBDoc, Returns, etc. Changing them to bbdoc and returns makes everything magically appear.

I'll get started on fixing all my documentation then. ;)


Muttley(Posted 2008) [#15]
@Czar Flavius: Documentation is now fixed. You can grab the latest code via Subversion from the link in my .sig