XCode: Segue identifier are not typesafe

Originator:stephan
Number:rdar://11079627 Date Originated:20-Mar-2012 07:00 AM
Status:Open Resolved:
Product:Developer Tools Product Version:4.3.1 (4E1019)
Classification:Enhancement Reproducible:N/A
 
Summary:
This is a similar topic as in Problem ID: 11068891 

If you define your storyboard in xcode  there is no way to automantic sync this segue names with the source code. This is not quite lean and a source for bugs.

Therefore I suggest the following improvement for XCode to support this problem. ->See Notes

Steps to Reproduce:
N/A

Expected Results:
N/A

Actual Results:
Manual changing of the source code if the storyboard is change, specially the segue names.

Regression:
N/A

Notes:

Improvement: It would be very helpfull if xcode generate for the storyboard a class which define all const values (e.g. segue names). 

 This has the following advantages:
- you can refere to a element which just once in the source code model.
- the compiler can realize the structual changes and provide an error if the code is not update correct.
- eventully you save resources because you have to define this string just once.

I expect you find a similar or a more apple style solution for that 

Maybe there is already something similar and i could not find it, in this case please add it in all your default project templates that everybode see it.

Comments

A tidy solution could be for Apple to create something like an IBOutlet that could be used for constants. This would be handy for things like setting view tags and custom nib names etc - having to manually set things in two places is a real overhead that can lead to very hard to debug issues. This would also have the advantage of being scoped to the File's owner to avoid a global config class.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!