Bug 4991 - Action is deleted from .h file
Summary: Action is deleted from .h file
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
: 5569 ()
Depends on:
Blocks:
 
Reported: 2012-05-09 23:56 UTC by Tom Opgenorth
Modified: 2012-06-07 17:32 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Adding the Action to the .h file. (335.32 KB, image/png)
2012-05-09 23:56 UTC, Tom Opgenorth
Details
Implementing the partial method for the action in MonoDevelop (283.55 KB, image/png)
2012-05-09 23:57 UTC, Tom Opgenorth
Details
Going back to XCode, the action is gone. (233.73 KB, image/png)
2012-05-09 23:58 UTC, Tom Opgenorth
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Tom Opgenorth 2012-05-09 23:56:51 UTC
Created attachment 1841 [details]
Adding the Action to the .h file.

MonoDevelop 2.9.5

MonoTouch 5.3.3

Steps to reproduce:
1. Create a new iPhone project, Storyboard.

2. Select Single View Application

3. Add a button and outlet

4. Add an image view and outlet

5. Add an action for the button on the TouchUpInside event

6. Switch back to MonoDevelop, and implement the partial method for the action that was added in step #5.

7. Run the application, it should work. Stop the application.

8. Back in MonoDevelop, double click ont the storyboard file. The action has disappeared from the .h file.

10. When you run the application, the follow exception will be thrown:

MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: -[TakeAPicture_iPhoneViewController actionTakeAPicture:]: unrecognized selector sent to instance 0x9b5d9f0
  at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
  at TakeAPicture.iPhone.Application.Main (System.String[] args) [0x00000] in /Users/tom/work/SafetyTicketRegistry/mobile/TakeAPicture.iPhone/Main.cs:17


I've attached screenshots.
Comment 1 Tom Opgenorth 2012-05-09 23:57:49 UTC
Created attachment 1842 [details]
Implementing the partial method for the action in MonoDevelop
Comment 2 Tom Opgenorth 2012-05-09 23:58:28 UTC
Created attachment 1843 [details]
Going back to XCode, the action is gone.
Comment 3 Mikayla Hutchinson [MSFT] 2012-05-10 12:43:09 UTC
Did MD sync back the partial method into the designer file?

It's a bit odd that the screenshot of MD is showing a syntax error...
Comment 4 Tom Opgenorth 2012-05-10 14:24:46 UTC
No, MD did nothing to sync back the method into the designer file.  Any syntax errors are probably mine.
Comment 5 Jeffrey Stedfast 2012-05-10 14:31:33 UTC
As long as I don't implement the partial method in the main .cs file, it continues to work syncing back and forth with Xcode.

But as soon as I implement the partial method, then it fails to sync.

I'm guessing that something is going wrong with the resolver?
Comment 6 Mike Krüger 2012-05-11 04:49:31 UTC
fixed.
Comment 7 Mikayla Hutchinson [MSFT] 2012-05-11 13:48:13 UTC
Backported to 3.0, since it causes data loss.
Comment 8 Mike Krüger 2012-05-12 16:31:48 UTC
Aren't we releasing from master ?
Comment 9 Mikayla Hutchinson [MSFT] 2012-05-14 11:26:28 UTC
No, the *next* release will be re-branched from master.
Comment 10 Jeffrey Stedfast 2012-06-07 17:32:01 UTC
*** Bug 5569 has been marked as a duplicate of this bug. ***