Bug 1432 - New xib+controller with same name in different folders have obj-c name collision
Summary: New xib+controller with same name in different folders have obj-c name collision
Status: RESOLVED DUPLICATE of bug 1401
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 2.8
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2011-10-11 18:41 UTC by bryan costanich
Modified: 2013-06-07 12:53 UTC (History)
3 users (show)

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


Attachments
repro solution. (10.91 KB, application/zip)
2011-10-11 18:41 UTC, bryan costanich
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 DUPLICATE of bug 1401

Description bryan costanich 2011-10-11 18:41:20 UTC
Created attachment 675 [details]
repro solution.

Even with the new 2.8 workflow, if you do the following:

1) create new solution
2) add a folder called screens and in it, add two dirs, /iPhone and /iPad
3) in each folder add a new file, called HomeScreen that is based on the iPhone and iPad controller templates (one for each dir).
4) double-click on either .xib file.
5) get duplicate key in dictionary error.

my understanding, is that while this is a limitation in 2.6, it shouldn't be happening in 2.8.
Comment 1 Mikayla Hutchinson [MSFT] 2011-10-11 19:13:10 UTC
This is really the same issue as bug 1401, it simply shows that it's possible to create files with obj-c class names that collide. But we don't actually enforce that classes in new files don't collide with existing files even for C#. It's just more likely to happen for obj-c, because unlike C#, the obj-c name in newly created files isn't namespaced based on the folder name.

The new template system may include collision validation, but even so, it would be nice to reduce risk of collisions by having an option to take the fully qualified C# name into account when generation obj-c namespace. For example, if a template resulting in the fully qualified C# name "Foo.Bar", it could register the Obj-C name "Foo_Bar".

Repurposing to an enhancement for this.
Comment 2 Jeffrey Stedfast 2013-06-07 12:53:16 UTC

*** This bug has been marked as a duplicate of bug 1401 ***