Bug 1078 - XML codes are displayed on the Editor panel when user double click on .xib file.
Summary: XML codes are displayed on the Editor panel when user double click on .xib file.
Status: CLOSED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.8 beta 3
Hardware: Macintosh Mac OS
: --- major
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2011-09-27 11:22 UTC by Nischal
Modified: 2011-10-10 12:03 UTC (History)
4 users (show)

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


Attachments
Image for the bug (285.76 KB, image/jpeg)
2011-09-27 11:22 UTC, Nischal
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:
CLOSED FIXED

Description Nischal 2011-09-27 11:22:14 UTC
Created attachment 508 [details]
Image for the bug

Steps to reproduce:
1. Launch the application.
2. Create a solution for iPhone Single screen application.
3. Double click on .xib file.
4. see XML codes are displayed on the Editor panel.

Actual result:
XML codes are displayed on the editor.Refer the attached screenshot.

Expected result:
It should launch Xcode.

Environment:
VM: Parallel Desktop 
OS:  Lion 10.7 (Guest Operating System)
MonoTouch 4.9
MonoDevelop 2.8 beta 3
Mono Framework for MAC OS X Intel Runtime
Xcode 4.1
Comment 1 Alan McGovern 2011-09-27 11:36:13 UTC
Can you attach the following two files immediately after running the test you described:

~/Library/Logs/MonoDevelop-2.7/MonoDevelop.log
~/Library/Logs/MonoDevelop-2.7/Xcode4Sync.log
Comment 2 Alan McGovern 2011-09-27 11:37:53 UTC
Can you also right click on the file and see what options are given in the 'Open With' section of the menu.
Comment 3 Nischal 2011-09-27 12:51:13 UTC
Hi Alan,

I was unable to locate the log files. However below are the steps using which we can initiate the Xcode:

1. Launch the application.
2. Create a solution for iPhone single view application.
3. Right click on .xib file.
4. Select Open with>>Xcode Interface Builder.
5. Xcode launch successfully.

Also here are the options that are shown when we right click on the .xib file:

Xcode Interface Builder
Source Code editor
Hex Editor

Please let me know if any more help is required from our side.

Regards,
Nischal Kumar.
Comment 4 Nischal 2011-09-27 13:25:19 UTC
Hi Alan,

I was unable to locate the log files. However below are the steps using which we can initiate the Xcode:

1. Launch the application.
2. Create a solution for iPhone single view application.
3. Right click on .xib file.
4. Select Open with>>Xcode Interface Builder.
5. Xcode launch successfully.

Also here are the options that are shown when we right click on the .xib file:

Xcode Interface Builder
Source Code editor
Hex Editor

Please let me know if any more help is required from our side.

Regards,
Nischal Kumar.
Comment 5 Alan McGovern 2011-09-27 15:23:05 UTC
The issue is that on his system the Xcode editor has a lower priority than the default source code editor, so he ends up using that when he double clicks instead of using the xcode one. I was just looking at the addins to figure out how the bindings are ordered:

// MonoDevelop.Ide
<Extension path = "/MonoDevelop/Ide/DisplayBindings">
	<DisplayBinding 
		id = "TextEditor"
		insertafter ="DefaultDisplayBinding"
		class = "MonoDevelop.SourceEditor.SourceEditorDisplayBinding" />
</Extension>


// MacDev
<Extension path="/MonoDevelop/Ide/DisplayBindings">
	<DisplayBinding id = "InterfaceBuilder"
		insertafter ="DefaultDisplayBinding"
		class = "MonoDevelop.MacDev.XcodeInterfaceBuilderDisplayBinding" />
</Extension>

It looks like the regular source code editor and the xcode one are dependent on the order they're processed in. They both specify they should be inserted after the DefaultDisplayBinding but that means they could be in any order relative to each other. Could this be causing the bug?
Comment 6 Nischal 2011-09-27 15:39:38 UTC
Link to the screencast video : http://www.screencast.com/t/wvsj4Ht1Tv8J
Comment 7 Mikayla Hutchinson [MSFT] 2011-09-27 15:42:30 UTC
Alan: I've made the MacDev addin depend on SourceEditor2 and insert the Xcode binding before the text editor. Could you verify that this works?
Comment 8 Nischal 2011-09-27 15:44:35 UTC
Link to the screencast video : http://www.screencast.com/t/wvsj4Ht1Tv8J
Comment 9 Alan McGovern 2011-09-27 15:46:13 UTC
Michael, we already tried something similar and are rebuilding new packages off it:

        <Extension path="/MonoDevelop/Ide/DisplayBindings">
                <DisplayBinding id = "InterfaceBuilder"
-                       insertafter ="DefaultDisplayBinding"
+                       insertbefore ="DefaultDisplayBinding"
                        class = "MonoDevelop.MacDev.XcodeInterfaceBuilderDisplayBinding" />
        </Extension>
Comment 10 Mikayla Hutchinson [MSFT] 2011-09-27 15:50:18 UTC
I guess that's why my git push bounced then :)
Comment 11 Alan McGovern 2011-09-27 16:19:04 UTC
The issue has been reported as fixed. Phew!
Comment 12 Saurabh 2011-10-10 07:15:14 UTC
Xcode has been launched after clicking on .xib file.it is no longer an issue hence closing.