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

Re: nibtool output


  • Subject: Re: nibtool output
  • From: Michael McCracken <email@hidden>
  • Date: Fri, 24 Jun 2005 19:58:54 -0700

On 6/24/05, Dave Rehring <email@hidden> wrote:
> On 6/24/05 5:22 PM, Michael McCracken at email@hidden wrote:
>
> > Hi, I wanted to write a quick script to grab the output of nibtool -jx
> > and turn it into a more readable display of what bindings exist in a
> > nib, but I ran into a snag: nibtool's output isn't always quite a
> > correct property list.
>
> Are you sure the nibtool output has all the info you need?
>
> I would probably first look at saving the nib files with the 'use text
> format' option selected, then reverse-engineering the xml file from that.

nibtool has what I want, yes - for example: the following three dicts
show a binding connection that is set up between obj 212, a
treecontroller and obj 294, a text field. I just want to munge this
output a bit, displaying the classes, the object names and the
keypaths for the bindings...

    "Connection 329" = {
        Binding = "displayPatternValue1";
        Class = "NSNibBindingConnector";
        Controller = "212";
        KeyPath = "selection.isRoot";
        Label = "displayPatternValue1: selection.isRoot";
        Object = "294";
        Options = {
            NSDisplayPattern = "selection is root? %{value1}@
%{value2}@ with %{value3}@";
            NSMultipleValuesPlaceholder = "multiple values are selected!";
            NSNoSelectionPlaceholder = "no selection";
            NSNotApplicablePlaceholder = "n/a";
            NSNullPlaceholder = "null!";
        };
    };

"Object 212" = {
        Class = "NSTreeController";
        CustomClass = "BDSKSourceListTreeController";
        Name = "SourceListTreeController";
        automaticallyPreparesContent = "1";
        childrenKeyPath = "children";
        countKeyPath = "<null>";
        entityName = "Container";
        iBDeclaredKeys = "(
            title,
            "entity.name",
            name,
            isRoot,
            publications,
            "@count.publications",
            "@distinctUnionOfArrays.publications",
            "children.name"
        )";
        iBNSObjectControllerMode = "1";
        iBObjectClassName = "NSDictionary";
        isEditable = "1";
        leafKeyPath = "<null>";
    };

  "Object 294" = {
        Class = "NSTextField";
        Name = "NSTextField1";
        alignment = "4";
        autoresizingMask = "10";
        backgroundColor = "NSNamedColorSpace System controlColor";
        bezelStyle = "0";
        continuous = "0";
        controlSize = "0";
        drawsBackground = "0";
        editable = "0";
        enabled = "1";
        focusRingType = "0";
        font = "{name = Small System Font; pointSize = 11}";
        frameRect = "{{153, 636}, {323, 14}}";
        groupedIBObjectID = "<null>";
        iBBorderType = "0";
        isHidden = "0";
        isLockedIBObject = "0";
        scrollable = "0";
        sendsActionOnEndEditing = "1";
        stringValue = "Small System Font Text";
        tag = "0";
        textColor = "NSNamedColorSpace System controlTextColor";
        wraps = "1";
    };

The XML format is a lot less straightforward, and as far as I can
tell, undocumented. I was really hoping for a quicker solution.

Thanks,
-mike

--
Michael McCracken
UCSD CSE PhD Student
San Diego Supercomputer Center
http://www.cse.ucsd.edu/~mmccrack/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >nibtool output (From: Michael McCracken <email@hidden>)
 >Re: nibtool output (From: Dave Rehring <email@hidden>)

  • Prev by Date: Re: (Inverse) relationship lost after being set properly
  • Next by Date: Re: Why isn't my app showing up in launched applications
  • Previous by thread: Re: nibtool output
  • Next by thread: Class clusters - infinite loop?
  • Index(es):
    • Date
    • Thread