IPhone Programming: Action triggered by clicking on alert.

Hey Guys,
I have what I suspect should be a pretty easy question.
I'm still working on a Blackjack program. Basically the player goes to hit or stand, and then the game automatically has the dealer deal itself (hit on 16, stand on 17).
Once the dealer is done dealing I want you an alert to come up. But I only want to call the routine after the user hits the OK button on the alert.
How can I go about doing this. I know with an Action Sheet you can trigger something to happen when a given button is pressed, but I want to really be able to do this with an alert. The way I would think this would be done is to see when the user taps the Ok button in the alert. Any idea how to do this?
Thanks!
Justin
Message was edited by: Justin Carman

Can you provide me a code example of how this would work (the alertDidEndSelector)?
I ask this because apparently you can't really use an NSAlert with the iPhone (I keep getting NSAlert undeclared errors), so that eliminates that way of doing it.
Thanks!
Justin
Edit:
One other thing I noticed is that you could do this
UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"Alert title" message:@"alert message" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];
[myAlert addTextFieldWithValue:nil label:@"<place holder>"];
[[myAlert textField] setTextAlignment:UITextAlignmentCenter];
[[myAlert textField] becomeFirstResponder];
[myAlert show];
[myAlert release];
myAlert = nil;
And also have this...
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
switch(buttonIndex) {
case 0:
[myString setText:@"Cancel button pressed"];
break;
case 1:
[myString setText:[[alertView textField] text]];
break;
The only problem is for me...I don't know how I would handle input from multiple different alertViews that I have in my program. Any ideas?
Thanks!
Message was edited by: Justin

Similar Messages

  • How can we assign an action triggered by an event to a Background job?

    Hi All,
            At the moment we are having an on click action event "EXECUTE"  [GSACTIONS/ActionOV ->eh_onexecute] , on click of this event , it is triggering a BADI which has a rewritten method "IF_EX_EXEC_METHODCALL_PPF~EXECUTE" in which we have our custom code. This BADI is being called by an action configured in "ACTION PROFILES".
            Now , we need to find is a way to implement this in the background.
    1) I was trying to use RSPPFPROCESS report,Is there any way this could get triggered automatically when the on click action(execute) is clicked.
    2)The other thing i tried is to copy the code to an executable report program , open a job for it,scheduling it in background and closing the job in the method .But the method has a return parameter "RP_STATUS" which has to get the value from the report. The problem is unless the scheduled job is done the rp_status cannot be returned and as this is in background the rp_status is by default becoming 0 which means failed.
          Any suggestions on how could i implement the above scenario.
    Thanks in advance,
    Mithun

    Hi Tapash ,
    Actually my requirement was not to submit the form to controller .
    I got the solution for that . I have registered a JavaScript function to the MessageText in PR as
    pageContext.putJavaScriptFunction("callMethod","function callMethod() { var first=document.getElementById('First').value; ");
    OAMessageTextInputBean GoalTextBean2=(OAMessageTextInputBean)webBean.findChildRecursive("Second");
    GoalTextBean2.setOnBlur("callMethod()");
    Regards ,
    Srikanth

  • IPhone Programs Closing Randomly to "Home" page

    Hello,
    I have had my new iPhone, for a littler over a week. It seems that the majority of my software programs close un-expectedly, when I am working in them, usually with-in a minute or less of opening the program(s).
    The only one that doesn't seem to ever close is the phone portion, and the smaller programs.
    If you have any ideas, on what the problem might be, please let me know.
    Thanks for your help!

    You can try each of the following, in order, and see any if any of them help.
    1. Power the phone off, then back on: Turn the phone off by holding the Sleep/Wake button for a few seconds until the slider appears, then sliding it to the right. Then press the Sleep/Wake button again to turn the phone on.
    2. Reset the phone: Hold the Home and Sleep/Wake buttons down for about 8 seconds until the Apple symbol appears.
    3. Restore the phone: Plug the iPhone into your computer and click Restore on the iTunes menu.

  • How to find the Program that triggered the outbound idoc

    Hi,
    I need to find the program that triggers a particular Outbound IDoc.
    I have the IDoc number/segment/message type.
    We need to Debug the Outbound IDoc but we do not know from where the IDoc got triggered.
    Is there a way we can find which program triggered it?
    Thanks!

    Hi Suresh,
    Go to tcode WE20, select ur partner profile type, which configured in output type for EDI documents.
    On right side, double click on the Message type in outbound parameters.
    go to message control Tab, double click on process code variable to see FM triggers for the IDOC.
    same as for Inbound also.
    Regards
    Syed A

  • Color picker does not work, " program error when I click, photoshop cc

    I am user of photoshiop cc and it worked fine until several days ago but suddenly it shows " program error " when I click color picker, and I can not use changing color. Please help me to resolve this issue.

    There was a bug with photoshop CC concerning the color picker and its swatches. Make sure you have the latest version and then if it still exists, reset your tools in the upper left hand corner which would be the very first icon in the top tool bar. That should fix it. If not let us know and maybe someone can think of something else.

  • My question is about the 'Restore Backup' option on iTunes (Not 'Restore iPhone'). So, if I click on Back Up Now, then 'Restore Backup', would that go through the process of erasing everything on my phone as new then restore whatever iTunes has backed up?

    My question is about the 'Restore Backup' option on iTunes (Not 'Restore iPhone'). So, if I click on Back Up Now, then 'Restore Backup', would that go through the process of erasing everything on my phone as new then restore whatever iTunes has backed up?
    I do not want this to happen, as with previous experience iTunes doesn't restore a mirror of what the iPhone was when it was backed up as is the case with iCloud backups.
    What I am trying to do is, as I've found a method on Youtube, there is an application where I can delete all the multimedia saved in my 'iMessages' so clear up some space. As doing that manually through the phone would take a lifetime. The method is to backup on iTunes, then using the backup created, importing that into the application then deleting the messages through that then restoring the phone using that amended backup.
    So back to my question, would restoring through 'Restore Backup' just restore the backup internally or would it flush the entire phone and then restore the backup? And if it does so, what would be lost in the restore?
    Thank you all,
    Fahmid

    iCloud should overwrite your phone with the data stored in your account, preserving your newer data.  However, to be sure I would go to Settings>iCloud and turn data syncing to Off before restoring the backup.  Then, after restoring the backup, turn the data syncing back to on, and when prompted about Merging with iCloud, choose Don't Merge.  This will ensure that the data in your iCloud account overwrites the data on your phone (which is your goal).
    Also, you don't sync text messages with iCloud so you will end up losing your more recent messages when they are overwritten by the backup.

  • When i tried to sync my new iPhone to Itunes, I accidentally clicked on sync with my ipod, instead of creating a new one. So now my iphone is the replica of my ipod, deleting my contacts and pictures etc. Is there a way to get it restored?

    When i tried to sync my new iPhone to Itunes, I accidentally clicked on sync with my ipod, instead of creating a new one. So now my iphone is the replica of my ipod, deleting my contacts and pictures etc. Is there a way to get it restored?

    Only if a backup of the iPhone with all that data on it exists.  If one does, restore the iPhone using that backup.

  • Smart Form: Which Action triggered the form?

    Hi all,
    we are using a Smart Form that should show information depending on which action triggered it. The Smart From is called by one class that does some preparation logic (Parent CL_SF_PROCESSING_PPF, Method EXEC_SMART_FORM). This class is started by several actions.
    I know I could have several classes, one per action. But in case of changes, I would have to change all classes.
    Is there a way to determine in the class which action was used to call it?
    Thanks for your help,
    Timo
    Message was edited by:
            Timo Koch (rephrased question)

    Hi,
    I'm facing the same issue, for the moment the best answer is to read the value of the GUID from PARAMETER values.
    DATA: para TYPE tpara-paramid VALUE 'TRIGGERGUID'.
    GET PARAMETER ID para FIELD wv_ppf_guid.
    IF sy-subrc <> 0.
      MESSAGE 'Parameter not found' TYPE 'I'.
    ENDIF.
    SELECT SINGLE * FROM ppfttrigg INTO ws_ppfttrigg
    WHERE os_guid = wv_ppf_guid.
    The problem is on creation mode, the guid is filled but the table is not, I'm trying to get info through class cl_manager_ppf but I haven't found yet ...
    Regards,
    Guillaume Mackowiak.

  • After updating to the latest iphone 4 software, my triple click to voice over no longer works. I have double and triple checked all settings and it just doesn't work anymore. Advice?

    After updating my iphone 4 last, my triple click to voice over stopped working. I have checked all settings and it just isn't working anymore. Is this an issue with the latest update? Any way to fix this?

    Try resetting your phone:
    Press the sleep/wake button & home button at the same time, keep pressing until you see the Apple logo, then release.
    Then, recheck your Settings: Settings>General>Accessibility>Triple-click Home...

  • Dynamic action on button click

    Hi:
    I need some help.
    I am trying to create a dynamic action on the click of a specific button.
    I have set the Event to 'click" and the Selection Type to "DOM Object", but I do not know how to reference the button. I am using a standard template button and #BUTTON_ATTRIBUTES# is not included in the template - I am not sure how to include it in order to be able to specify an id for the button.
    Can someone give me some guidance on the steps I msut take to implement a dynamic action on the click of a button.
    Thanks.
    Bruce

    Bruce,
    edit your button template and add #BUTTON_ATTRIBUTES# to the button-tag of your button
    e.g.
    <button value="#LABEL#" onclick="#LINK#" class="button-gray" type="button" #BUTTON_ATTRIBUTES#>
    <span>#LABEL#</span>
    </button>
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • Finding Program for triggering Print Program (MIGO - Goods Receipt)

    Hi all,
    Currently, I have developed customized print program and SMARTFORMS for Goods Receipt via MIGO, with output type ZZGR.
    Typically, this is a inter-plant transfer, where Plant A will issue a Delivery Order to Plant B, and Plant B will post goods receipt via MIGO (Movement Type 101), using Delivery Order number. As soon as the Material Document is posted, the SMARTFORMS shall be triggered by customized print program, in order to print out the goods receipt document upon material doc posted.
    The config for output determination (via TCODE NACE) for goods receipt is configured. I have tested post a goods receipt using Delivery Order, and Material Document is posted successfully. However, I got a message from SAP Inbox (Businees Area), saying that my Material Document having an update error, and the root cause is specifically from calling Function Module to trigger Smartforms in the print program. From tcode ST22, I realized that the error is due to empty parameter being passed to the function module (where the parameter is required field for further processing in Smartform).
    In order to rectify why empty parameter is bieng passed, I will have to debug the print program, after GR posted from MIGO. Therefore, can someone shed some lights on how to perform a debugging process, or any standard sap program involved, as I understand that the print program is triggered (in background) after GR posted?
    Also, can I know why the Material Document will not be committed to MKPF table after GR posted, is it due to the update error from the above mentioned?
    Many thanks.
    Best regards,
    Patrick
    P/S: I'm using SAP ECC6.

    Actually, this print program is being triggered in the update processing.
    Put a breakpoint in your driver program.
    In MIGO, before pressing the SAVE button start debugging.
    Press the SAVE button.
    Start the update debugging by Settings > Update Debugging.
    As soon as you continue in debugging, it would open another debugging session for the Update debugging. You can press continue and it would stop at your breakpoint.
    Regards,
    Naimesh Patel

  • I am using iphone 3gs and have accidentally clicked "update" to software version 5. However, after I failed and all my data was lost. I manage to restore back to my previous situation. But all my apps has been gone. How can I get back all my aps?

    I am using iphone 3gs and have accidentally clicked "update" to software version 5. However, after I failed and all my data was lost. I manage to restore back to my previous situation. But all my apps has been gone. How can I get back all my aps? I know I can get it by itunes but there are a few problems as below:
    1. I have jailed break my iphone and I never purchased any apps from itunes
    2. I have some important infomation saved in one of the apps called "awesome notes". How can I get it back? Is it store inside my computer? if so, how can i restore?
    3. I am using window 7
    I sincerely hope you guys can help me.
    Regards,
    Stephen Hong

    alrite. I have made my mistake. I should not jail break my iphone. So if I purchase my apps again from itunes is that mean mean my data will be back?
    I hope you guys can giv me some support here since I am Apple genuine buyer. I could be wrong last time and now I turn over a new leaf and learn a lesson.
    Please noted that I can always create new account to ask for the same questions without mention about "jailbreak" if I want to but obviously I won't do that. Please provide me your support! Thank you!

  • I just got the iPhone 5 and noticed that the message alerts will only alert once . I have it set up as 3 times and its not working . Please help. I'm running 6.0.2 and I really starting to get ****** off with apple products

    I just got the iPhone 5 and noticed that the message alerts will only alert once . I have it set up as 3 times and its not working . Please help. I'm running 6.0.2 and I really starting to get ****** off with apple products

    Instead of getting annoyed, read the User's Guide and try basic troubleshooting.

  • Hi, I followed the instructions to apply for the Made For iPhone Program. After submission of the necessary documents and information, I have not heard back from Apple. How to track the application progress? Can someone help?

    Hi, I followed the instructions from Apple MFI website, to apply for the Made For iPhone Program. After submission of the necessary documents and information, I have not heard back from Apple for couple weeks. How to track the application progress? Can someone help? < Edited by Host >
    Thank you.
    Best Regards,
    Gerald

    Hi Gerald
    This is a user-to-user forum, and your message will not be received by Apple. You will need to sign into your Developer/MFI account, and contact Apple that way. This can be done here.
    P.S Please do not post your e-mail address here.
    Taylor

  • User exit triggered after clicking on PGI button in vl02n

    What is the user exit which gets triggered after clicking PGI booton in vl02n.
    i used 'MV50AFZ1' which interrupts the process of creating material document.
    so pls tell me any User exit which can be used before the process of creating material doc gets started

    Hey,
    Have you tried with this?
    MV45AFZZ
    MV45AIZZ
    MV45AOZZ
    MV45ATZZ
    or...
    VMDE0004
    VMDE0003
    VMDE0002
    VMDE0001
    V53W0001
    V53C0002
    V53C0001
    V50S0001
    V50R0004
    V50R0002
    V50R0001
    V50Q0001
    V50PSTAT
    V02V0004
    V02V0003
    V02V0002
    V02V0001
    Not sure if possible...buy maybe
    Bye,

Maybe you are looking for

  • Crystal Report 10 take toomuch time to display report

    hi every one i have designed some reports  with crystal report 10. i am using classic ASP and windows 2003 Enterprise server as web server. The problem is that when i browse the report in Internet explorer, it takes too much time to display the repor

  • How can I know the web application name of a report?

    Hi forum, I have a query that is used by web. I need to know the name and how to access to application web of report any idea thanks in advance

  • Photoshop CS4 setup does not run. Help plz.

    hi! Am having problem with installing the Adobe Photoshop CS4 ( and the same problem with other Adobe  CS4 softwares flash, soundbooth, after effects etc...) the setup does not start when i run it. the setup appears in task manager processes but not

  • Change default refresh rates reports

    Hi!!! In SQL Developer yo have the option to refresh a Report choosing among 5, 10, 15, 20, 25, 30, 60, 120. Is is possible to change that default values????? Thanks a lot! Jose.

  • Administrative rights to Windows Server

    I know that we need administrative rights to a window box during installation and configuration. After cutover to production, is it possible for the DBA to survive if administrative rights are revoked? What daily/often-run tasks will be affected? Tha