My Github Repository

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

Re: My Github Repository

Post by Vadi » Sun Apr 01, 2012 4:53 am

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: 4721
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi » Thu May 17, 2012 11:36 pm

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: 4721
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi » Thu May 17, 2012 11:45 pm

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 » Fri May 18, 2012 2:09 am

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: 4721
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi » Fri May 18, 2012 3:39 am

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: 4721
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi » Fri May 18, 2012 5:30 am

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 » Fri May 18, 2012 12:07 pm

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 » Sat May 19, 2012 3:07 pm

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: 4721
Joined: Sat Mar 14, 2009 3:13 pm

Re: My Github Repository

Post by Vadi » Sat May 19, 2012 11:00 pm

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: 84
Joined: Fri Feb 19, 2010 2:42 am

Re: My Github Repository

Post by Daagar » Sun May 20, 2012 1:45 pm

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

Who is online

Users browsing this forum: No registered users and 5 guests