Trying to implement variable into a string...not working

Hey guys,
I am fiddling with a Cocoa app of mine, and for some really odd reason this is not working. I cannot find a solution, but maybe you will be able to pinpoint what is going on.
NSString * studentReply;
studentReply = @"%@ says okay.", studentsName;
All it returns in Interface Builder is - "%@ says okay."
I'd appreciate any help you can offer.
Ricky.

You weren't calling a formatting method.
Besides separating arguments, a comma can also separate statements, so what your code was essentially saying to the computer was:
First do: studentReply = @"%@ says okay." and then do: studentsName The first statement is a simple assignment (which is why you are seeing "%@ says okay." as the output). The second statement doesn't really do anything (just tells the computer to "evaluate" the variable) but it won't complain.
Hope that helps.

Similar Messages

  • I have a late 2008 Macbook Pro, I am trying to run MW3 but it will not work without crashing a few minuets into the game. The general specs on my computer are a dual processor 2.53 ghz. 4 gb ram and a NVIDIA geforce 9400 (9600 is the alternate card)

    I have a late 2008 Macbook Pro, I am trying to run MW3 but it will not work without crashing a few minuets into the game. The general specs on my computer are a dual processor 2.53 ghz. 4 gb ram and a NVIDIA geforce 9400 (9600 is the alternate card).
    Things to note:
    I have been unable to update firmware on this computer for about a year now. Im not sure why.
    I am running a bootleg copy of Windows XP on this computer, I would not like to spend $149 to get Windows 7 if possible.
    any thoughts on the matter would be greatly appreciated, thank you.

    Why don't you take your 'old' MBP into your local Apple Store and have them check out everything that's wrong with it - and I mean everything? Then, when you get an estimate about how much it would cost to get the machine completely repaired, ask about the Apple flat-rate repair pricing?
    It's worth a shot - and with what you may save, you can put in the bank for a new MBP.
    Clinton

  • I am trying to log into my apple account and it is telling me my account is disabled.  How can i get it enabled again?  I have tried resetting my password and that did not work.

    I have tried to log into my apple account so I can download my songs onto my iPhone.  It keeps telling me my apple id is disabled.  I've tried resetting my password but that did not work.  How can I fix this?

    After resetting your password you might then need to log out of your account on your device by phone on your id in Settings > Store (Settings > iTunes & App Stores if it's on iOS 6) and then log back in so as to 'refresh' the account on it
    If that doesn't fix it then you might need to contact iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • How to store serval char variables into a string variable?

    I have serval char variables, but i don't know how to put them together (without using arrays). I am thinking to store these char variables into a string variable but i don't know how to do it. For example,
    char letter1 = 'a', letter2 = 'b', letter3 = 'c';
    String letters;
    then how can i do to make letters = "abc" from using letter1,2,3?
    I am just a beginner of Java, if anyone can help me, i will appreciate that very much!!!

    String letters=""+leter1+letter2+letter3;is fine and dandy. What it actually compiles to is
    String letters = new StringBuffer().append(letter1).append(letter2).append(letter3).toString();Which ofcourse is much more code to write, but still good to know.
    So do see the API for java.lang.StringBuffer.
    Heikki

  • I can't get into my iTunes Store. Every time I try, it force closes. I've already tried restarting my phone and that's not working. HELP!!

    I can't get into my iTunes Store. Every time I try, it force closes. I've already tried restarting my phone and that's not working. HELP!!

    someone suggested to open your music app and access the store from there first, once done then you can go to the itunes store app, try it and see if it works

  • Hello! I have installed Photoshop on PC WIN 7 64bit. When I store first time a Photoshop docuument, it works fine - after re-opening and doing changes I trying again to store it - it does not work anymore! First it does not accept the name (message "It ca

    Hello! I have installed Photoshop on PC WIN 7 64bit. When I store first time a Photoshop docuument, it works fine - after re-opening and doing changes I trying again to store it - it does not work anymore! First it does not accept the name (message "It can not be stored because the nam is invalid" With 2. trial it tells me that the data is blocked and I don't have the rights - and I should chenge them. But I am working as the Admin on my PC - and each trial to change the rights of the data is as well not possible because of missing rights - even I am Admin! I must always store the data with a new name, then it works, but I also cannot remove the old datas or shift them into the waste paper - because of no rights! -- sorry for not perfect english, I am German native speaker! Tahnks a lot for help!

    Hi,
    I am using a Nvidia 4200M adapter in my Laptop, Driver 266.96, Direct X 11
    In my desktop I am using an ATI XFX 6950, latest revision drivers (I am not at home right now so I cant get that info).
    The issue I did describe above, but it was a long explanation.
    In some flash games the game files load initially and get as far as the "click to start" button. Then the flash area usually goes either all white or all black (usually depending on the falsh game default background color) and then it stays that color. Cant see anything after hitting start (usually most games have an intro video or animation before the game starts, but I cant see any of it.
    For the very few games that do start, the flash game or application does not seem to work correctly in that when the rare game starts, it wont save any game files or save files to the pc and so if I exit the game (navigate away to another page or close browser) and then later come back, even though I click the option to save games (and ensure that the flash application slider shows it can save files and lots of space) it does not save and I have to start from the beginning all the time.
    More explanation I gave above.

  • HT1222 I just installed this update and now I cannot access "Mail" at all.  I tried reinstalling the program, but that does not work, either.  Help!!!!!!

    I just installed this update and now I cannot access "Mail" at all.  I tried reinstalling the program, but that does not work, either.  Help!

    Paldeng, thanks for the suggestion.  I've done all that.  I can connect to the server, but apparently they are not recognizing my ID and password.  I can use the server program if I don't go through Mail (using the same ID and password).  My mother in another state with another provider has had the same email issue, as also my husband on his laptop who uses the same internet connection I do.  His worked fine until we had it repaired at the Apple store and all the original programs reloaded (with the required updates, I assume).  We can receive email in Mail, we just cannot send.
    I contacted my service provider, and we went over my connections.  They said it was not their problem and connected me with Apple, resulting in a charge to me because my warranty is long expired.  Apple swears it is not their problem, it is the provider, so here I sit.  My son was able to fix my Mom's Mail (she's 97) and got my husband's working also, until mine went out, by tweaking connection descriptions and ports remotely.  The thing is, we had not messed with any of those settings, so what changed?  I just did not want to bother my son again, as he has many other demands on his time.
    Since this fiasco with the Mail v4.6 update, I'm wondering if something else was updated that works well with Lion and Mountain Lion, but does not work well with Snow Leopard and Leopard.  I think the problem I had with the Mail update was that my Mail program had been renamed to Mail (original), and therefore was not being recognized by the update.  Perhaps they had another tweak in there somewhere that is affecting outgoing mail connections?

  • I look for integrated in the legend bloc of diaporama, a widget such as "Accordion" for, with a click, or passing with mouse, open a new legend for each photo. I tried with "Accordion" of Muse, it does not work. I tried copy/paste, mais no result. The wid

    Question.
    I look for integrated in the legend bloc of diaporama, a widget such as "Accordion" for, with a click, or passing with mouse, open a new legend for each photo. I tried with "Accordion" of Muse, it does not work. I tried copy/paste, mais no result. The widget disappear in bloc legend. disparaître. Have you one solution?
    Thank you,
    Loïc

    Accordion or Tabbed panel should to it, with click and open container.
    Please provide site url where this does not work, also if you can provide an example where we can see the exact action then it would help us.
    Thanks,
    Sanjit

  • Edit In Photoshop from lighroom suddenly stopped working. I have tried uninstalling and reinstalling both and still not working.

    Edit In Photoshop from lighroom suddenly stopped working. I have tried uninstalling and reinstalling both and still not working.

    What error message are you getting? If none then in Lightroom Preferences> General> check "reset all warning dialogs"
    Try again and see what message pops up.

  • I am having trouble looking at video podcasts on my ipod touch. they are all greyed out. I have tried removing them and resyncing. this did not work. any ides?

    I am having trouble looking at video podcasts on my ipod touch. they are all greyed out. I have tried removing them and resyncing. this did not work. any ideas?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all media and resync
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • My ipod touch 4th gen home button has stopped working i have taken of the screen and tried pushing the button underneath and still not working please help

    my ipod touch 4th gen home button has stopped working i have taken of the screen and tried pushing the button underneath and still not working please help

    Try a reset:
    Hold the Sleep and Home button down until you see the Apple logo.

  • I cant open my ipad after i turned on the voice in accessibility i have a passcode and i tried to enter my password but it not working. help me please

    i cant open my ipad after i turned on the voice in accessibility i have a passcode and i tried to enter my password but it not working. help me please..
    i updated my ipad in ios 6

    Turn off VoiceOver
    1. Press the Home button
    2. Tap Settings.
    3. Then double-tap Settings.
    4. Tap General.
    5. Then double-tap General.
    6. Use three fingers on the screen to scroll to Accessibility
    7. Tap Accessibility.
    8. Then double-tap Accessibility
    9. Tap VoiceOver
    10. Then double-tap VoiceOver.
    11. Tap "On" next to VoiceOver
    12. Then double-tap "On" to turn it off.

  • I am having trouble printing a PDF document. Whenever I click print nothing happens but when I am printing documents from Word, Excel etc they print without a problem. I've tried printing as image but that did not work. I uninstalled Adobe Reader XI and d

    I am having trouble printing a PDF document. Whenever I click print nothing happens but when I am printing documents from Word, Excel etc they print without a problem. I've tried printing as image but that did not work. I uninstalled Adobe Reader XI and downloaded Adobe Reader X instead and that still doesn't work. I have Windows 7.

    Hello,
    Please follow the link to troubleshoot the printing issues with Adobe Reader:- Troubleshoot PDF printing | Acrobat, Reader.
    Regards,
    Nakul

  • HT5594 After updating to iOS7 on my iPhone4 I cannot enable location services. How do I enable location services? I have tried turning off restrictions but that did not work.

    After updating to iOS7 on my iPhone 4 I cannot enable location services. How do I enable location services? I have tried turning off restrictions but that did not work.

    I finally just resolved this after not being able to enable location services since upagrading to iOS 7. Posting the solution here 'cause I couldn't find it anywhere else.
    I enabled Restrictions under Settings > General > Restrictions and created a passcode (I'm not sure if this was part of the solution, but it wasn't enabled for me by default.)
    In Restrictions, under Privacy, Location Services was set to "Allow Changes" (This still didn't solve the issue of the greyed-out Location Services switch though - I still couldn't turn it on.)
    Also in Restrictions, I also switched "Find My Friends" to "Allow Changes"
    Once I did step 3, the switch under Settings > Privacy > Location Services was no longer greyed out and could be switched on.
    Hope this helps!

  • I can't find isight under the software, also, i tryed to restart  and still  the camra not working. do you have alink to download isight?

    i can't find isight under the software, also, i tryed to restart  and still  the camra not working. do you have alink to download isight?

    Click on the Apple symbol in the top left of the screen and select About this Mac. Click on More Info and scroll down to the USB entry under hardware. Does it list the 'Built in iSight' in the top right hand pane?
    If it does, what happens when you run the Photo Booth application?

Maybe you are looking for

  • RSEG Accounting document no

    Hi I  want to get the purchase order wise payment  (check no),I have already get the miro document no in rseg,pls tell me how to get the miro accounting document no

  • I want to connect my Canon EOS 7D to my MacBook Pro and use it as a Monitor

    Hello, Anyone know how I can turn my MacBook Pro into a Monitor for my Canon EOS 7D HDSLR camera? Thanks for any advice, fsg NYC

  • Can't get Extreme to work for me

    I bought an Airport Extreme in May and just cannot get it to work for me. It most likely has to do with my settings as it seems complicated for me. My ISP refuses to help me other than providing me with some router/IP info. They claim they have had p

  • Header Mapping & Value Mapping in XI

    Hi All, I Request you to send me the documentation with screen shots about Header mapping and Value mapping. I am very thankful to you in advance. Regards, Nagarjuna.

  • USB Palm sync problem

    I tried to connect my Palm Tungsten T5 on my SunBlade 1500 (Solaris 9). I did what it is said to do. After a prtconf -v, I found the "device" "palmone" etc. and the "compatible" values for the driver "usb830,61.100"+"usb830,61" and son on. I ran : ad