I didn't follow the problem from the beginning, but I noticed other
problems with string copying. I.e. StrNCopy(CharPtr dst, CharPtr src, Word
len) (I'm not sure about last 'Word' - I don't have the manual here, but
it would work!) wouldn't work properly unless you declare:
Char dst[]=" "; //leave enough space
CharPtr src;
...
tmp=StrNCopy(dst,src,StrLen(src));
So, when I declare 'CharPtr dst', it doesn't work!
I'm not sure what the real nature of your problem is, but hope this would
help!
Danko Radic
On Tue, 2 Mar 1999, Neil Davidson wrote:
> Hi again,
>
> I'm sorry to still be asking about this but I am at the end of my tether.
>
> I have tried to change the variables of the class to be dynamically
> allocated but this wont work, the code I tried was :
>
> CharPtr name;
> ....
> name = (CharPtr)MemPtrNew(StrLen{in_name));
> StrCpy(name, in_name);
>
> Any ideas why that doesn't work?
>
> I have also changed the array declaration from :
>
> Film filmArray[Max_Film_Num];
>
> to :
>
> Film * filmArray = new Film[Max_Film_Num];
>
> The app still crashes when Max_Film_Num is any greater that 13.
>
> Is there ANYTHING I can do to increase the size of this data structure? I
> have had a look at some DB code and it makes no sense to me, it really is
> a last resort.
>
>
> Thanks again for listening,
>
> Neil
>
>
>