Few things I would like to bring in your notice:
You pass
buttonName
andbuttonTitle
but never uses it.You create an object of type
NSButton
but your object name is against the convention, by readingbtnCell
someone will expect it to beNSButtonCell
.In the above code I cant see any reference to the newly created button and even you are not adding it to any view. (I hope in your real Big project you are not missing those.)