How to wire-connect NSTableView/Table View to avoid runtime error “Could not connect action, target class NSObject does not respond to”)Could not connect the action: to target of class NSApplicationCan't CTRL+Drag NSButton to custom NSView headerSwift ViewController does not respond to -getFile, Could not connect action, target classInterfaceBuilder NSButton connect to NSViewController Cause “Could not connect action, target class NSObject does not respond to”Button with IBAction causes “Could not connect action, target class NSNibExternalObjectPlaceholder does not respond to -action” errorbeginSheet method not working for meTarget Action data source update for view based NSTableViewConnect Window Controller Outlet to WindowtextDidChange not called ( NSTextFieldDelegate )NSTableView's delegate receive awakeFromNib message when a row is createdCould not connect the action : to target of class NSApplicationReferencing an NSViewController's view from within an NSWindowController's nib in Interface BuilderNSTableView IBOutlet clickedRow is always -1Button with IBAction causes “Could not connect action, target class NSNibExternalObjectPlaceholder does not respond to -action” errorInterfaceBuilder NSButton connect to NSViewController Cause “Could not connect action, target class NSObject does not respond to”

Can you perfectly wrap a cube with this blocky shape?

Manually select/unselect lines before forwarding to stdout

Too many spies!

Can't update Ubuntu 18.04.2

What is the superlative of ipse?

Why did Spider-Man take a detour to Dorset?

Why does the Earth have a z-component at the start of the J2000 epoch?

Teferi's Time Twist on creature with +1/+1 counter

What are "full piece" and "half piece" in chess?

When does Fisher's "go get more data" approach make sense?

Using print composer name in a label

Project Euler, problem # 9, Pythagorean triplet

Why hasn't the U.S. government paid war reparations to any country it attacked?

I have accepted an internship offer. Should I inform companies I have applied to that have not gotten back to me yet?

Is there a good program to play chess online in ubuntu?

Source of story about the Vilna Gaon and immigration policy

Is this more than a packing puzzle?

What is this old "lemon-squeezer" shaped pan

What do mathematicians mean when they say some conjecture can’t be proven using the current technology?

Was all the fuel expended in each stage of a Saturn V launch?

Why did Steve Rogers choose Sam in Endgame?

I gave my characters names that are exactly like another book. Is it a problem?

Three-dimensional light bulbs

Diminished chord constructed over the tonic degree?



How to wire-connect NSTableView/Table View to avoid runtime error “Could not connect action, target class NSObject does not respond to”)


Could not connect the action: to target of class NSApplicationCan't CTRL+Drag NSButton to custom NSView headerSwift ViewController does not respond to -getFile, Could not connect action, target classInterfaceBuilder NSButton connect to NSViewController Cause “Could not connect action, target class NSObject does not respond to”Button with IBAction causes “Could not connect action, target class NSNibExternalObjectPlaceholder does not respond to -action” errorbeginSheet method not working for meTarget Action data source update for view based NSTableViewConnect Window Controller Outlet to WindowtextDidChange not called ( NSTextFieldDelegate )NSTableView's delegate receive awakeFromNib message when a row is createdCould not connect the action : to target of class NSApplicationReferencing an NSViewController's view from within an NSWindowController's nib in Interface BuilderNSTableView IBOutlet clickedRow is always -1Button with IBAction causes “Could not connect action, target class NSNibExternalObjectPlaceholder does not respond to -action” errorInterfaceBuilder NSButton connect to NSViewController Cause “Could not connect action, target class NSObject does not respond to”






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















In a view-based single-column NSTableView containing a default NSTextField in its Table Cell View, I'm trying to listen to confirmed user edits by connecting the NSTextField's action, within an Interface Builder view of the .xib, to a method in my ViewController for the window. But at run time (during window initialization) I get "Could not connect action, target class NSObject does not respond to -textCellChanged". I don't understand which NSObject is being incorrectly targeted, and I have many other NSViews in the window correctly connected to other outlets and actions in the same WindowController.



