Deprecated function CreateGadgetList() Used. ?

Just starting out? Need help? Post your questions and find answers here.
SoulReaper
Enthusiast
Enthusiast
Posts: 372
Joined: Sun Apr 03, 2005 2:14 am
Location: England

Deprecated function CreateGadgetList() Used. ?

Post 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 :wink:
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Deprecated function CreateGadgetList() Used. ?

Post by Tenaja »

That means it's obsolete, and no longer used. It does not cause an error though--just a warning.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Deprecated function CreateGadgetList() Used. ?

Post 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).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Deprecated function CreateGadgetList() Used. ?

Post 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!
Last edited by c4s on Wed Aug 10, 2011 7:25 pm, edited 1 time in total.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
SoulReaper
Enthusiast
Enthusiast
Posts: 372
Joined: Sun Apr 03, 2005 2:14 am
Location: England

Re: Deprecated function CreateGadgetList() Used. ?

Post by SoulReaper »

Thankyou all for the quick answers and the History Link :wink:

I did have a feeling that was the case.

All the best
Kevin :wink:
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Deprecated function CreateGadgetList() Used. ?

Post by IdeasVacuum »

It would be a really good idea to add a generic note to the warning message
Now that is an excellent idea. 8)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: Deprecated function CreateGadgetList() Used. ?

Post by PMV »

c4s wrote:Warning! Deprecated function used [Line 4321]: CountListItems()
Solution: Replace it by ListSize()
i doesn't think that CountListItems() is deprecated :lol:
And you should not replace it with ListSize() :mrgreen:


i know, you mean CountList(), but you should write it ;-)
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Deprecated function CreateGadgetList() Used. ?

Post 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.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: Deprecated function CreateGadgetList() Used. ?

Post 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.
Image
Post Reply