play-co / native-ios

GC Native iOS
GNU General Public License v3.0
14 stars 16 forks source link

InputPrompt button labels swapped #13

Closed roosmaa closed 8 years ago

roosmaa commented 11 years ago

I started to play around with TextPromptView and noticed some buggy behaviour. (Cancel button updated the text, ok button didn't.)

Upon further investigation it seems the labels were swapped in native code for some reason:


diff --git a/tealeaf/platform/InputPrompt.mm b/tealeaf/platform/InputPrompt.mm
index d52a40f..ad27066 100644
--- a/tealeaf/platform/InputPrompt.mm
+++ b/tealeaf/platform/InputPrompt.mm
@@ -96,7 +96,7 @@ static int32_t m_prompt_id = 0;

     ++m_prompt_id;

-       UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:title message: message delegate:self cancelButtonTitle:okText otherButtonTitles:cancelText, nil] autorelease];
+       UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:title message:message delegate:self cancelButtonTitle:cancelText otherButtonTitles:okText, nil] autorelease];
        alert.alertViewStyle = UIAlertViewStylePlainTextInput;
        UITextField *textField = [alert textFieldAtIndex:0];
        textField.delegate = self;
jaaydenh commented 10 years ago

This seems like a really simple fix, anyone working on this one?

martell commented 8 years ago

Closing old issues as this project is being deprecated. If the new tealeaf project has this issue please reopen it here when it becomes available. https://github.com/gameclosure/tealeaf