Page 1 of 2

Semi-OOP cross platform

Posted: Wed May 30, 2012 6:35 am
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.

Re: Semi-OOP cross platform

Posted: Fri Jun 01, 2012 7:26 pm
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

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 9:16 am
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.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 10:48 am
by luis
hmasr wrote: will make PB the programming language no 1 in the world.
OMG, here we are again.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 11:43 am
by Zach
Can't you already subclass gadgets anyway via API?
At least that was my impression..

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 12:58 pm
by hmasr
Zach,

Yes I can via API but for windows only. What I need is platform independent method

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 1:21 pm
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

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 1:47 pm
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.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 2:11 pm
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.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 2:15 pm
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.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 2:16 pm
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.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 2:17 pm
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.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 2:28 pm
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.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 2:29 pm
by xorc1zt
don't expect any oop stuff when the devs can't even produce a decent changelog.

Re: Semi-OOP cross platform

Posted: Tue Jun 05, 2012 6:00 pm
by fsw
xorc1zt wrote:don't expect any oop stuff when the devs can't even produce a decent changelog.
:lol: