Difference between revisions of "More Calculator Functions"
Jump to navigation
Jump to search
Shane112358 (talk | contribs) (New page: Bottom line - there are secondary calculator functions already built in. Just push the space bar. Below is the coding showing where I found it. If you go to /usr/palm/applications/com.p...) |
Shane112358 (talk | contribs) |
||
| Line 1: | Line 1: | ||
| − | Bottom line - there are secondary calculator functions already built in. Just push the space bar. Below is the coding showing where I found it. | + | Bottom line - there are secondary calculator functions already built in. Just push the space bar. Below is the coding showing where I found it. I'm currently working on changing the M- function to a X^y function. |
If you go to | If you go to | ||
Revision as of 15:21, 31 July 2009
Bottom line - there are secondary calculator functions already built in. Just push the space bar. Below is the coding showing where I found it. I'm currently working on changing the M- function to a X^y function.
If you go to
/usr/palm/applications/com.palm.app.calculator/app/controllers
and look at calculator-assistant.js, you can see the following alternative functions that have always been available - but news to me.
onKeyPress: function(event) {
if (Mojo.Char.isEnterKey(event.charCode)) {
this.onEqualsPress(event);
} else if (event.charCode == Mojo.Char.backspace) {
this.onBackspacePress(event);
} else if (event.charCode == Mojo.Char.spaceBar) {
this.toggleOptionKeyMode();
.
.
.
.
onDividePress: function(event) {
if (this.optionKeys) {
this.calculator.memMinus();
this.showMemoryIndicator();
this.toggleOptionKeyMode();
} else {
this.calculator.divide();
}
this.updateResults();
event.stop();
},
onMultiplyPress: function(event) {
if (this.optionKeys) {
this.calculator.percent();
this.toggleOptionKeyMode();
} else {
this.calculator.multiply();
}
this.updateResults();
event.stop();
},
onSubtractPress: function(event) {
if (this.optionKeys) {
this.calculator.sqrt();
this.toggleOptionKeyMode();
} else {
this.calculator.subtract();
}
this.updateResults();
event.stop();
},
onAddPress: function(event) {
if (this.optionKeys) {
this.calculator.plusMinus();
this.toggleOptionKeyMode();
} else {
this.calculator.add();
}
this.updateResults();
event.stop();
},