Did you know there are two types of TPtr

Login to reply to this topic.
Sat, 2007-09-22 01:29
Joined: 2006-05-09
Forum posts: 78

How many of you know there are two different types of TPtr? (not TPtr and TPtrC, two different types of TPtr). Not many of you I bet.

I bet there are many other things you don't know about descriptors either, like which type to return from a function and why, how to use HBufC::ReAlloc() properly, why you should pass TDesC by reference and not value etc. etc. etc.

For the first time almost everything you need to know about descriptors is documented in here:

http://www.newlc.com/symbian-os-c-mobile-phones-symbian-press-0


Sat, 2007-09-22 05:01
Joined: 2006-10-07
Forum posts: 131
Re: Did you know there are two types of TPtr

Well, *cough* sometimes it is useful to read the documentation.

Sat, 2007-09-22 20:37
Joined: 2006-05-09
Forum posts: 78
Re: Did you know there are two types of TPtr

Well *cough* I never said descriptors weren't documented, I said they weren't documented fully. Whats in that link is pathetically small.

Sat, 2007-09-22 20:40
Joined: 2005-11-20
Forum posts: 1242
Re: Did you know there are two types of TPtr

Ah, come on. did sysctl-forum say that he thinks that's all there is to descriptors? I don't read his post this way.

And is he a fool because he does not run out to buy that book outright?

I have adviced people several times here that reading a good book about Symbian programming is *the* way for most people to learn it. But I saw no need to call peoples fools and ridicule the SDK documentation as pathetically small.

Now, will bad things happen to me because I continue to march through life without knowing that "two kind of TPtr" thing?


René Brunner

Sat, 2007-09-22 20:42
Joined: 2006-05-09
Forum posts: 78
Re: Did you know there are two types of TPtr

The SDK *is* pathetically inadequate, it documents fuck all.
I was using TPtr as illustration only, I could have used a dozen things which harm will come to you if you don't know about which aren't documented in the SDK.

Sat, 2007-09-22 20:47
Joined: 2005-11-20
Forum posts: 1242
Re: Did you know there are two types of TPtr

Well, yes, I have to agree with you that the SDK documentation leaves a *lot* to be desired, and books like the one you mention are *very* welcome.

But on the other hand, why take it so hard? It's not a matter of life and death, it's only programming, and life can be good despite it...


René Brunner

Mon, 2007-09-24 21:40
Joined: 2007-09-23
Forum posts: 159
Re: Did you know there are two types of TPtr

>>Now, will bad things happen to me because I continue to march through life without knowing that "two kind of TPtr" thing?

Depends upon what you define bad things to be. In some circumstances it can be useful to know that the assignment operators for the two different kinds of TPtr behave differently, thus is you were unaware of that and were assuming certain behaviour would occur with one TPtr because it did with another then bad things could happen.

  • Login to reply to this topic.