I see various other posts with a similar symptom, often also in the context of NSTableView, and have explored the solutions or partial solutions to those other problems in my context without success. Is there any particular magic about wiring Table View Cells in Interface Builder that I am overlooking? Or perhaps phrased differently: how is the target object actually determined at runtime, when the action is simply a class method in the File's Owner (and when does this vary for different controls all wired to the same owner of a common superview)?



Here are some particulars of context:



  • File Owner is set to a subclass of NSWindowController and Module there correctly inherited to my app target.

  • Probably relevant: I am not using Storyboards, and the top-level object in my XIB's outline view hierarchy is a Window (NSPanel), rather than an View or View Controller. The NSWindowController only appears within the XIB as the File Owner (not as its own object in Outline View).

  • In any of the various wiring scenarios I've tried (following), Interface Builder "looks like" the wiring op has succeeded. After wiring, the File Owner's Connections inspector lists the intended connection under Received Actions ("textCellChanged: ... [x] Table View Cell"), along with many other actions connecting components in the NSTableView's superview to other methods in the NSViewController.

  • Likewise, connecting the NSTextField as an OUTLET in the same NSViewController works with no problem. It's only the action (or target/action?? in IB one only sets "action") that fails.

  • The File Owner is also the data source and delegate of the NSTableView, and the NSTextField is set to Action:Send on End of Editing and Behavior:Editable. I don't think any of these are relevant to the particular symptom, which is just a failure to connect an action.

  • The NSWindowController is Swift; I have tried implementing the appropriate action within both the main NSWindowController implementation or in an extension that implements NSTableViewDelegate to no noticeably different effect.

