strnew replacement?
strnew replacement?
In D2007, it says that 'strnew' is deprecated. Unfortunately, the help doesn't give any suggestions on what to replace it with.
It's used in lots of the routines here that deal with item tags.
Is there something else to use that's equivalent and not deprecated?
-David
It's used in lots of the routines here that deal with item tags.
Is there something else to use that's equivalent and not deprecated?
-David
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 42
- Joined: Sat Oct 08, 2005 3:56 pm
- Location: The Netherlands
- Contact:
That's funny ... I'm seeing both of them used throughout RV code. (Do a Find In Files for both of 'em and it finds both.) I didn't realize there were both StrNew and NewStr. So if I use StrNew, that's ok?Pieter Zijlstra wrote:This is a little stange AFAIK StrNew is not deprecated but NewStr is. But NewStr is not used in RichView.
-David
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 42
- Joined: Sat Oct 08, 2005 3:56 pm
- Location: The Netherlands
- Contact:
No problem and even NewStr is not a direct problem if you can live with some compiler hints (these can be switched as well).So if I use StrNew, that's ok?
It usually means that it will not be maintained in future versions, but also quite often that there is a (sometimes better) replacement in another unit.
Some functions are depecrated for a couple of versions now and are still present in Delphi's source code.
-
- Posts: 42
- Joined: Sat Oct 08, 2005 3:56 pm
- Location: The Netherlands
- Contact:
True, most of the time I look them up in the source, usually that will give you a hint to look elsewhere or sometimes a comment why it was deprecated and what the new function is (thinking of FileAge at the moment but that one is documented in the help also).
Are you using any deprecated function/procedure at the moment?
Are you using any deprecated function/procedure at the moment?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: