call function from one class to another NSTextField stringValue always NULL

Hello,

Objective-C

Calling a function from class A which is located in class B,
within function B I try to pick up some stringValue from multiple NSTextFields (['NSTextField' stringValue]).
The result is always NULL, why?

When the class B function is called directly from within the class B by a button action for example, I can get the stringValue perfectly.


Answered by MacDev001 in 618990022
Finally found the solution myself, just had to make an IBOutlet from class B instead of (instantiate the class B).
Accepted Answer
Finally found the solution myself, just had to make an IBOutlet from class B instead of (instantiate the class B).
call function from one class to another NSTextField stringValue always NULL
 
 
Q