Le 27/10/2017 à 20:36, Josh Freeman a écrit :
I think you meant to use 'string', not '[NSString string]' - the latter returns an empty string.

stringSize=[[NSString string] sizeWithAttributes:attributes];
  ->
stringSize=[string sizeWithAttributes:attributes];

I introduced  [NSString string] because of this warning at compile time :

GSPanel.m:75:23: warning: 'NSMutableAttributedString' may not respond to
      'sizeWithAttributes:'
   stringSize=[string sizeWithAttributes:attributes];

And the executable doesn't work.


Alternatively, since string's an NSAttributedString:

stringSize=[string sizeWithAttributes:attributes];
  ->
stringSize=[string size];

This works. So simple ! Thanks a lot.

Bertrand

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

Reply via email to