mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Improved -description writing/reading. Bug fixes to NSString.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2429 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
21039e770f
commit
b6e22efb49
10 changed files with 139 additions and 44 deletions
|
@ -90,17 +90,17 @@
|
|||
- (NSString *) description
|
||||
{
|
||||
#if TYPE_ORDER == 0
|
||||
return [NSString stringWithFormat: @"{object = %@}", [data description]];
|
||||
return [NSString stringWithFormat: @"{object = %@;}", [data description]];
|
||||
#elif TYPE_ORDER == 1
|
||||
return [NSString stringWithFormat: @"{x = %g; y = %g}", data.x, data.y];
|
||||
return [NSString stringWithFormat: @"{x = %g; y = %g;}", data.x, data.y];
|
||||
#elif TYPE_ORDER == 2
|
||||
return [NSString stringWithFormat: @"{pointer = %p}", data];
|
||||
return [NSString stringWithFormat: @"{pointer = %p;}", data];
|
||||
#elif TYPE_ORDER == 3
|
||||
return [NSString stringWithFormat:
|
||||
@"{x = %g; y = %g; width = %g; height = %g}", NSMinX(data), NSMinY(data),
|
||||
@"{x = %g; y = %g; width = %g; height = %g;}", NSMinX(data), NSMinY(data),
|
||||
NSWidth(data), NSHeight(data)];
|
||||
#elif TYPE_ORDER == 4
|
||||
return [NSString stringWithFormat: @"{width = %g; height = %g}",
|
||||
return [NSString stringWithFormat: @"{width = %g; height = %g;}",
|
||||
data.width, data.height];
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue