• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What is the best way to store some kind of identifying string in an interface builder object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the best way to store some kind of identifying string in an interface builder object?


  • Subject: Re: What is the best way to store some kind of identifying string in an interface builder object?
  • From: Chilton Webb <email@hidden>
  • Date: Fri, 19 Jun 2009 14:35:24 -0500

Hi,

Here's why I'm asking.

Right now I have an app that has a number of possibly different 'objects' in it. And I currently have a single inspector for all of them.
When a new object is selected, the appropriate view for that object is added to the inspector window.


This is a basically okay design.

The problem is that for any new object I add, I have to...
1) Add the object code, which contains all of the names of all of the things I want in it
2) Add the inspector view controller code, which contains all of the same names
3) Add the inspector view xib, which contains zero same names, so I need to physically wire up all of the fields to things with the right names.


If I had a way of tagging the objects by name inside XCode, then I could actually whittle this down to a single object file, that would use the keys found on the objects themselves (title, settings, etc.) as tags for saving/restoring their state from files, as well as knowing what properties to change on the objects. This would eliminate over 80% of the code I currently have to write, and duplicate, for each object. And those object files are HUGE.

This would also mean that to use one of these objects in another app, all the other app would need would be a fairly generic interface to the object.

-Chilton
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: What is the best way to store some kind of identifying string in an interface builder object?
      • From: Graham Cox <email@hidden>
References: 
 >Re: What is the best way to store some kind of identifying string in an interface builder object? (From: Erik Buck <email@hidden>)
 >Re: What is the best way to store some kind of identifying string in an interface builder object? (From: Graham Cox <email@hidden>)
 >Re: What is the best way to store some kind of identifying string in an interface builder object? (From: Erik Buck <email@hidden>)

  • Prev by Date: Re: Basic, but still confuses me (initWithFrame and drawRect)
  • Next by Date: Re: Basic, but still confuses me (initWithFrame and drawRect)
  • Previous by thread: Re: What is the best way to store some kind of identifying string in an interface builder object?
  • Next by thread: Re: What is the best way to store some kind of identifying string in an interface builder object?
  • Index(es):
    • Date
    • Thread