• 0

    posted a message on Postman - Building a better mailbox
    Quote from StormFX »

    You could branch it, if you were bored/interested. Otherwise, we'll just see what happens when/if he comes back.
    I'm pretty happy with the work that Speeddymon and Charon have been doing. The plain truth is I just don't have time to work on this. Between a hellacious weekly commute (I live 3 hours from my job) and having been planning for and executing my own wedding for the past half a year, I've not even had enough time to actually play the game as much as I'd like this year. With everything going on, it has been very very hard to follow through on maintaining this.

    Though there are still several features I'd like to see implemented, they've been hitting the most notable things that other users have wanted, and for that I applaud them. I don't see a need to branch, and even if I did I think you'd have good enough reason to just ignore me for my absenteeism all this time. :)

    Keep up the good work, guys.
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from Fin »

    Quote from Eric S »

    Also, MailTo may have this, but I've never found it, a way to find out what tracked email is currently in transit, and how long it has until delivery, as I'll often play one character until something arrives, and it would be nice to be able to check how long till the item arrives, if I can't remember what the mod said when I logged in.


    Seconded! This was one of the features I used most in MailTo (although there were a lot of awesome bits. :)

    "/pm track" (or /pman or /postman)

    The other timer feature of MailTo, noting when mail expires, is not yet implemented.
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from Icedog »

    postman still being worked on?
    Yes, but at the moment I am a bit busy with a major project at work, and enjoying the expansion when I'm not working. I'll be getting back to it, though.
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from LaoTseu »

    I just read the patch notes, there is a new API for the mailbox:
    link = GetInboxItemLink(index)
    I wonder if this will be useful to you guys.
    Yah, it will be, already added it to the Wiki page. I was really happen to see both that function and the new GetCursorInfo() API added, it makes something else I was trying to do far simpler.
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from grennon »

    Quote from tale »

    TakeInboxItem() is not an atomic operation, but an asynchronous request to the server to take the item. It appears that the server will ignore other TakeInboxItem requests if one is already being processed. T


    This is why postallibs' takeinboxitem wrapper register unit_update_inventory and then fires off a custom event that a submodule can listen for to trigger off before proceeding. Its not atomic but you can wrap it with an atomic function at the cost of speed.
    Sounds like a really good idea, especially for updating variables and other non-destructive operations. I still would feel a bit wary about using this to trigger the deletion. Maybe there'd be no problem with it, but now I'm really gun shy after causing several people to lose valuable items. I'd be worried that using the event mechanism could result in the accidental deletion of the wrong message, depending on what order various events came in. I feel a bit better with just making a check immediately before trying to delete that there is no item or money.

    Still, could be a good sort of thing to use for the reporting whether the item was actually taken. Right now Postman will say (as MailTo did) that the message was taken even in cases when it really wasn't.
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from Nill »

    However, the wikipage doesnt say the item will be lost if the request fails, I guess this is more like what we experience with lag: The mail still sits in the mailbox and you can recive the items afterwards if the takeinboxitem request fails?

    Right, the problem was with the logic in my code that basically went like this:

    if there is money
     take the money
    
    if there is an item but there was no money (because taking the item won't work if you just took money, another API oddity)
     take the item
    
    if there is no message body
     delete the message


    The problem arose because "take the item" failed yet the code went on to delete the message anyway. It's also possible that it could have tried and failed to take money and then deleted the item. (I don't know if taking money can fail, but the possibility of it is now protected against.) There was also one other bug in the code above, resulting from its evolution of trying to take both money and an item at once; it could have taken the money but not even tried to take the item, and then deleted it. This wouldn't happen with AH mail, but could happen if someone sent money+item. Now the last part is like this:

    if there is no message body
      ask the server again whether there is an item or money on the message
      if there is now no item and there is no money
       delete the message


    There is a very slim chance that this will fail to delete a message from which the item has been taken successfully, but this is far better than the accidental deletions. Just right click the now itemless message again and it will be deleted.
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from Nill »

    Same thing happened to me today using r24043... sigh, Savory delight recipe won for 29 gold gone, and 4 mails of 81 silver for sold copperbars... I almost cried. I even contacted GM's to get the stuff back, but nope.. :(

    29gold at level 26 was 1/3 of my whole treasure... Bag was not full, nearly empty rather. And there was no lag... I guess its time to do some farming, and if anyone here is on Alonsus and wanne sell me that recipe... :)

    EDIT/ADD: I did a reload of UI and a restart of game and neather the item or money was in my bags nor mailbox... FYI
    Sorry, Nill. :(

    I have one other theory about how come TakeInboxItem() can fail, which I've documented in the WoWWiki TakeInboxItem() API Page. TakeInboxItem() is not an atomic operation, but an asynchronous request to the server to take the item. It appears that the server will ignore other TakeInboxItem requests if one is already being processed. This would be exacerbated by lag, but would seemingly also happen just with very quick clicking. Does this explanation possibly fit? Were you quickly retrieving several items in succession and the first one was received successfully but then the others were lost?
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from KaptK »

    I also suffered losing an item that i had just bought from the AH yesterday using the latest version of Postman from the /files dir.

    I also can't help you with debug info but my bags were not full so not sure what happened. Server was suffering a lot of lootlag yesterday so not sure that could have also been a problem.

    Keep up the good work!!


    Wow, you guys are suprisingly upbeat. I'm really sorry code I wrote caused your item to be lost. If I'd seen anything like it in testing, where I just mailed around a lot of cheap Refreshing Spring Water to make sure things were working, I would have certainly never released the code. I was cursedly blessed by no lag and by having available inventory space.

    Anyway, I'm confident that this problem has been solved in 2.0.24188. I tested this by \trying to remove multiple items in rapid succession; sometimes I'd get a message saying that an item was taken when it really wasn't (indicating that TakeInboxItem() had been called, but failed) but at least the message was not deleted after that. Please let me know immediately if you encounter any more difficulty.

    I feel like I can't apologize enough. I'm sorry.
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from StormFX »

    Any possibility of the following?
    - MailFu functionality (/drool - but use the default WoW mail icons >.<)
    - Ability to toggle sounds (those bells are darn annoying).
    For the first item. I'm not sure. Maybe, but it isn't high on my priority list. I can see how it would be nice though.

    For the second, yeah, I should probably add that as an option. I'll put it on the list.
    Posted in: General AddOns
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from Bsix »

    Warning Warning - Major Bug. I think there is a bug in the code somewhere regarding right clicking from the mailbox. I right clicked on the items in the mailbox that I had just won from the AH and get the message "Postman:Received Large Brilliant Shard from Auction House". The message is gone, but no item is in inventory. It looks like the item was deleted along with message! I'm so used to mailto that I was just right clicking away and not paying attention. So I lost 4 brilliant shards and three essences of air.
    Oh no, that's terrible, and I am so, so sorry you had this problem. Honestly I'm shocked you have lost many gold worth of materials and would still say "this is a great mod".

    I'm not 100% of what circumstances that would lead to this, but I do have one question: was your inventory full at the time? I'm guessing that GetInboxItem() failed, which is a possibility I should have foreseen but unfortunately documentation for the API is spotty. :( A full inventory would be one reason for a failure, as well as if you already had the maximum number of the item you're allowed to have (eg, unique items). I'm not sure if there are other reasons for failure.

    I have just committed a new version which guards against deletion by doublechecking that the message really has no item or money in it before calling the message deletion function.

    Again, I am so sorry. I feel terrible that you lost items because of my mod.
    Posted in: General AddOns
  • 0

    posted a message on AceDB and indexed table ordering
    Quote from Grayhoof »

    I'm sure this is not the only place this is documented, but this page spells it out pretty well:

    http://www.lua.org/pil/19.3.html

    Thanks! I've also just now completed updating the Tables, TableLibrary and For pages at the lua-users.org library to make it clear there too.
    Posted in: Libraries
  • 0

    posted a message on AceDB and indexed table ordering
    Quote from Rabbit »

    no part of the documentation suggests that this is not always the case with pairs()


    It does.
    Thanks so much for challenging this, when I already came here humbly admiting my faults. I knew I should have clarified that more.

    No part of the documentation which mentions pairs() or ipairs() at:
    http://lua-users.org/wiki/TablesTutorial
    http://lua-users.org/wiki/TableLibraryTutorial
    http://lua-users.org/wiki/ForTutorial
    http://www.lua.org/manual/5.1/manual.html
    says anything about ordering issues.

    HOWEVER, you are right in that in the manual, the next() function, which pairs() points to for caveats about modifying the table during its traversal. I didn't chase down that reference the first time because I wasn't modifying the table during traversal so the note, to the typical reader, wouldn't seem to apply. So still, the warning about ordering issues does not appear with pairs() itself.

    So allow me to restate: "The documentation regarding pairs() and ipairs(), including the LUA wiki where many programmers new to LUA are most likely to learn about specific aspects of the language work in practice, is unfortunately very weak in noting that pairs() does not iterate through the keys of an indexed table in order."

    Do you disagree with this remark? Ah well, not sure if it matters to me whether you agree or not. At least I'll take some action to edit the LUA-users wiki to attempt to make this more clear for others.

    Thank you for your help. Must be rewarding.


    Posted in: Libraries
  • 0

    posted a message on AceDB and indexed table ordering
    Ever go to bed thinking about a programming problem like this then wake up and think, "Gee, I wonder if it is as easy as..."

    I woke up thinking about ipairs() instead of pairs().

    Just tested it, at least for case #1. Works now.

    Boy do I feel stupid.

    The weird part for me is that in my past experience, as well as in the documentation at lua.org and lua-users.org, pairs() has returned the indexed part of a table in order; no part of the documentation suggests that this is not always the case with pairs(). Guess this isn't guaranteed, and maybe it has nothing to do with metatables. I could understand that. Anyway, fixed now. Tempting to erase this beacon of my stupidity, but maybe my stumbling will help someone else who encounters the same sort of problem.
    Posted in: Libraries
  • 0

    posted a message on Postman - Building a better mailbox
    Quote from sl8r88 »

    Couple more thoughts...

    1. CT_MailMod filled out the subject line when you sent only gold. Can we get this? Just noticed it today transferring gold to an alt.


    Maybe. I thought about it but wasn't sold on the idea, but I'll reconsider.


    2. When mass mailing tab is implemented, is it possible to make it a module instead of a core feature? With alt-lclick autosend option, I doubt I'll ever use the mass mail tab; in fact, it's actually one extra click to use and seemingly a little slower to me.


    Yes. My next step (after the code I plan on committing soon) will be to modularize Postman, before adding any more features.


    3. [Bug] When retrieving a message that only has gold attached via right click, it's not deleted. Right clicking again doesn't delete it either. The only way is to open the mail and click delete.


    I can reproduce this, and it happens for reasons that I don't quite know the cause of, just the symptoms. For some reason, taking money seems to need some sort of delay before a message can be deleted. So it'll need two clicks, which is working in the code I'm testing now before committing. (I also discovered you can't take money right immediately after taking an item, and so changed the order to take money before the item and hoping it'll take both in one click. Also discovered that it would just take COD stuff without confirmation, which is seriously bad news and subject to abuse, so this new code also has confirmation for CODs.)

    I just found one other bug while waiting for mail to arrive to test the money+item thing some more: tracking is borked, because the table I am storing through AceDB can't be used as a queue the way I am using it. I don't quite understand how come the indexed table does not stay in index order the way it normally would in LUA, so have posted to th library forum asking about this.
    Posted in: General AddOns
  • 0

    posted a message on AceDB and indexed table ordering
    I'm having a bit of a problem that I really hope doesn't need to be solved by using temporary tables. Basically, I want an indexed table saved via AceDB to be accessible in the order of its indices. In "normal" LUA this would be pretty straightforward, its just what pairs() does. But it isn't quite happening with AceDB, and I'm wondering if that is because of the use of metatables. I confess to a bit of ignorance on just how metatables work.

    Here are two examples of the problem:
    1) After adding items to the indexed table via foo.db.char, I then table.sort(foo.db.realm), and the indices are correct for the lexical ordering of the values: 1 points to the alphabetical first item, 2 points to the second, etc. However, iterating through the table with pairs() prints the items in a non-obvious order. First it might print key 5 and its value, then key 2 and its value, then key 1 and its value, then key 4 and then key 3.

    2) After appending an item to the end of an indexed table with table.insert(foo.db.char), it exhibits this same problem as the first: pairs does not go through the table "in order" -- the order in which items were placed in the table -- but rather some unclear order. This breaks the logic of my code which is using the table as a queue.

    Any way around this *without* building up temporary tables? Is this happening because of metatables or some other thing? Is it possibly something that can be fixed in AceDB itself?

    Thank you in advance for any insight.
    Posted in: Libraries
  • To post a comment, please or register a new account.