• 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
Unable to make connection in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to make connection in IB


  • Subject: Unable to make connection in IB
  • From: Peter Teeson <email@hidden>
  • Date: Tue, 09 Oct 2012 22:36:40 -0400

Xcode 4.4.1, Lion 10.7.4, desktop app
For some reason the penny hasn't dropped and I need help.

Using BezierPathLab as example code I am trying to make
(0) a Document app
(1) The window has 2 objects (a) an NSColorWell and (b) a Custom View from my sub-class MyView : NSView
(2) MyView.h has IBOutlet NSColorWell *startColorWell; and - (IBAction)changeStartColor:(NSColor *)sender;
(3) I can connect startColorWell as a referencing outlet to the NSColorWell
The Problem
(4) I am not able to connect the NSColorWell itself to the IBAction (Ctl drag) that is in the MyView.h file (i.e. as a selector)
But
(5) If I move the IBAction into the NSDocument.h I can make the connection.
In fact that's what I did to start with and it generated the IBAction definition (as per above).

I understand that NSDocument is not a view (but basically a model+controller).
I understand that the BezierPathLab is not a Document app.

Nevertheless what is it that I am not doing or not understanding about why I am not able to connect the 2 objects
startColorWell and changeStartColor in step (4).

The colorWell is in the window content area and is a view; my Custom View is in the content are.
So I'm thinking I should be able to have the colorWell invoke the changeStartColor method which it does if it's in the Document
(but not if it's in my sub-class).

Apparently not, at least not in the way I've attempted to do it.

As I said… the penny hasn't dropped yet. All I conclude at the moment is that the difference between the BezierPathLab and my app is that mine is a Document app and the Lab is not.

TIA for your help…


 _______________________________________________
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: Unable to make connection in IB
      • From: Fritz Anderson <email@hidden>
    • Re: Unable to make connection in IB
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: What defines if an objective C class is visible outside a bundle?
  • Next by Date: XCode build gets stuck if simultaneously indexing
  • Previous by thread: Re: Xcode went crazy over the weekend...
  • Next by thread: Re: Unable to make connection in IB
  • Index(es):
    • Date
    • Thread