Problem with encodeWithCoder and pointers
Problem with encodeWithCoder and pointers
- Subject: Problem with encodeWithCoder and pointers
- From: dmitri kondrashov <email@hidden>
- Date: Mon, 17 Sep 2001 10:10:55 -0700
I have a problem with a coder encoing a pointer to a structure (or
pointers in a structure), say I have a code:
struct example {
double *f2;
double *f1;
int anInt;
};
struct example *example;
[coder encodeValueOfObjCType:@encode(struct example *) at:example];
At the last line I get:
Sep 17 07:55:30 Data[7453] *** type descriptor error for '^' in
'^{example=^d^di}': unknown type descriptor
It looks like that it is a problem with pointers only, i.e. only if '^'
is present in the type you get from the @encode directive. Can anyone
recommend how to deal with this? Thanks a lot.
Dmitri Kondrashov