• 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: nibtool question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nibtool question


  • Subject: Re: nibtool question
  • From: "Timothy J. Wood" <email@hidden>
  • Date: Tue, 12 Feb 2002 14:39:12 -0800

On Tuesday, February 12, 2002, at 01:49 PM, Vince DeMarco wrote:
what specifically do you need to do??? We are planning on making IB scripable in the future. But if you wrote a palette your palette could regenerate a nib file in IB.



Glad you asked :) I just logged this as a feature request (#2859699).

-tim


For many many years people have requested that IB store nibs in a text file format. This is really important, but it clearly has wide ranging impact. First off, the NSArchiver functionality needs to be extended or replaced (I prefer replaced, really) since it doesn't allow you to specify the name of the key you are archiving.

One approach to this encoding would be to have:

<object id="0" class="MyClass" version="92">
<ivar name="someString">
<string>Some string</string>
<ivar name="someObject">
<object id="1"> ... </object>
<ivar name="anotherObject">
<object id="N"/> <!-- an object reference -->
<ivar name="anInt">
<int value="100"/>
<ivar name="aRect">
<rect x="1.0" y="1.0" width="50.0" height="50.0"/>
</object>

The interesting parts:

- Object references ala the XREF spec
- Extensible DTD via some sort of method on the basic archiver/unarchiver class that would allow you to register archive/unarchive components for specific types
- Polymorphic encoding/decoding method on archiver/unarchiver:
[archiver archiveValue: &myRect ofType: SomeHandleToRectEncoder]
- Some extra work would need to be done to ensure that if objects were decoded, modified and reencoded that any objects that survived the process would retain the same object ids (for nice source control)

This would allow for generic object archiving/unarchiving via XML. The main immediate benefits would be that palettes and nibtool wouldn't have any interaction and we could have REAL SOURCE CONTROL OF NIBS!

The last point is extremely important. For 10 years now nib files have been opaque and using 'cvs diff' on them has been pointless. nibtool is a small step but it isn't enough.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • XML-Archiving (Re: nibtool question)
      • From: Marcel Weiher <email@hidden>
References: 
 >Re: nibtool question (From: Vince DeMarco <email@hidden>)

  • Prev by Date: Re: NSDocument: File attributes for backup file?
  • Next by Date: Problem with NSView drawing
  • Previous by thread: Re: nibtool question
  • Next by thread: XML-Archiving (Re: nibtool question)
  • Index(es):
    • Date
    • Thread