FROM : Wayne Packard
DATE : Tue May 27 23:27:24 2008
On May 27, 2008, at 2:24 PM, Nathan wrote:
> I'm having a weird problem.... here's my code:
>
> - (IBAction)operators:(id)sender {
> OB=[operatorBar floatValue];
> if (OB=1) {
> [operator setFloatValue: 4];
> }
> if (OB=2) {
> [operator setFloatValue: 5];
> }
> }
>
> So you would expect that if operatorBar = 1, then OB will = 1, and
> operator will = 4. I know the first part is ok due to testing, but
> what happens when I run the program is that it acts like the if's
> don't exist, so upon using operators method operator will equal 5 no
> matter what. What's wrong here?
ROFL. Nice one. This is meant as comic relief, am I right?
wp
DATE : Tue May 27 23:27:24 2008
On May 27, 2008, at 2:24 PM, Nathan wrote:
> I'm having a weird problem.... here's my code:
>
> - (IBAction)operators:(id)sender {
> OB=[operatorBar floatValue];
> if (OB=1) {
> [operator setFloatValue: 4];
> }
> if (OB=2) {
> [operator setFloatValue: 5];
> }
> }
>
> So you would expect that if operatorBar = 1, then OB will = 1, and
> operator will = 4. I know the first part is ok due to testing, but
> what happens when I run the program is that it acts like the if's
> don't exist, so upon using operators method operator will equal 5 no
> matter what. What's wrong here?
ROFL. Nice one. This is meant as comic relief, am I right?
wp
| Related mails | Author | Date |
|---|---|---|
| Nathan | May 27, 23:24 | |
| Nick Zitzmann | May 27, 23:26 | |
| Wayne Packard | May 27, 23:27 | |
| Nathan | May 27, 23:28 | |
| Nathan | May 27, 23:29 | |
| Nathan | May 27, 23:31 | |
| Scott Ribe | May 27, 23:32 | |
| Andy Lee | May 27, 23:35 | |
| Nathan | May 27, 23:35 | |
| Nathan | May 27, 23:35 | |
| Randall Meadows | May 27, 23:37 | |
| Bob Smith | May 27, 23:45 | |
| Sherman Pendley | May 28, 00:04 | |
| Graham Cox | May 28, 02:11 | |
| Jens Alfke | May 28, 05:52 | |
| Sean McBride | May 28, 16:45 | |
| Sherm Pendley | May 28, 17:21 |






Cocoa mail archive

