Go to Page... |
Compatibility: | Harrowstorm (5.3.5) |
Updated: | 02/28/20 12:26 AM |
Created: | 08/13/14 02:42 PM |
Monthly downloads: | 157 |
Total downloads: | 11,808 |
Favorites: | 17 |
MD5: | |
Categories: | Chat Mods, Auction House & Vendors, TradeSkill Mods, Miscellaneous, Utility Mods |
Comment Options |
DeanGrey |
View Public Profile |
Send a private message to DeanGrey |
Find More Posts by DeanGrey |
Add DeanGrey to Your Buddy List |
zeroIndex |
View Public Profile |
Send a private message to zeroIndex |
Find More Posts by zeroIndex |
Add zeroIndex to Your Buddy List |
01/20/16, 10:49 AM | ||
|
Why don't you just make the UI behave like a real calculator by adding brackets and just showing whatever you enter, pressing = will then solve it, as long as the syntax was correct. Would be much more useful that way if you could just enter stuff like (x+y)*(z-w).
Edit: You also haven't defined LAM2 used on line 146, that throws an error. You need: Lua Code:
Another thing: Lua Code:
If your function is used to fill a value, like you do here Lua Code:
you need to return something, whatever you return is what "value" is set to. So it's not pointless Edit: Oh wait, value is defined localy for the whole file, but then you can just call the funtion and really don't need the return. Lua Code:
Lua Code:
Edit: And the last thing for now Why not remove the "Button" from all buttons and only leave the number or symbol? If you don't want them to be at the top of the button you can center them by adding
Code:
font="$(BOLD_FONT)|30|soft-shadow-thin"
Last edited by coolmodi : 01/20/16 at 11:26 AM.
|
|
|
coolmodi |
View Public Profile |
Send a private message to coolmodi |
Find More Posts by coolmodi |
Add coolmodi to Your Buddy List |
01/20/16, 06:56 PM | ||||
|
I also noticed that I could probably just call something like: Lua Code:
I have no experience with XML and very little with LUA. I started this to get a feel for what can be accomplished. And maybe rushed it a little so I could release the UI before my classes started back. School and work tend to suck up all my fun time. I really value the feedback and will be uploading the removal of the ugly "button" words and adding the definition of LAM2 |
|||
|
zeroIndex |
View Public Profile |
Send a private message to zeroIndex |
Find More Posts by zeroIndex |
Add zeroIndex to Your Buddy List |
01/21/16, 08:32 AM | ||
|
Lua Code:
What LoadString does is just turning a string into a fucntion, e.g. if inputString would be (4-3)*2, then f would behave like you wrote a function: Lua Code:
and so GetSolution() would return the current solution of inputString as long as it has correct syntax. Edit: You should also start setting your your functions either local, or adding them to the namespace of your addon by adding it in front like Calc.FunctionName() or Calc:FunctionName(). Using : means the function will get what is in front of the : as the argument "self", you can then use that as you would use Calc within the funtion. Not that useful with just Calc, but it can get handy. Everything that is not local will be in the global namepsace, and if you happen to use a function name that already exists they would overwrite themself. Edit: And if you do this to learn/train programming, then making a parser yourself is a good idea. I also made my addons to learn a bit, and it really helps. It's just LUA, but it still helps with "thinking in code". I know what you mean with "handling the order and depth", I wouldn't have know a few months ago, but now I already can think of how it could work. So if you want to learn something then the loadString() way may be to easy
Last edited by coolmodi : 01/21/16 at 08:50 AM.
|
|
|
coolmodi |
View Public Profile |
Send a private message to coolmodi |
Find More Posts by coolmodi |
Add coolmodi to Your Buddy List |
01/21/16, 01:44 PM | ||||
|
The loadstring() is almost to easy. But I feel that I have a good understanding of what its doing so I don't feel cheapened by using it . However, it does blow my mind how simple this made everything. I feel I can also use this to enhance the chat box input, but that will be for another time. School and work are keeping me busy atm. I value your feedback and will be uploading the new version shortly. Thanks again.
Last edited by zeroIndex : 01/23/16 at 11:40 PM.
|
|||
|
zeroIndex |
View Public Profile |
Send a private message to zeroIndex |
Find More Posts by zeroIndex |
Add zeroIndex to Your Buddy List |
06/02/18, 09:27 AM | |
Forum posts: 3
File comments: 114
Uploads: 0
|
Needed
I love this addon! I use it all the time buying and selling in-game. It seems to work well even though it hasn't had a update in a long time. I just wanted to tell you that its a great addon
|
|
kindredspirit |
View Public Profile |
Send a private message to kindredspirit |
Find More Posts by kindredspirit |
Add kindredspirit to Your Buddy List |
07/04/18, 07:03 PM | ||
|
Re: Needed
|
|
|
zeroIndex |
View Public Profile |
Send a private message to zeroIndex |
Find More Posts by zeroIndex |
Add zeroIndex to Your Buddy List |
01/20/19, 10:36 PM | |
Forum posts: 4
File comments: 164
Uploads: 0
|
Love Calculator!
I love and use calculator daily. It is a must for guild stores.
Question, would it be possible to add the ability to operate on the previous /calc entry if you start the next /calc with an operator instead of a number? |
|
Augestflex |
View Public Profile |
Send a private message to Augestflex |
Find More Posts by Augestflex |
Add Augestflex to Your Buddy List |
05/14/19, 09:59 AM | |
Hey. Cool addon. Small bug report: Doing /calc in chat, without any arguments, gives an error. Better catch that case.
(I assumed it just toggles /calc open and close heh. Might want to add/replace that.) EDIT: Without modifying your code, I added this chunk to get what I wanted: Code:
local function lexer(text) -- Fixed catch error. if not text then text = '' end if text == '' then -- Toggle. Calc.CalcToggleView() -- NOTE Never reaches the empty case below. return end
Last edited by Phuein : 05/14/19 at 10:14 AM.
|
|
|
Phuein |
View Public Profile |
Send a private message to Phuein |
Find More Posts by Phuein |
Add Phuein to Your Buddy List |
06/16/19, 10:29 PM | ||
|
Re: Love Calculator!
So you can type /calc answer + 3 or /calc ans + 3 or /calc 3 + answer. It doesn't matter where you put the answer. Sorry for the late response, but I have been away from the game lately. I really appreciate your input and hope this is close to what you were looking for. |
|
|
zeroIndex |
View Public Profile |
Send a private message to zeroIndex |
Find More Posts by zeroIndex |
Add zeroIndex to Your Buddy List |
06/16/19, 10:32 PM | ||
|
|
|
|
zeroIndex |
View Public Profile |
Send a private message to zeroIndex |
Find More Posts by zeroIndex |
Add zeroIndex to Your Buddy List |
06/17/19, 04:20 PM | |
Forum posts: 3
File comments: 114
Uploads: 0
|
Thank You
I use this addon so much. Thank you for the update!
|
|
kindredspirit |
View Public Profile |
Send a private message to kindredspirit |
Find More Posts by kindredspirit |
Add kindredspirit to Your Buddy List |
08/03/19, 11:13 PM | |
I get an error from doing this:
Code:
/calc 15051 + (11 * 4785) |
|
|
Phuein |
View Public Profile |
Send a private message to Phuein |
Find More Posts by Phuein |
Add Phuein to Your Buddy List |
02/26/20, 10:27 AM | |
Forum posts: 3
File comments: 114
Uploads: 0
|
ui error
|
|
kindredspirit |
View Public Profile |
Send a private message to kindredspirit |
Find More Posts by kindredspirit |
Add kindredspirit to Your Buddy List |