• 0

    posted a message on RawHook on a secure function
    I'd like to capture shift-clicks on items in my bags while at the auction house. It looks like the way to do this is to hook one of the following two functions:

    ContainerFrameItemButton_OnModifiedClick
    ChatEdit_InsertLink

    Since I'd like to override the default behavior of these functions on shift-click (i.e., splitting stacks), I need to do a raw hook, not a secure hook. However, these appear to be protected functions; AceHook complains when I try to use RawHook on them.

    How do I know whether it's okay to override AceHook's check and RawHook them anyway? It seems like this is only a problem if the UI is going to call a protected function from the same execution path, which seems pretty unlikely with these functions. Do you folks agree?

    Also, if I RawHook one of these functions and then Unhook it later, will that restore the secure execution path, or will it still be tainted? I only need this hook while at the auction house, so I could potentially unhook it when leaving the AH. Would that help?

    Thanks!
    Posted in: Lua Code Discussion
  • 0

    posted a message on WowAce localization and plural nouns
    Quote from jerry
    Actually, you don't need to follow the order.

    Wow use an extension to basic lua, which allows to reorder the parameters.

    Something like "%2$d / %1$s" for instance. Check a GlobalStrings.lua in a non enUS locale to verify the exact syntax.


    Brilliant. Thanks! :)
    Posted in: General Chat
  • 0

    posted a message on WowAce localization and plural nouns
    Thanks for the suggestions, everyone.

    It seems like string.format might be a little inconvenient because it forces the translator to use the %d / %s escape sequences in the same order as the English text. Does this cause problems for translators, or does it tend to work out alright in practice?
    Posted in: General Chat
  • 0

    posted a message on WowAce localization and plural nouns
    I'm converting my addon, AuctionLite, to use AceLocale so that it can be localized. I have a few cases where I want to print a message that involves a noun that may or may not be plural. For example:

    "Created 1 auction of Crystallized Fire."
    "Created 5 auctions of Crystallized Fire."

    I think the best way to handle this case is to use a function in the localization tables. For example:

    L["Created X auctions of Crystallized Fire."] = function(auctions)
      if auctions == 1 then
        return "Created 1 auction of Crystallized Fire."
      else
        return "Created " .. auctions .. " auctions of Crystallized Fire."
      end
    end


    This seems to work just fine, and it will allow translators to adjust the plural noun in a way that is appropriate for their language.

    The only problem is that the WowAce localization gadget on WowAce.com doesn't seem to support functions in the translations, which means that translators can't supply functions for these strings online.

    Is there a better way to handle this case? If not, perhaps WowAce could update the online localization gadget to allow functions?

    Thanks!
    Posted in: General Chat
  • 0

    posted a message on Repositories and Tagging.
    Quote from stencil
    So, one of my projects isn't getting pushed to curse. I tagged it Release and the packager created a release version (http://www.wowace.com/projects/pokedex/files/), but there's nothing on curse.


    I'm seeing a similar problem. I created a release version of AuctionLite v0.4 (http://www.wowace.com/projects/auctionlite/) about 16 hours ago. Curse still hasn't picked it up, though it did update the "Project Updated" timestamp.

    Is there anything I can do to get the release version pushed to Curse properly?

    Thanks!
    Posted in: General Chat
  • 0

    posted a message on Publishing an Addon / Version Numbers
    I've just recently claimed an old addon (AlwaysLFG) and updated it for WoW 3.0.2. On curse.com, the "last updated" time on the addon is correct, but the latest version of the addon is not actually available for download. (Everything shows up correctly on wowace.com.)

    Is there something special I need to do in order to publish my addon correctly, or do I just need to wait a bit longer for curse.com to sync up?

    Also, what's the recommended way to assign version numbers to an addon? Should I use the Version or X-Build fields in the .toc, or both? Should I use the "$Revision: ...$" feature of Subversion?

    Thanks!
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.