Page 1 of 1
Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 2:17 pm
by SoulReaper
Hello all
Could Someone please help me and tell me where I am going wrong, I am using Pure Basic 4.51
when I compile it comes up with "Deprecated function CreateGadgetList() Used. ?" Has CreateGadgetList() been removed in 4.51, as I cant seem to find it in 4.51's help
Any help would be welcome.
Thankyou in Advance
Kevin

Re: Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 2:23 pm
by Tenaja
That means it's obsolete, and no longer used. It does not cause an error though--just a warning.
Re: Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 2:26 pm
by gnozal
Purebasic help :
History : "... -
Removed: CreateGadgetList(), now automatically done in OpenWindow() ..."
OpenWindow() : "... #PB_Window_NoGadgets : Prevents the creation of a GadgetList. UseGadgetList() can be used to do this later..."
UseGadgetList() : "... Select the GadgetList window to which gadgets will be added. If there is no GadgetList on this window so far it will be created. (because it was created with the #PB_Window_NoGadgets flag in OpenWindow() or because it is not a PB window)..."
It's only a warning. It has been deprecated since PB4.30 (2008).
Re: Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 2:39 pm
by c4s
It would be a really good idea to add a generic note to the warning message, such as:
Warning! Deprecated function used [Line 1234]: CreateGadgetList()
Solution: Remove the function
Warning! Deprecated function used [Line 4321]: CountList()
Solution: Replace it by ListSize()
This way a lot of questions from new users that try to use old code examples would be solved!
Re: Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 2:48 pm
by SoulReaper
Thankyou all for the quick answers and the History Link
I did have a feeling that was the case.
All the best
Kevin

Re: Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 2:51 pm
by IdeasVacuum
It would be a really good idea to add a generic note to the warning message
Now that is an excellent idea.

Re: Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 6:56 pm
by PMV
c4s wrote:Warning! Deprecated function used [Line 4321]: CountListItems()
Solution: Replace it by ListSize()
i doesn't think that CountListItems() is deprecated
And you should not replace it with ListSize()
i know, you mean CountList(), but you should write it 
Re: Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 7:27 pm
by c4s
@PMV
I corrected the code.
I really like the idea as well, so I'm going to create a feature request for it.
Re: Deprecated function CreateGadgetList() Used. ?
Posted: Wed Aug 10, 2011 7:27 pm
by moogle
c4s wrote:It would be a really good idea to add a generic note to the warning message, such as:
Warning! Deprecated function used [Line 1234]: CreateGadgetList()
Solution: Remove the function
Warning! Deprecated function used [Line 4321]: CountListItems()
Solution: Replace it by ListSize()
This way a lot of questions from new users that try to use old code examples would be solved!
I mentioned something similiar here -
http://www.purebasic.fr/english/viewtopic.php?p=357230#p357230
It would make converting old sources really easy and quick.
Whenever I get those sorts of errors or I get errors of missing functions (old ones) I have to go to the helpfile and search for the name in the history and then go down and see what it was replaced with. It would be much easier if you could just press F1 on it and see a page that tells you what it's replaced with.