[iPhone] Calc.app builds fine, but doesn't work as intended

Hi,
Trying the Calc example in "Xcode Quick Tour for iPhone OS", I end up with an application that builds and launches fine in the iPhone Simulator, but that doesn't work.
Did anyone try this example and did it work for you ?
Here is what I observed :
When I press a digit, the displayField's value isn't changed.
Going in debug, I can see that the instance of the Calculator class does receive a message with the "input" selector and with the parameter "character" worth the digit that I pressed. The [_diplay appendString:character], but _display seems to keep being "nil".
Any idea ?
Many thanks in advance for your help,
J.

The Calc example worked well for me. The only bugginess I found was that if the text field is forced to reduce it's font size it never gets reset to the original size.
Assuming you didn't touch the Calculator class files it's probably something simple. Check the IB connections, especially the connection between the displayField outlet and the UITextField. Maybe put a NSLog in the press method to check \[_calculator display\]. Of course if your Calculator class files are different from mine all bets are off, so if you don't have any luck we'll need to compare those.

Similar Messages

  • Photo editor app now available but doesn't work, after latest What's New update

    hi all
    odd experience what I wanted to highlight with you all.
    I've just had an updated (this morning) to What's New build 3.0.A.0.2
    After installing this patch / update, I was then told that "Photo Editor" was available to download. Build is 5.0.A.0.12
    As far as I'm concerned I've not had this app on my phone before - checking in system apps reveals this is a fresh install, rather than an update to an existing app.
    Also, I've not worked out how to run it, as there's no app shortcut on my homescreen. The app is not visible in the app picklist (when adding new items to my homescreens) either. Nor is the app in the main app list (accessed with the 6 dots button in the middle of the permanent shortcut panel on the homescreen).
    I've even tried using a very useful app "quick shortcut maker" and although I can find photo editor in its activity list, when i test the generated shortcut, I get "unfortunately, photo editor has stopped".
    Any ideas?
    I do have some apps disabled, so does photo editor have any known dependencies?
    EDIT: I've tried clearing photo editor data and restarting - no change.
    Cheers,
    Gary
    Solved!
    Go to Solution.

    Hi MyAliasIsGary 
    Photo Editor is a system app only, it is available for use when editing photo's through your Album or Photo's app. For example, if you go into Album > tap on a photo > tap the icon at the bottom that looks like a pencil on paper > tap Photo editor. 
     - Official Sony Xperia Support Staff
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • Applet compiles but doesn't work as intended

    My program intends to add, subtract, multiply or divide two numbers, whereby, if the user enters 'A' the program adds the two numbers, and 'S' to subtract them etc. The program compiles fine but as I am pretty new to Java I'm finding it hard to find my error. Reagrds in advance.
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.*;
    public class CharacterCalculation extends Applet implements ActionListener
         Label input1, input2, input3, output;
         TextField ip1, ip2, ip3, op;
         Double num1, number1, num2, number2, calculationa, calculations, calculationm, calculationd;
         String characterentered;
         public void init()
              setSize(280,180);
              input1 = new Label ("Enter first number here:");
              ip1 = new TextField(5);
              add(input1);
              add(ip1);
              ip1.addActionListener(this);
              number1=0.0;
              input2 = new Label ("Enter mathematical operator here:");
              ip2 = new TextField(5);
              add(input2);
              add(ip2);
              input3 = new Label ("Enter second number here:");
              ip3 = new TextField(5);
              add(input3);
              add(ip3);
              ip3.addActionListener(this);
              number2=0.0;
              output = new Label("The answer is:");
              op = new TextField(32);
              add(output);
              add(op);
              op.setEditable(false);
         public void paint (Graphics graf)
              graf.drawString("A = Add S = Subtract D = Divide M = Multiply",20,160);
         public void actionPerformed(ActionEvent ev)
              num1=Double.parseDouble(ip1.getText());
              num2=Double.parseDouble(ip3.getText());
              characterentered=(ip2.getText());
              calculationa=(num1+num2);
              calculations=(num1-num2);
              calculationm=(num1*num2);
              calculationd=(num1/num2);
              if (characterentered == "A")
                   op.setText(Double.toString(calculationa));
              if (characterentered == "S")
                   op.setText(Double.toString(calculations));
              if (characterentered == "M")
                   op.setText(Double.toString(calculationm));
              if (characterentered == "D")
                   op.setText(Double.toString(calculationd));
              else
                   op.setText("Please enter a valid mathematical operator");
    }

    if (characterentered == "A")This is never going to work. A String is an object. What the above line does is compare the reference of characterentered to the reference of the object "A", which will never be the same (they are two different objects stored in two different memory locations).
    If you want to compare two strings you need to use the equals() method, so change to four comparison lines to:
    if(characterentered.equals("A")){
    }

  • Bridge gallery previews fine but doesn't work online

    hello, i am setting up a bridge gallery on my site. it displays fine when i preview it from dreamweaver but when i put it up online it looks very small and seems align itself to the right for some reason. i have checked all my code and can't get it right.
    here is the url of the live site:
    www.matterandmovement.com/gallerytest
    here is a snippet of the code with the iframe in question
    <div align="center" style="div_pictorial_bar"><img src="images/pictorial top bar.jpg" width="830" height="10" />
      <br>
      <iframe src="images/gallery/Matter and Movement/index.html" frameborder="0">
      </iframe></div>
    if anyone can help id much appreciate it. like i said it previews fine in all my browsers from dreamweaver, but dosent display correctly online.

    There is a little fragment of something that shows towards the right - about 10 pixels wide. Is this the Bridge gallery? Nothing clickable. Tried it in both Chrome and Firefox. By the way, in Firefox, your logo doesn't show.

  • ITunes deletes my iPhone 4 apps, then crashes and doesn't work

    Yes, my music library contains 70 gb of music, which I've spent years collecting, rating and making playlists with etc. Everytime I try and synch with my iPod it tells me the L: drive is not available, but after a few attempts it synchs everything. I try the same with iPhone 4 and iTunes deletes all the apps and then crashes.
    When I reopen iTunes it hangs my PC. I reboot again and it attempts to reload all 70 gb by reading the XML file, which is corrupt by this point, and has to go through each track to reassociate it to iTunes. Then the procedure starts all over again - I attempt to synch my iPhone and it breaks again. AAAAAARGH.
    I'm at the end of my tether. I've spent too many hours attempting to fix this problem.

    i should've also mentioned that none of these problems occurred until after in tried syncing up to itunes on my pc. I've tried normal stuff like turning off/on, etc. have not done a hard reset for fear of losing everything on my phone. Don't really know what to do.

  • The wifi at my school isn't very good. And I can't send iMessages through it. It works for some apps like score center and my radar app, but doesn't work for other apps like clash of clans and iMessage. How can I get it to work on that  wifi network

    The wifi at my school isn't very good. And I can't send iMessages through it. It works for some apps like score center and my radar app, but doesn't work for other apps like clash of clans and iMessage. How can I get it to work on my school wifi. I have an iPhone 4S on AT&T and iOS 7.04

    In a roaming network, your "main" router is the device that would require port mapping/forwarding to be configured in order to access the IP camera from the Internet. This router is also the one that would be provide the private IP address for the camera which you will want to be a static one.
    So as you described your network, the IP cameras should be getting an IP address or you assigned it a static one and this is the address that you would enter in the Private IP address (or equivalent depending on the router used) field when setting up port mapping.
    If you are not able to access this camera from the local network, then this should be troubleshot first.

  • I updated my iphone 5 to ios 6.0.2. my wifi says its connected but doesn't work now. It doesn't matter what wifi network I connect to. It worked before updating my phone. I can no longer use facetime or use wifi at all. I'm not sure what to do to fix it.

    I updated my iphone 5 to ios 6.0.2. my wifi says its connected but doesn't work now. It doesn't matter what wifi network I connect to. It worked before updating my phone. I can no longer use facetime or use wifi at all. I'm not sure what to do to fix it.

    I'm having similar issues with my phone.  I got my first iPhone recently, only had an iPod touch gen4 for a little over a year.  Updated to 6.0.2 when we got the phone (iPhone 5) a few days before Christmas.  When I got home on the evening of January 11, my phone would not connect the router anymore.  I was able to get it to connect after resetting the phone and the router, updating the router, and manually connecting.  That laste for a few minutes and then wouldn't work anymore.   I live in an area with very limited service, we have a network extender installed to help, and I am barely getting a 3G signal at times.
    My wife's iPad 4, my touchiPod 4, and all of our laptops are working just fine on the router.  When I dropped my kid off at school today, I noticed that I am not even seeing the school network anymore from the parking lot where before I got 3 or 4 bars and could connect to their wifi when I was there.  Today my phone goes back and forth between seeing my home network but not connecting, to not even seeing the network at all even from the same room that the router is in.
    Hope Apple fixes this problem soon..............

  • Is there something wrong with the iPhone calc app?

    The other day I needed to show my son how many paper punch cards would be needed to compete with the flash memory on my iPhone 4.  Each punch card had 480 spaces on it, that could correspond to bits.  In order to work out how many punch cards would be needed, I had to first figure out how many bits there were in 32Gb.  The following calculation needs to be done in landscape mode, otherwise you ae unable to see the numbers properly on the display.
    8 x 1024 x 1024 x 1024 x 32 = 274,877,906,944
    Now for the interesting bit.
    If I divide the amount of bits held in a 32Gb by the amount of bits on the old paper punch card I should get - 572,662,306.1333333333 recurring cards required.
    Strangely the iPhone calc app believes that the number is just shy of 6 cards at 5.7266230613333e+8.
    Now I know this is not some strange scientific notation because if I divide by a whole number such as 100 or 400, etc... then it gets the answer right.  Further more with really big numbers, the iPhone calc app seems to loose the plot and provide incorrect answers.  Other apps I have for calculation get the answer right, but not the iphone app.
    Before anyone points out that Flash storage is done in 1000Mb's instead of 1024Mb's, I know.  I was just doing a demonstration based on the actual figure of 32Gb, using the correct numbers based on a binary base.  Storage manufacturers often use this as there manufacturing techniques do not work in the same way as the maths.
    Anyone else seen this problem, and if so, what strange numbers can we get, highlighting the problem, so that it gets fixed in the next update.  I think I shall have to try this out in Numbers on the iPhone, see if the problem is there to.  As a passing shot I feel that this is a fundamental problem that needs to be addressed, and relatively quickly.
    I am currently using iOS 5.0.1 on the iphone and iPad.

    Amazing...yet again an excuse for a 16 digit display that is incapable of displaying 572 million.... But funnily enough it will display something proper when divided by 400, or in other words, it resorts to moron system and prints '687,194,767.36'.  Maybe we should all write everything in scientific notation...and forget this silly simplistic system of using numbers and commas to designate large numbers.  For all you scientific types, they are no longer millionaires, no they will just be renamed "1.0e+6's".  Even better, we could rename millionaires row, to something scientific.  Yeah I can see that taking off.
    @tonefox, thanks for clearing that up for me, I wondered what all those strange new fangled words were for...
    I give up, you guys win.  Asking questions here is like nailing jelly to a wall...

  • GUI iPhone web app builder like iWeb

    Does anyone know if someone has built a GUI iPhone web app builder?
    I am very interested in building an iPhone site in conjunction with the development of my new site http://www.thecutsquad.com , my main interest in this is so that there is an optimized site for the iphone without having to load all of the rich media which I will be hosting.
    So if I could build an iPhone specific website like http://app.getleaflets.com/ where I can host content media optimized for iPhone viewing over EDGE and people who are browsing using the iSafari (is that what we are calling it these days?) are redirected automatically without having to type in a specific web address, although I do not mind having a sub-domain which hosts this.
    So, anyone know of anything, or is anyone interested in helping with the development of such an application?
    Also, what would I need, if no application exist like this, to start coding web 2.0 and Ajax? I am new to all of this web development stuff, but I learn extremely quick when I am pointed in the right direction.
    Thanks a ton,
    Gabe
    Message was edited by: Gabe 5 Editor

    a web building application that is similar to iWeb, except that it builds web 2.0 pages.
    I'm not sure that phrase has much concrete meaning. For the iPhone you often essentially try create the "javascript in a web page" equivalent of a desktop app. You get the javascript from libraries or compose it yourself with a text editor, and integrate it into the html created by any web editor.
    Here is an example I happen to be familiar with, a virtual keyboard for other languages, where you can examine the source (to get everything, download as a webarchive and folderize it).
    http://pointatme.com/keyboards/

  • Acrobat 9 trial in WIN 7 loaded fine, but doesn't print.

    09.25.10
    I just loaded Acrobat 9 trial in WIN 7 and it loaded fine, but doesn't print.
    When I go to print a PDF, after entering the file name, an Acrobat software setup box asks for the serial # or "continue to use product on a trial basis".
    I select the continue option, click "next" the box disappears - then nothing happens. This repeats each time I try and print, even after a reboot.
    Having selected Acrobat as the default printer did not change anything.  Help!  Dave

    You may have to update Acrobat. I am not sure that AA9.0 works correctly with Win 7.

  • GUI iPhone web app builder

    Does anyone know if someone has built a GUI iPhone web app builder?
    I am very interested in building an iPhone site in conjunction with the development of my new site http://www.thecutsquad.com , my main interest in this is so that there is an optimized site for the iphone without having to load all of the rich media which I will be hosting.
    So if I could build an iPhone specific website like http://app.getleaflets.com/ where I can host content media optimized for iPhone viewing over EDGE and people who are browsing using the iSafari (is that what we are calling it these days?) are redirected automatically without having to type in a specific web address, although I do not mind having a sub-domain which hosts this.
    So, anyone know of anything, or is anyone interested in helping with the development of such an application?
    Thanks a ton,
    Gabe

    Check out the messages, info pages and samples at:
    http://groups.google.com/group/iphonewebdev
    And a programmer's reference taken from info there into:
    http://www.kudit.com/wiki/index.php/Main_Page
    Hmmm... which seems to be down right now.

  • After i update the 10.10.2 OS X Yosemite my iPhoto stops working. In the warning that appears when I try to open the app says that happened a mistake because of this update. I reinstalled the app but doesn't work anyway. Please, HELP!

    after i update the 10.10.2 OS X Yosemite my iPhoto stops working. In the warning that appears when I try to open the app says that happened a mistake because of this update. I reinstalled the app but doesn't work anyway. Please, HELP!

    I already tried that but it doesn't work. Appears a warning saying: "See the developer to make sure that iPhoto works with this version of OS X. You may need to reinstall the application. Be sure to install all available updates in the application and OS X."

  • I am trying to transfer my upgrade to my second line.  When I try to order any other phone it works fine, but won't work to upgrade to Iphone 6

    I am trying to transfer my upgrade to my second line.  When I try to order any other phone it works fine, but won't work to upgrade to Iphone 6

        TWRING,
    Help has arrived! Since the device is currently on pre-order when processing the order online it will only recognize the line eligible. Once you receive the device you may activate it on another line if needed.
    EfrainM_VZW
    Follow us on Twitter @VZWSupport

  • I have an iPhone 5 with LTE 4G but doesn't show this option in the settings.Can you help me please.

    I have an iPhone 5 with LTE 4G but doesn't show this option in the settings.Can you help me please.

    Ask your carrier. No one here works for Apple, represents Apple or Speaks for Apple, thus no one here can answer your question.

  • HT204051 I'm unable to connect my iphone 5s to the Dlink router. I tried all the apple support suggestions. But doesn't work. Please let me know.

    I'm unable to connect my iphone 5s to the Dlink router. I tried all the apple support suggestions. But doesn't work. Please let me know.

    I'm having this problem now with my 2 weeks old iPhone 6+. in the beginning everything going great and managed to connect every wifi around me. Then suddenly 1 week ago, All the wifi from my office, home, hotel and coffee house saying either incorrect password or can't join the wifi. But when i switch on my hotspot from my iPhone 5 it can be connect. i also try with my friend iPhone hotspot. So is it because of hardware problem or software problem. And i just restore my iPhone6+ and still can't connect to wifi and manage to join hotspot (also wifi right?) regret as all my downloaded stuff vanish and now can't download back using wifi.....
    Thanks for assisting

Maybe you are looking for

  • Missing or invalid version of SQL library PSORA

    getting this error when starting app designer after new installation. "Missing or invalid version of SQL library PSORA"

  • How to check whether a vriable is declared or not?

    Hi, Problem: A glogal variable named :GLOBAL.ENV is used in one of my form. But its value is coming from another form which is developed by another programmer. I need to check like this: IF :GLOBAL.ENV='SOMETHING' THEN END IF; But, if the other devel

  • Partially picked situation

    Hello, I wish to get clarification on the following regarding situation where full ordered quantity is not fully picked. WM situation : To post Goods Issue when quantity is partially picked, Either a. Copy the picked quantity to the Delivery quantity

  • I can not Connect my I Phone and my I Pod nano with my I Book G4

    I can not Connect my I Phone and my I Pod nano with my I Book G4. My iBook G4 is still runing on Mac OSX 10.4.11 so I can´t load itunes 10 and I can not Connect my I-Phone and my IPod to my laptop. The Question is: Way dose Apple dose not suupport th

  • ---media encoder not queuing audio exports...

    Just recently, the encoder isn't queuing up audio exports. I'm exporting mp3's 128kbps. It's worked up until now. Video's still queue but for whatever reason audio's are not. Any suggestions? Thanks