gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Description method in NSImage


From: Fred Kiefer
Subject: Re: Description method in NSImage
Date: Thu, 26 Dec 2013 13:36:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Thank you, committed.

On 26.12.2013 10:13, Lundberg, Johannes wrote:
> I noticed that the description method is missing in NSImage.
> Here is a patch that adds a description method that will generate an output
> similar to OS X 10.8.
> 
> Useful for debugging with NSLog...
> 
> Index: Source/NSImage.m
> ===================================================================
> --- Source/NSImage.m    (revision 37440)
> +++ Source/NSImage.m    (working copy)
> @@ -461,6 +461,16 @@
>    return NO;
>  }
> 
> +- (NSString*)description
> +{
> +    return [NSString stringWithFormat: @"<%@ %p Name=%@ Size=%@ Reps=%@>",
> +            [self class],
> +            self,
> +            [self name],
> +            NSStringFromSize([self size]),
> +            [self representations]];
> +}
> +
>  /* This methd sets the name of an image, updating the global name
> dictionary
>   * to point to the image (or removing an image from the dictionary if the
>   * new name is nil).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]