Anyway, I think your allocation is allocating too short buffer for the terget string, maybe you should add some lenght to it, so it could handle longer number strings, since KmyString, doesnt really know if one number takes one character, or more.
what I mean, is that if you say like this: KmyString1().AllocLC();, the KmyString1 lenght can not really be thought to be enough long to accomondate longest integers. Propable the length reserved for numbers is zero or one, and you could have integer that is a lot longer in characters. So just reserve longer buffer for the string.
You could also use function provided by the class to add the data, for examlpe helloHeap->Des().Num(MyInt) and helloHeap->Des().AppendNum(MyInt) could be used to convert numbers into the strings.
I understand it like this:
A buffer on the heap is created with the length of the literal, which has to be put on it (the first three lines).
Then a pointer is created, which gets the adress of the buffer (with buffer->Des()).
With that pointer you can work quite comfortable (Copy(), Format() or Delete()).
When you want to add another string, which might be longer, then increase the buffer with:
bufText1 = bufText1->ReAllocL(KText1().Length() + KText2().Length());
After that the same procedure as mentioned before.
I can advise the method AppendNum(). It's quite convenient for working.
But please note: Always handle your stack with
Otherwise your system will crash.
So that's all for the moment.
If somebody would have a better way for stringhandling, he can append his advantage.