Minimap Button Frame Redux

Minimap Button Frame Redux

7.9k Downloads

Issue adding minimap button

maqjav opened this issue · 4 comments

commented

Hello!
I'm the developer of the addon RareScanner, and another user made me the question: "How can I add your minimap button to
Minimap Button Frame Redux", so I tried to follow your tutorial in the description of CurseForge, and I couldn't achieve it, so I checked your code and this is what I found:

  1. There is an error parsing the input if you don't use english, for example:
    In english:
    /MBF ADD LibDBIcon10_RareScannerMinimapIcon
    In spanish:
    /MBF añadir LibDBIcon10_RareScannerMinimapIcon
    It doesn't seem to like the letter "ñ", so in your function ChatCommand this doesn't work as intended:
    #855. local startPos, endPos, firstWord, restOfString = strfind(input, "(%w+)[%s%p]*(.*)");
    #856. firstWord = strlower(firstWord)
    firstWord takes the value "a", instead of "añadir", so the command doesn't do anything at all.
    restOfString takes the value "ñadir LibDBIcon10_RareScannerMinimapIcon
    I imagine that you will have the exact same problem with russian, chinesse and other localizations where they have their own letters as spanish (suggestion: don't traslate the commands).

  2. Once I figured that out, I tried to modify the code and check if I could add my button, however the method isValidAdd doesn't seem to like my button. I saw that you match the frames name with a table of values, and like my addon isn't in that list it doesn't return it as a valid candidate. Am I missing something?

Cheers.

commented

This was not something I've worked on since I began working on this addon. (I'm not the original author). I'm not very familiar with any part of the localization nor the command parsing so it will take me some time to figure out what's going wrong here.

As I don't have the ability to test, does the command still work if you were to type it in english? Also, that description is from the original author as well, I've personally found it far easier to just hover over the button I want it to grab and type /mbf add while remaining hovered over it. If you can get the function working in the mean time, that's how I'd recommend adding any given button that wasn't automatically grabbed.

commented

I just pushed a 1.2.0-beta on curse which has this commit e50123b which I THINK should solve your issue with it only taking a-z and A-Z for letters.

Let me know if that version works.

commented

I believe 1.2.0-beta fixes this issue.
I have not received a reply on this issue to confirm.

I'm closing this, please open a new issue if this still occurs.

commented

Hello.
Sorry I didn't answer before.
As soon as I have time I will test it, in the meantime close it and if there is something else I will reopen it.
Thanks for your time.
Cheers.