getDataProviderID()

Q&A regarding installation and issues getting started with Servoy

getDataProviderID()

Postby harbourj » Thu Dec 12, 2024 8:06 pm

Ouch. The time I've just wasted calling a function getDataProviderId() to get the dataProviderId of an element.

And all because someone misspelt it many years ago! Can I suggest creating a second function getDataProviderId() to save future newbies from tripping over this?

Regards

John
harbourj
 
Posts: 13
Joined: Thu Nov 30, 2023 10:56 am

Re: getDataProviderID()

Postby mboegem » Fri Dec 13, 2024 10:23 am

Do you mean capital D in ID? That's pretty common.
Just use autocompletion and it won't trick you again.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1817
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: getDataProviderID()

Postby harbourj » Fri Dec 13, 2024 11:36 am

I agree it's pretty common, but calling the property dataProviderId and the function dataProviderID() is poor form in my book. Names are very important in programming.
And autocompletion is great but often requires JSDoc comments to be set up. Another quite high barrier for the newcomer.
> it won't trick you again.
My point exactly. It shouldn't be trying to trick me!

Thanks

John
harbourj
 
Posts: 13
Joined: Thu Nov 30, 2023 10:56 am


Return to I'm just getting started

Who is online

Users browsing this forum: No registered users and 1 guest