Other posts suggest Xcode bugs in wiring, though in older versions of Xcode (I'm in 10.2). Here are various approaches I've tried, all with similar results:



  • Ctrl+Drag from Table View Cell icon in IB Outline View to NSWindowController source module, targeting there either an existing @IBAction or permitting Xcode to generate a new Connection (type Action, Object: File's Owner) and with it a new method in the ViewController

  • Reverse Drag from Source Code "left-column radio circle" next to an @IBAction to the Table View Cell in Outline View of my .xib

  • Ctrl+Drag from Table View Cell icon (in Outline View) to Placeholder/File's Owner icon, then choosing an appropriate action method from the pop-up list of methods implemented in the view controller.

  • Possibly some others

Finally, here are some related posts and how they differ:



  • This sounds like an identical symptom, but in comments OP claims to have fixed the issue by a combination of setting File Owner to the View Controller (done) and by working around blocking XCode bugs (not visible in my context).


  • This suggests I'm linking to a stale (deleted) method; definitely not the case when I allow Xcode to create the method for me.


  • This unanswered post suggests the user gave up on the situation as an IB bug and gave up in preference for a non-target/action workaround. I suppose I could pursue listening to notifications on the NSTextField as a similar workaround.


  • Finally, the accepted answer to a similar symptom here is that the connection to File Owner is incorrect in that case, where File Owner was the NSApplication object rather than the View Controller. In my case, File Owner is the View Controller object that defines these methods, so feels like the correct target.


Any stone unturned here? Thanks in advance for your help.










share|improve this question
























  • You say "File Owner is set to a subclass of NSWindowController" and "File Owner is the View Controller". Which is correct in the xib and at runtime? The target of the text field must be the delegate of the table view.

    – Willeke
    Mar 26 at 12:55











  • You either renamed your property in code and you forgot that you have dangling pointer in XIB/Storyboard which still has previous property name.

    – Marek H
    Mar 26 at 15:15












  • @MarekH, I don't think so. If I delete my method in source or my wire connection to it in IB, the error vanishes. Per above, the error returns either immediately after I wire-connect to an code-present IBAction or let IB add a new IBAction stub to my routine. In both cases, there's no dangling pointer at connect time. I think the problem is at run time it's trying to wire the present routine to a run-time object different from the target of other similar actions pointing from the same view to the same source object.

    – Nicholas Jackiw
    Mar 30 at 15:07











  • @Willeke, thanks; I meant NSWindowController not ViewController (now fixed above). File Owner in .xib is a custom class, my descendent of NSWindowController. Top-level object in .xib outline view is a Window, custom class my descendent of NSPanel. Window's delegate is File Owner; file owner's "window" outlet is Window. File Owner is also delegate and dataSource of Table View, and target of the received action from Table View Cell (as well as many others). All of these connections work and are functional except the Table View Cell -> File Owner/NSWindowController.

    – Nicholas Jackiw
    Mar 30 at 15:15











  • Do you load rows in the table view during window initialization? Do you call makeView(withIdentifier:owner:)? Which object is the owner?

    – Willeke
    Mar 30 at 22:07

















0















In a view-based single-column NSTableView containing a default NSTextField in its Table Cell View, I'm trying to listen to confirmed user edits by connecting the NSTextField's action, within an Interface Builder view of the .xib, to a method in my ViewController for the window. But at run time (during window initialization) I get "Could not connect action, target class NSObject does not respond to -textCellChanged". I don't understand which NSObject is being incorrectly targeted, and I have many other NSViews in the window correctly connected to other outlets and actions in the same WindowController.



I see various other posts with a similar symptom, often also in the context of NSTableView, and have explored the solutions or partial solutions to those other problems in my context without success. Is there any particular magic about wiring Table View Cells in Interface Builder that I am overlooking? Or perhaps phrased differently: how is the target object actually determined at runtime, when the action is simply a class method in the File's Owner (and when does this vary for different controls all wired to the same owner of a common superview)?



Here are some particulars of context:



  • File Owner is set to a subclass of NSWindowController and Module there correctly inherited to my app target.

  • Probably relevant: I am not using Storyboards, and the top-level object in my XIB's outline view hierarchy is a Window (NSPanel), rather than an View or View Controller. The NSWindowController only appears within the XIB as the File Owner (not as its own object in Outline View).

  • In any of the various wiring scenarios I've tried (following), Interface Builder "looks like" the wiring op has succeeded. After wiring, the File Owner's Connections inspector lists the intended connection under Received Actions ("textCellChanged: ... [x] Table View Cell"), along with many other actions connecting components in the NSTableView's superview to other methods in the NSViewController.

  • Likewise, connecting the NSTextField as an OUTLET in the same NSViewController works with no problem. It's only the action (or target/action?? in IB one only sets "action") that fails.

  • The File Owner is also the data source and delegate of the NSTableView, and the NSTextField is set to Action:Send on End of Editing and Behavior:Editable. I don't think any of these are relevant to the particular symptom, which is just a failure to connect an action.

  • The NSWindowController is Swift; I have tried implementing the appropriate action within both the main NSWindowController implementation or in an extension that implements NSTableViewDelegate to no noticeably different effect.

Other posts suggest Xcode bugs in wiring, though in older versions of Xcode (I'm in 10.2). Here are various approaches I've tried, all with similar results:



  • Ctrl+Drag from Table View Cell icon in IB Outline View to NSWindowController source module, targeting there either an existing @IBAction or permitting Xcode to generate a new Connection (type Action, Object: File's Owner) and with it a new method in the ViewController

  • Reverse Drag from Source Code "left-column radio circle" next to an @IBAction to the Table View Cell in Outline View of my .xib

  • Ctrl+Drag from Table View Cell icon (in Outline View) to Placeholder/File's Owner icon, then choosing an appropriate action method from the pop-up list of methods implemented in the view controller.

  • Possibly some others

Finally, here are some related posts and how they differ:



  • This sounds like an identical symptom, but in comments OP claims to have fixed the issue by a combination of setting File Owner to the View Controller (done) and by working around blocking XCode bugs (not visible in my context).


  • This suggests I'm linking to a stale (deleted) method; definitely not the case when I allow Xcode to create the method for me.


  • This unanswered post suggests the user gave up on the situation as an IB bug and gave up in preference for a non-target/action workaround. I suppose I could pursue listening to notifications on the NSTextField as a similar workaround.


  • Finally, the accepted answer to a similar symptom here is that the connection to File Owner is incorrect in that case, where File Owner was the NSApplication object rather than the View Controller. In my case, File Owner is the View Controller object that defines these methods, so feels like the correct target.


Any stone unturned here? Thanks in advance for your help.










share|improve this question
























  • You say "File Owner is set to a subclass of NSWindowController" and "File Owner is the View Controller". Which is correct in the xib and at runtime? The target of the text field must be the delegate of the table view.

    – Willeke
    Mar 26 at 12:55











  • You either renamed your property in code and you forgot that you have dangling pointer in XIB/Storyboard which still has previous property name.

    – Marek H
    Mar 26 at 15:15












  • @MarekH, I don't think so. If I delete my method in source or my wire connection to it in IB, the error vanishes. Per above, the error returns either immediately after I wire-connect to an code-present IBAction or let IB add a new IBAction stub to my routine. In both cases, there's no dangling pointer at connect time. I think the problem is at run time it's trying to wire the present routine to a run-time object different from the target of other similar actions pointing from the same view to the same source object.

    – Nicholas Jackiw
    Mar 30 at 15:07











  • @Willeke, thanks; I meant NSWindowController not ViewController (now fixed above). File Owner in .xib is a custom class, my descendent of NSWindowController. Top-level object in .xib outline view is a Window, custom class my descendent of NSPanel. Window's delegate is File Owner; file owner's "window" outlet is Window. File Owner is also delegate and dataSource of Table View, and target of the received action from Table View Cell (as well as many others). All of these connections work and are functional except the Table View Cell -> File Owner/NSWindowController.

    – Nicholas Jackiw
    Mar 30 at 15:15











  • Do you load rows in the table view during window initialization? Do you call makeView(withIdentifier:owner:)? Which object is the owner?

    – Willeke
    Mar 30 at 22:07













0












0








0








In a view-based single-column NSTableView containing a default NSTextField in its Table Cell View, I'm trying to listen to confirmed user edits by connecting the NSTextField's action, within an Interface Builder view of the .xib, to a method in my ViewController for the window. But at run time (during window initialization) I get "Could not connect action, target class NSObject does not respond to -textCellChanged". I don't understand which NSObject is being incorrectly targeted, and I have many other NSViews in the window correctly connected to other outlets and actions in the same WindowController.



I see various other posts with a similar symptom, often also in the context of NSTableView, and have explored the solutions or partial solutions to those other problems in my context without success. Is there any particular magic about wiring Table View Cells in Interface Builder that I am overlooking? Or perhaps phrased differently: how is the target object actually determined at runtime, when the action is simply a class method in the File's Owner (and when does this vary for different controls all wired to the same owner of a common superview)?



Here are some particulars of context:



  • File Owner is set to a subclass of NSWindowController and Module there correctly inherited to my app target.

  • Probably relevant: I am not using Storyboards, and the top-level object in my XIB's outline view hierarchy is a Window (NSPanel), rather than an View or View Controller. The NSWindowController only appears within the XIB as the File Owner (not as its own object in Outline View).

  • In any of the various wiring scenarios I've tried (following), Interface Builder "looks like" the wiring op has succeeded. After wiring, the File Owner's Connections inspector lists the intended connection under Received Actions ("textCellChanged: ... [x] Table View Cell"), along with many other actions connecting components in the NSTableView's superview to other methods in the NSViewController.

  • Likewise, connecting the NSTextField as an OUTLET in the same NSViewController works with no problem. It's only the action (or target/action?? in IB one only sets "action") that fails.

  • The File Owner is also the data source and delegate of the NSTableView, and the NSTextField is set to Action:Send on End of Editing and Behavior:Editable. I don't think any of these are relevant to the particular symptom, which is just a failure to connect an action.

  • The NSWindowController is Swift; I have tried implementing the appropriate action within both the main NSWindowController implementation or in an extension that implements NSTableViewDelegate to no noticeably different effect.

Other posts suggest Xcode bugs in wiring, though in older versions of Xcode (I'm in 10.2). Here are various approaches I've tried, all with similar results:



  • Ctrl+Drag from Table View Cell icon in IB Outline View to NSWindowController source module, targeting there either an existing @IBAction or permitting Xcode to generate a new Connection (type Action, Object: File's Owner) and with it a new method in the ViewController

  • Reverse Drag from Source Code "left-column radio circle" next to an @IBAction to the Table View Cell in Outline View of my .xib

  • Ctrl+Drag from Table View Cell icon (in Outline View) to Placeholder/File's Owner icon, then choosing an appropriate action method from the pop-up list of methods implemented in the view controller.

  • Possibly some others

Finally, here are some related posts and how they differ:



  • This sounds like an identical symptom, but in comments OP claims to have fixed the issue by a combination of setting File Owner to the View Controller (done) and by working around blocking XCode bugs (not visible in my context).


  • This suggests I'm linking to a stale (deleted) method; definitely not the case when I allow Xcode to create the method for me.


  • This unanswered post suggests the user gave up on the situation as an IB bug and gave up in preference for a non-target/action workaround. I suppose I could pursue listening to notifications on the NSTextField as a similar workaround.


  • Finally, the accepted answer to a similar symptom here is that the connection to File Owner is incorrect in that case, where File Owner was the NSApplication object rather than the View Controller. In my case, File Owner is the View Controller object that defines these methods, so feels like the correct target.


Any stone unturned here? Thanks in advance for your help.










share|improve this question
















In a view-based single-column NSTableView containing a default NSTextField in its Table Cell View, I'm trying to listen to confirmed user edits by connecting the NSTextField's action, within an Interface Builder view of the .xib, to a method in my ViewController for the window. But at run time (during window initialization) I get "Could not connect action, target class NSObject does not respond to -textCellChanged". I don't understand which NSObject is being incorrectly targeted, and I have many other NSViews in the window correctly connected to other outlets and actions in the same WindowController.



I see various other posts with a similar symptom, often also in the context of NSTableView, and have explored the solutions or partial solutions to those other problems in my context without success. Is there any particular magic about wiring Table View Cells in Interface Builder that I am overlooking? Or perhaps phrased differently: how is the target object actually determined at runtime, when the action is simply a class method in the File's Owner (and when does this vary for different controls all wired to the same owner of a common superview)?



Here are some particulars of context:



  • File Owner is set to a subclass of NSWindowController and Module there correctly inherited to my app target.

  • Probably relevant: I am not using Storyboards, and the top-level object in my XIB's outline view hierarchy is a Window (NSPanel), rather than an View or View Controller. The NSWindowController only appears within the XIB as the File Owner (not as its own object in Outline View).

  • In any of the various wiring scenarios I've tried (following), Interface Builder "looks like" the wiring op has succeeded. After wiring, the File Owner's Connections inspector lists the intended connection under Received Actions ("textCellChanged: ... [x] Table View Cell"), along with many other actions connecting components in the NSTableView's superview to other methods in the NSViewController.

  • Likewise, connecting the NSTextField as an OUTLET in the same NSViewController works with no problem. It's only the action (or target/action?? in IB one only sets "action") that fails.

  • The File Owner is also the data source and delegate of the NSTableView, and the NSTextField is set to Action:Send on End of Editing and Behavior:Editable. I don't think any of these are relevant to the particular symptom, which is just a failure to connect an action.

  • The NSWindowController is Swift; I have tried implementing the appropriate action within both the main NSWindowController implementation or in an extension that implements NSTableViewDelegate to no noticeably different effect.

Other posts suggest Xcode bugs in wiring, though in older versions of Xcode (I'm in 10.2). Here are various approaches I've tried, all with similar results:



  • Ctrl+Drag from Table View Cell icon in IB Outline View to NSWindowController source module, targeting there either an existing @IBAction or permitting Xcode to generate a new Connection (type Action, Object: File's Owner) and with it a new method in the ViewController

  • Reverse Drag from Source Code "left-column radio circle" next to an @IBAction to the Table View Cell in Outline View of my .xib

  • Ctrl+Drag from Table View Cell icon (in Outline View) to Placeholder/File's Owner icon, then choosing an appropriate action method from the pop-up list of methods implemented in the view controller.

  • Possibly some others

Finally, here are some related posts and how they differ:



  • This sounds like an identical symptom, but in comments OP claims to have fixed the issue by a combination of setting File Owner to the View Controller (done) and by working around blocking XCode bugs (not visible in my context).


  • This suggests I'm linking to a stale (deleted) method; definitely not the case when I allow Xcode to create the method for me.


  • This unanswered post suggests the user gave up on the situation as an IB bug and gave up in preference for a non-target/action workaround. I suppose I could pursue listening to notifications on the NSTextField as a similar workaround.


  • Finally, the accepted answer to a similar symptom here is that the connection to File Owner is incorrect in that case, where File Owner was the NSApplication object rather than the View Controller. In my case, File Owner is the View Controller object that defines these methods, so feels like the correct target.


Any stone unturned here? Thanks in advance for your help.







macos cocoa interface-builder






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 30 at 15:19







Nicholas Jackiw

















asked Mar 26 at 7:24









Nicholas JackiwNicholas Jackiw

104 bronze badges




104 bronze badges












  • You say "File Owner is set to a subclass of NSWindowController" and "File Owner is the View Controller". Which is correct in the xib and at runtime? The target of the text field must be the delegate of the table view.

    – Willeke
    Mar 26 at 12:55











  • You either renamed your property in code and you forgot that you have dangling pointer in XIB/Storyboard which still has previous property name.

    – Marek H
    Mar 26 at 15:15












  • @MarekH, I don't think so. If I delete my method in source or my wire connection to it in IB, the error vanishes. Per above, the error returns either immediately after I wire-connect to an code-present IBAction or let IB add a new IBAction stub to my routine. In both cases, there's no dangling pointer at connect time. I think the problem is at run time it's trying to wire the present routine to a run-time object different from the target of other similar actions pointing from the same view to the same source object.

    – Nicholas Jackiw
    Mar 30 at 15:07











  • @Willeke, thanks; I meant NSWindowController not ViewController (now fixed above). File Owner in .xib is a custom class, my descendent of NSWindowController. Top-level object in .xib outline view is a Window, custom class my descendent of NSPanel. Window's delegate is File Owner; file owner's "window" outlet is Window. File Owner is also delegate and dataSource of Table View, and target of the received action from Table View Cell (as well as many others). All of these connections work and are functional except the Table View Cell -> File Owner/NSWindowController.

    – Nicholas Jackiw
    Mar 30 at 15:15











  • Do you load rows in the table view during window initialization? Do you call makeView(withIdentifier:owner:)? Which object is the owner?

    – Willeke
    Mar 30 at 22:07

















  • You say "File Owner is set to a subclass of NSWindowController" and "File Owner is the View Controller". Which is correct in the xib and at runtime? The target of the text field must be the delegate of the table view.

    – Willeke
    Mar 26 at 12:55











  • You either renamed your property in code and you forgot that you have dangling pointer in XIB/Storyboard which still has previous property name.

    – Marek H
    Mar 26 at 15:15












  • @MarekH, I don't think so. If I delete my method in source or my wire connection to it in IB, the error vanishes. Per above, the error returns either immediately after I wire-connect to an code-present IBAction or let IB add a new IBAction stub to my routine. In both cases, there's no dangling pointer at connect time. I think the problem is at run time it's trying to wire the present routine to a run-time object different from the target of other similar actions pointing from the same view to the same source object.

    – Nicholas Jackiw
    Mar 30 at 15:07











  • @Willeke, thanks; I meant NSWindowController not ViewController (now fixed above). File Owner in .xib is a custom class, my descendent of NSWindowController. Top-level object in .xib outline view is a Window, custom class my descendent of NSPanel. Window's delegate is File Owner; file owner's "window" outlet is Window. File Owner is also delegate and dataSource of Table View, and target of the received action from Table View Cell (as well as many others). All of these connections work and are functional except the Table View Cell -> File Owner/NSWindowController.

    – Nicholas Jackiw
    Mar 30 at 15:15











  • Do you load rows in the table view during window initialization? Do you call makeView(withIdentifier:owner:)? Which object is the owner?

    – Willeke
    Mar 30 at 22:07
















You say "File Owner is set to a subclass of NSWindowController" and "File Owner is the View Controller". Which is correct in the xib and at runtime? The target of the text field must be the delegate of the table view.

– Willeke
Mar 26 at 12:55





You say "File Owner is set to a subclass of NSWindowController" and "File Owner is the View Controller". Which is correct in the xib and at runtime? The target of the text field must be the delegate of the table view.

– Willeke
Mar 26 at 12:55













You either renamed your property in code and you forgot that you have dangling pointer in XIB/Storyboard which still has previous property name.

– Marek H
Mar 26 at 15:15






You either renamed your property in code and you forgot that you have dangling pointer in XIB/Storyboard which still has previous property name.

– Marek H
Mar 26 at 15:15














@MarekH, I don't think so. If I delete my method in source or my wire connection to it in IB, the error vanishes. Per above, the error returns either immediately after I wire-connect to an code-present IBAction or let IB add a new IBAction stub to my routine. In both cases, there's no dangling pointer at connect time. I think the problem is at run time it's trying to wire the present routine to a run-time object different from the target of other similar actions pointing from the same view to the same source object.

– Nicholas Jackiw
Mar 30 at 15:07





@MarekH, I don't think so. If I delete my method in source or my wire connection to it in IB, the error vanishes. Per above, the error returns either immediately after I wire-connect to an code-present IBAction or let IB add a new IBAction stub to my routine. In both cases, there's no dangling pointer at connect time. I think the problem is at run time it's trying to wire the present routine to a run-time object different from the target of other similar actions pointing from the same view to the same source object.

– Nicholas Jackiw
Mar 30 at 15:07













@Willeke, thanks; I meant NSWindowController not ViewController (now fixed above). File Owner in .xib is a custom class, my descendent of NSWindowController. Top-level object in .xib outline view is a Window, custom class my descendent of NSPanel. Window's delegate is File Owner; file owner's "window" outlet is Window. File Owner is also delegate and dataSource of Table View, and target of the received action from Table View Cell (as well as many others). All of these connections work and are functional except the Table View Cell -> File Owner/NSWindowController.

– Nicholas Jackiw
Mar 30 at 15:15





@Willeke, thanks; I meant NSWindowController not ViewController (now fixed above). File Owner in .xib is a custom class, my descendent of NSWindowController. Top-level object in .xib outline view is a Window, custom class my descendent of NSPanel. Window's delegate is File Owner; file owner's "window" outlet is Window. File Owner is also delegate and dataSource of Table View, and target of the received action from Table View Cell (as well as many others). All of these connections work and are functional except the Table View Cell -> File Owner/NSWindowController.

– Nicholas Jackiw
Mar 30 at 15:15













Do you load rows in the table view during window initialization? Do you call makeView(withIdentifier:owner:)? Which object is the owner?

– Willeke
Mar 30 at 22:07





Do you load rows in the table view during window initialization? Do you call makeView(withIdentifier:owner:)? Which object is the owner?

– Willeke
Mar 30 at 22:07












1 Answer
1






active

oldest

votes


















0














The file's owner in a xib file is a placeholder object representing the owner of the nib and representing the owner object passed to makeView(withIdentifier:owner:). Pass the owner of the nib (usually the view controller or window controller) to makeView(withIdentifier:owner:).






share|improve this answer























  • This was my problem -- I was passing nil rather than self when calling makeView() from within my NSWindowController/NSTableViewDelegate, so failing to receive the magic connectivity framework default initializers grant to typical View objects in NIBs objects but not to those which are only templates for views you "make" yourself. Thank you, @Willeke!

    – Nicholas Jackiw
    Apr 4 at 7:14











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351749%2fhow-to-wire-connect-nstableview-table-view-to-avoid-runtime-error-could-not-con%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














The file's owner in a xib file is a placeholder object representing the owner of the nib and representing the owner object passed to makeView(withIdentifier:owner:). Pass the owner of the nib (usually the view controller or window controller) to makeView(withIdentifier:owner:).






share|improve this answer























  • This was my problem -- I was passing nil rather than self when calling makeView() from within my NSWindowController/NSTableViewDelegate, so failing to receive the magic connectivity framework default initializers grant to typical View objects in NIBs objects but not to those which are only templates for views you "make" yourself. Thank you, @Willeke!

    – Nicholas Jackiw
    Apr 4 at 7:14
















0














The file's owner in a xib file is a placeholder object representing the owner of the nib and representing the owner object passed to makeView(withIdentifier:owner:). Pass the owner of the nib (usually the view controller or window controller) to makeView(withIdentifier:owner:).






share|improve this answer























  • This was my problem -- I was passing nil rather than self when calling makeView() from within my NSWindowController/NSTableViewDelegate, so failing to receive the magic connectivity framework default initializers grant to typical View objects in NIBs objects but not to those which are only templates for views you "make" yourself. Thank you, @Willeke!

    – Nicholas Jackiw
    Apr 4 at 7:14














0












0








0







The file's owner in a xib file is a placeholder object representing the owner of the nib and representing the owner object passed to makeView(withIdentifier:owner:). Pass the owner of the nib (usually the view controller or window controller) to makeView(withIdentifier:owner:).






share|improve this answer













The file's owner in a xib file is a placeholder object representing the owner of the nib and representing the owner object passed to makeView(withIdentifier:owner:). Pass the owner of the nib (usually the view controller or window controller) to makeView(withIdentifier:owner:).







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 2 at 13:56









WillekeWilleke

8,6272 gold badges10 silver badges26 bronze badges




8,6272 gold badges10 silver badges26 bronze badges












  • This was my problem -- I was passing nil rather than self when calling makeView() from within my NSWindowController/NSTableViewDelegate, so failing to receive the magic connectivity framework default initializers grant to typical View objects in NIBs objects but not to those which are only templates for views you "make" yourself. Thank you, @Willeke!

    – Nicholas Jackiw
    Apr 4 at 7:14


















  • This was my problem -- I was passing nil rather than self when calling makeView() from within my NSWindowController/NSTableViewDelegate, so failing to receive the magic connectivity framework default initializers grant to typical View objects in NIBs objects but not to those which are only templates for views you "make" yourself. Thank you, @Willeke!

    – Nicholas Jackiw
    Apr 4 at 7:14

















This was my problem -- I was passing nil rather than self when calling makeView() from within my NSWindowController/NSTableViewDelegate, so failing to receive the magic connectivity framework default initializers grant to typical View objects in NIBs objects but not to those which are only templates for views you "make" yourself. Thank you, @Willeke!

– Nicholas Jackiw
Apr 4 at 7:14






This was my problem -- I was passing nil rather than self when calling makeView() from within my NSWindowController/NSTableViewDelegate, so failing to receive the magic connectivity framework default initializers grant to typical View objects in NIBs objects but not to those which are only templates for views you "make" yourself. Thank you, @Willeke!

– Nicholas Jackiw
Apr 4 at 7:14









Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351749%2fhow-to-wire-connect-nstableview-table-view-to-avoid-runtime-error-could-not-con%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript