Page 1 of 1

IDE - Extend the warning message for deprecated functions

Posted: Wed Aug 10, 2011 7:39 pm
by c4s
Often newbies or users who used an older version of PB etc. come to the forum and ask about the "deprecated function CreateGadgetList()" and similar ones. I just picked out the latest thread as an example: http://www.purebasic.fr/english/viewtop ... 13&t=47147

So my ideas is to extend the warning message with more information about what the user should do to fix the issue. It could look like this:
Warning! Deprecated function used [Line 1234]: CreateGadgetList()
Solution: Remove the function

Warning! Deprecated function used [Line 4321]: CountList()
Solution: Replace it by ListSize()
I think this idea is better than e.g. still listing the old functions in the help file which can lead to confusion. Although you could create an extra "Deprecated Functions" topic about it which simply has a list with the same information as above ("CreateGadgetList() -> Remove" etc.). It would help enormously for quick and easy lookups instead of always having to look at the changelog.

Re: IDE - Extend the warning message for deprecated function

Posted: Wed Aug 10, 2011 9:11 pm
by freak
The 4.60 manual has help pages for deprecated functions. They explain how to replace them.

Re: IDE - Extend the warning message for deprecated function

Posted: Wed Aug 10, 2011 9:26 pm
by c4s
Ok, that's a good approach. However, I wouldn't say it's good to place them in the normal content list (on the far left) because they simply don't belong there anymore.
Of course it's your decision but I think listing them in a separate "Deprecated functions" topic would be the best idea - besides that really short note at the warning itself...

Re: IDE - Extend the warning message for deprecated function

Posted: Wed Aug 10, 2011 9:32 pm
by moogle
freak wrote:The 4.60 manual has help pages for deprecated functions. They explain how to replace them.
Great, this will make old code converting quick and easy :)