Losing NSTableView object in script

Coming back to ASOC after a long while and finding my feet again.

I have an NSTableView.
It is linked by referencing in IB to a property in a script.
The script has been declared as a custom class in IB using the blue cube.

On awake from nib I get

    on awakeFromNib()

        log pAccountTable
    end awakeFromNib

<NSTableView: 0x100623f90>

When I call another handler in the same script I get:

    on loadDataArray:tRecordArray
        set pDataArray to NSMutableArray's arrayWithArray:tRecordArray
        pAccountTable's reloadData()
    end loadDataArray:

*** +[AccountTableController loadDataArray:]: missing value doesn’t understand the “reloadData” message. (error -1708)

Why is pAccountTable now missing value.

Thanks for any help

Terry

It looks like you’re calling loadDataArray: as a class method on the AccountTableController class, whereas your awakeFromNib() handler suggests pAccountTable belongs to an instance.

Thanks for your reply. When you create a controller with a blue cube is that item an instance method?

If yes and you make a reference by dragging in IB to another pAccountTable:missing value item then I presume that pAccountTable is a reference to the original?

As clear as mud description, he,he

Thanks

Terry

It’s an instance.

That makes a reference, yes.

Your problem is with how/where you call loadDataArray:.

Thanks for the pointer.

I have managed to figure it out.