• 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: Interface Builder plug-in 'chicken and egg' problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interface Builder plug-in 'chicken and egg' problem


  • Subject: Re: Interface Builder plug-in 'chicken and egg' problem
  • From: Cathy Shive <email@hidden>
  • Date: Tue, 11 Nov 2008 13:43:39 +0100

Hi, 

It was suggested to me that I use a custom NSView in the inspector and set its class to KTGradientPicker.  This works great and now my Plugin builds on the first go. 

But I still have the same problem in another Xcode project that has .xib files that use my plug-in.  

Basically, I want to share a project that uses my plug-in in its .xib files.  I expect that the other person can build and run from Xcode with no problem and that when they try to open the .xib files, then they'll get an error from Interface Builder telling them that they need to install the plug-in. 

This is how it works with .nib files, right?  I still have old .nibs that use old IB2 palettes that don't even exist anymore.  The Xcode project they're used in doesn't care at all.  I just can't open them in Interface Builder.

Why does Xcode try to compile .xib files ( CompileXIB)instead of just copying the file into the resources directory like it does with .nib files?  Is there something I can do to prevent that part of the build?

I'm simply trying to avoid making people install the framework and plugin just to run the project.  It makes sense that they would have to do that if they want to look at the .xibs in IB, but not just to build the Xcode project without errors. 

Thanks,
Cathy

On Nov 11, 2008, at 12:02 PM, Cathy Shive wrote:

Hello,

This problem is a little difficult for me to describe, so please bear with me :)

I made an Interface Builder plugin that includes a library object for an NSView subclass, KTView.  KTView uses an IBInspector  with an xib file called KTStyleInspector.  

I then made a new control called KTGradientPicker.  KTGradientPicker is a subclass of KTView.  I also made a library object for KTGradientPicker and added it to my plug-in.

The problem is that I use the KTGradientPicker control in the KTStyleInspector xib file - so it seems that I have created a bit of a "chicken and egg" problem.  When I do a clean build in Xcode, the Plug-in target gives me an error:

CompileXIB /Volumes/Data/KATI/_KTUIKit/KTUIKit/English.lproj/KTStyleInspector.xib
    cd /Volumes/Data/KATI/_KTUIKit/KTUIKit
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /KTUIKit/build/Release/KTUIKitFramework.framework/Resources/KTUIKit.ibplugin/Contents/Resources/English.lproj/KTStyleInspector.nib /KTUIKit/English.lproj/KTStyleInspector.xib
/* com.apple.ibtool.errors */
Internal Error:
Description: Unable to resolve plug-in dependency for "KTStyleInspector.xib".
Recovery Suggestion: Locate the com.KATI.KTUIKit Interface Builder plug-in to continue opening this document. Consider using the --plugin option or Interface Builder's plug-in preferences to resolve this dependency.


Now, immediately after I get this error, I build again, everything is fine and I see this in Xcode's Build Results:

CompileXIB /Volumes/Data/KATI/_KTUIKit/KTUIKit/English.lproj/KTStyleInspector.xib
    cd /Volumes/Data/KATI/_KTUIKit/KTUIKit
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Volumes/Data/KATI/_KTUIKit/KTUIKit/build/Release/KTUIKitFramework.framework/Resources/KTUIKit.ibplugin/Contents/Resources/English.lproj/KTStyleInspector.nib /Volumes/Data/KATI/_KTUIKit/KTUIKit/English.lproj/KTStyleInspector.xib
/* com.apple.ibtool.document.notices */
/KTUIKit/English.lproj/KTStyleInspector.xib:114: note: This view overlaps one of its siblings.
/KTUIKit/English.lproj/KTStyleInspector.xib:239: note: This view overlaps one of its siblings.
/KTUIKit/English.lproj/KTStyleInspector.xib:239: note: This view is clipping its content.

Touch /KTUIKit/build/Release/KTUIKitFramework.framework/Resources//KTUIKit.ibplugin
    cd /KTUIKit
    /usr/bin/touch -c /KTUIKit/build/Release/KTUIKitFramework.framework/Resources//KTUIKit.ibplugin


This *kind of* makes sense to me, but I'm still confused. 

I guess that the first time around, XCode is looking for the plugin that is being used in the KTStyleInspector.xib file, but It's the very plug-in that it's trying to build.  When I ask it to build again, it has some reference to that plug-in now, so there's no more error. 

Is there any way for me to get this to build correctly?  Would it make a difference if I were to use a .nib file for that inspector inspead of an .xib?

I hope any of this makes sense, I'd be glad to clarify anything if it doesn't. 

Thanks,
Cathy



 




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Interface Builder plug-in 'chicken and egg' problem
      • From: "Jack Nutting" <email@hidden>
References: 
 >Interface Builder plug-in 'chicken and egg' problem (From: Cathy Shive <email@hidden>)

  • Prev by Date: Interface Builder plug-in 'chicken and egg' problem
  • Next by Date: Re: Interface Builder plug-in 'chicken and egg' problem
  • Previous by thread: Interface Builder plug-in 'chicken and egg' problem
  • Next by thread: Re: Interface Builder plug-in 'chicken and egg' problem
  • Index(es):
    • Date
    • Thread