My Github Repository

All and any discussion and development of the Mudlet Mapper.
User avatar
Vadi
Posts: 5041
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi »

Started with this @ https://github.com/vadi2/remember-mapper

I wonder if Qt signals support collecting return statuses, that way a single 'save' signal could grab the data needed to save. Otherwise, have to link everything to the host.

User avatar
Vadi
Posts: 5041
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi »

Module setting funcs got merged into sf so I'm documenting them on the wiki now, noticed this:

Code: Select all

    if (mpHost->mModulePriorities.contains(moduleName))
        mpHost->mModulePriorities[moduleName] = modulePriority;
    else{
        lua_pushstring(L, "setModulePriority: Module doesn't exist");
        lua_error(L);
        return 1;
    }
It should not error out, should return nil and the error msg instead per Lua convention. Makes it more pleasant to work with - because getting a module name wrong is not a usage contract error.

User avatar
Vadi
Posts: 5041
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi »

Having listModules() couldn't hurt as well.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: My Github Repository

Post by chris »

To me getting a module name wrong is a usage contract error, that module can be a needed dependency of something it is being prioritized over.

A module list is trivial to add, but I don't think really needed with the UI.

User avatar
Vadi
Posts: 5041
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi »

No, the contract is the proper use of the API - you pass a string and a number. But getting it right whenever a module is installed or not at runtime isn't doing the contract wrong, that's too harsh... other functions in Mudlet don't crash either (or shouldn't) when you give it something at runtime that doesn't exist.

User avatar
Vadi
Posts: 5041
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi »

Doing this seems to cause an error:
Code: [show] | [select all] lua
addMapEvent("room a", "onFavorite")
local s,m = pcall(getMapEvents) if not s then display(m) end --> 'attempt to index a string value'
Same deal with getMapMenus().

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: My Github Repository

Post by chris »

Oh that's the result of having a variable number of arguments for events now. I need to adjust the calls in the lua stack to reflect that. Good catch.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: My Github Repository

Post by chris »

That error is fixed now Vadi. I also put in custom options with respect to the mapper controls. You can now choose to pan by default, and what keys will enable enhanced mapper functionality. For the time being, the selections are just shift/alt/control but it can be opened up in the future when the bugs are worked out.

User avatar
Vadi
Posts: 5041
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi »

Alright. Could you sync the Qt 4.8 glu include fix from main? Qt 4.8 no longer embeds it and it needs to be included and linked to explicitly.
glwidget.cpp:29:24: fatal error: gl/GLU.h: No such file or directory

Daagar
Posts: 89
Joined: Fri Feb 19, 2010 2:42 am

Re: My Github Repository

Post by Daagar »

Does this mean main (and probably soon, chris' fork) should be built using Qt 4.8? I still compile on Windows, and main still seems to function fine with Qt 4.7.3. Curious what impact this has, as getting a windows compile going was such a pain for a long time and I prefer to not tinker with it too much if possible :)

Post Reply