|
From: | Fred Kiefer |
Subject: | Re: How to compile for NSTextViewDelegate |
Date: | Wed, 27 Feb 2013 22:33:09 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 |
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) #endifWe 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
[Prev in Thread] | Current Thread | [Next in Thread] |