On 27.02.2013 10:42, Luis Garcia Alanis wrote:
Hello guys,

I am trying to compile a project to test NSTextViewDelegate using Project
Center + Gorm.

Since Gorm does not include a proper NSTextView control I used a custom
view and changed its class to NSTextView and that seemed to work.

However when I try to add the <NSTextViewDelegate> to my controller class I
get a build error saying that NSTextViewDelegate is not found.

I went into the header file to find that its only available if:
      #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
So this means I need to add GS_API_LATEST to my project somehow or do I
need to rebuild GNUStep with a special flag to enable GS_API_LATEST?

No, this isn't the problem here. The real issue is that NSTextViewDelegate is not defined as a real protocol. It is just an informal protocol on NSObject. What we need to do is similar to this code from NSControl:

@protocol NSControlTextEditingDelegate <NSObject>
#ifdef __OBJC2__
@optional
#else
@end
@interface NSObject (NSControlTextEditingDelegate)
#endif

We need to make NSTextViewDelegate a proper protocol and make sure it still works with older compilers. I am willing to include such a change after the next release of gui. Please remind me if I forget about it.

Fred

_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to