Semi-OOP cross platform

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
hmasr
User
User
Posts: 15
Joined: Wed May 16, 2012 8:08 pm

Semi-OOP cross platform

Post by hmasr »

Add the possibility to add custom properties to the gadgets or windows? (If custom methods as well would be great). It should be cross platform.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Semi-OOP cross platform

Post by fsw »

Did you look at:
GetGadgetData(#Gadget)
SetGadgetData(#Gadget, Value)
GetGadgetItemData(#Gadget, Item)
SetGadgetItemData(#Gadget, Item, Value)

If you need to store more than one value you could use SetGadgetData to store the address of a structure or array (depending on your data)

bye

I am to provide the public with beneficial shocks.
Alfred Hitshock
hmasr
User
User
Posts: 15
Joined: Wed May 16, 2012 8:08 pm

Re: Semi-OOP cross platform

Post by hmasr »

Thanks fsw, this will help a lot.
However if PB consider thinking about adding some (not necessarily all) of the functionalities of the OOP (specially subclassing to add custom properties and methods) will make PB the programming language no 1 in the world.
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Semi-OOP cross platform

Post by luis »

hmasr wrote: will make PB the programming language no 1 in the world.
OMG, here we are again.
"Have you tried turning it off and on again ?"
A little PureBasic review
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Semi-OOP cross platform

Post by Zach »

Can't you already subclass gadgets anyway via API?
At least that was my impression..
hmasr
User
User
Posts: 15
Joined: Wed May 16, 2012 8:08 pm

Re: Semi-OOP cross platform

Post by hmasr »

Zach,

Yes I can via API but for windows only. What I need is platform independent method
hmasr
User
User
Posts: 15
Joined: Wed May 16, 2012 8:08 pm

Re: Semi-OOP cross platform

Post by hmasr »

luis wrote:
hmasr wrote: will make PB the programming language no 1 in the world.
OMG, here we are again.
What's up. Could not get you
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Semi-OOP cross platform

Post by Tenaja »

hmasr wrote:
luis wrote:
hmasr wrote: will make PB the programming language no 1 in the world.
OMG, here we are again.
What's up. Could not get you
What he means is that every newbie always asks for OOP. It is a very predictable cycle.
And the developer has rejected it, and claims PB will NEVER get it.
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Semi-OOP cross platform

Post by MachineCode »

Tenaja wrote:What he means is that every newbie always asks for OOP. It is a very predictable cycle.
Yep, it's annoying. PureBasic is not an OOP language. Search these forums for very lengthy discussions on why it won't happen.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
hmasr
User
User
Posts: 15
Joined: Wed May 16, 2012 8:08 pm

Re: Semi-OOP cross platform

Post by hmasr »

@Tenaja,
I understand that changing to fully OOP is very difficult and may affect the pros of PB like speed, file size, and memory usage. This is why I am asking for semi-OOP with some specific functionality not all of them.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Semi-OOP cross platform

Post by Tenaja »

MachineCode wrote:
Tenaja wrote:What he means is that every newbie always asks for OOP. It is a very predictable cycle.
Yep, it's annoying. PureBasic is not an OOP language. Search these forums for very lengthy discussions on why it won't happen.
Well, if you are going there, you have to to tell the poor guy who to look for...
Fred is the developer.
freak is on the development team.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Semi-OOP cross platform

Post by Tenaja »

hmasr wrote:@Tenaja,
I understand that changing to fully OOP is very difficult and may affect the pros of PB like speed, file size, and memory usage. This is why I am asking for semi-OOP with some specific functionality not all of them.
Please do not beat this dead horse.

And yes, C++ was first implemented as a preprocessor. There are some of those available for PB. I am not an OOP lover, so I do not use them. I am not against it, just do not need it.
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Semi-OOP cross platform

Post by MachineCode »

Let's look at some quotes from http://www.purebasic.fr/english/viewtop ... =3&t=45569 back in 2011:
hmasr wrote:This is why I am asking for semi-OOP with some specific functionality not all of them.
will make PB the programming language no 1 in the world.
And now, let's look at these quotes from today:
DaylightDreamer wrote:i think it is really time to add unless partial OOP support in it.
I think this will put PB to next level. And he might become serious competition to languages such as C# or AS3.
Wow, almost exactly word-for-word! Sigh. Please look elsewhere for an OOP language, lest this thread mimic the other one in its entirety.

And just to finish it off, a quote direct from the manufacturers:
Freak wrote:Yawn! This whole "If only PB had X, it would be a 'professional' language" argument is so old. And its plain false too.
This is getting nowhere.
And then he locked the thread. Hope it happens here.
Last edited by MachineCode on Tue Jun 05, 2012 2:31 pm, edited 1 time in total.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
xorc1zt
Enthusiast
Enthusiast
Posts: 276
Joined: Sat Jul 09, 2011 7:57 am

Re: Semi-OOP cross platform

Post by xorc1zt »

don't expect any oop stuff when the devs can't even produce a decent changelog.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Semi-OOP cross platform

Post by fsw »

xorc1zt wrote:don't expect any oop stuff when the devs can't even produce a decent changelog.
:lol:

I am to provide the public with beneficial shocks.
Alfred Hitshock
Post Reply