Does anyone have experience over-riding the NSArray's description method?
I'm doing something like this:
NSLog (@"%@", myNSArray);
And it's printing something like this:
(
(
A,
B
),
(
C,
D
)
)
where A, B, C, and D are the entries of my 2x2 array.
The problem is that I'm going to input this array into Mathematica. I would like this to print with curly braces instead -- something like this:
{
{
A,
B
},
{
C,
D
}
}
would be fine.
Problem two: A, B, C, and D are actually NSStrings. I'm getting this:
(
(
"stringA",
"stringB"
),
(
"stringC",
"stringD"
)
)
The entries are fractions and I'm representing them with strings. I guess I could either find a way to tell description to print my NSString without double-quotes or I could just declare a Fraction object and build my own description there. Any ideas?
I'm doing something like this:
NSLog (@"%@", myNSArray);
And it's printing something like this:
(
(
A,
B
),
(
C,
D
)
)
where A, B, C, and D are the entries of my 2x2 array.
The problem is that I'm going to input this array into Mathematica. I would like this to print with curly braces instead -- something like this:
{
{
A,
B
},
{
C,
D
}
}
would be fine.
Problem two: A, B, C, and D are actually NSStrings. I'm getting this:
(
(
"stringA",
"stringB"
),
(
"stringC",
"stringD"
)
)
The entries are fractions and I'm representing them with strings. I guess I could either find a way to tell description to print my NSString without double-quotes or I could just declare a Fraction object and build my own description there. Any ideas?