Good, I'm trying to make a calculator script in the conversation window. It has a tab which opens a small typing panel with toolbar underneath the editting panel, so it will look very cool.
Now, I'm trying to work out the math functions. I want to let this:
code:
8^2
change into this:
code:
64
by using Math.pow(8, 2). The problem is: how can I replace that?
It also has to parse this:
code:
(-9*7)^(7-5)
to:
code:
3969
for example, so brackets should also be parsed first. (I think eval() can help here?)
Okay, Cookie just told me that would be very very hard. (read: too hard for me) So I would like to fix 2 other problems problems:
- Does anyone know how I can trigger a function when the user shows/hides the display pictures in the conversation window? I'm trying to make the tab be positioned almost perfectly, so this one is quite important for me.
- Also, is there a way to know if the "is typing message" is shown? I need to call this since if the other contact has emoticons in his/her name, the tab bar gets higher. Therefore, my tab should resize too.
Anyone has an idea to do these?