Hi, everyone on the list.
I'm facing an issue here and I don't find a solution.
I have a warning compiling the class RikScrollerArrowCell from the
rik theme. I've got two warnings that causes an error with gcc
(without libobjc2) but only one warning and no error with
clang+libobjc2.
Here are the build logs :
with gcc :
RikScrollerArrowCell.m: In function ‘-[RikScrollerArrowCell
drawBezelWithFrame:inView:]’:
RikScrollerArrowCell.m:13:3: warning: ‘RikScrollerArrowCell’ may not
respond to
‘-themeControlState’
GSThemeControlState buttonState = [self themeControlState];
^
RikScrollerArrowCell.m:13:3: warning: (Messages without a matching
method signature
RikScrollerArrowCell.m:13:3: warning: will be assumed to return ‘id’
and accept
RikScrollerArrowCell.m:13:3: warning: ‘...’ as arguments.)
RikScrollerArrowCell.m:13:37: error: incompatible types when
initializing type ‘GSThemeControlState’ using type ‘id’
GSThemeControlState buttonState = [self themeControlState];
^
RikScrollerArrowCell.m:14:3: warning: ‘RikScrollerArrowCell’ may not
respond to
‘-pathForFrame:’
NSBezierPath * path = [self pathForFrame: cellFrame];
^
make[3]: *** [obj/Rik.obj/RikScrollerArrowCell.m.o] Error 1
make[2]: *** [internal-bundle-run-compile-submake] Error 2
make[1]: *** [Rik.all.bundle.variables] Error 2
make: *** [internal-all] Error 2
And with clang+libobjc2 :
Compiling file RikScrollerArrowCell.m ...
RikScrollerArrowCell.m:13:43: warning: instance method
'-themeControlState' not
found (return type defaults to 'id') [-Wobjc-method-access]
GSThemeControlState buttonState = [self themeControlState];
^~~~~~~~~~~~~~~~~
./RikScrollerArrowCell.h:10:12: note: receiver is instance of class
declared here
@interface RikScrollerArrowCell : NSButtonCell
^
RikScrollerArrowCell.m:13:23: warning: incompatible pointer to
integer conversion
initializing 'GSThemeControlState' with an expression of type 'id'
[-Wint-conversion]
GSThemeControlState buttonState = [self themeControlState];
^ ~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
Compiling file NSBrowserCell+Rik.m ...
I don't think it's an objc2 vs objc1 issue. RikScrollerArrowCell is a
NSButtonCell subclass. Should'nt it respond to themeControlState ?
The best would be to get rid of the warning and I don't understand
why it occurs.
Here are attached RikScrollerArrowCell.m and RikScrollerArrowCell.h.
Any idea ?
Bertrand
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep