Static methods - please!

The use of specific JADE features and proposals for new feature suggestions
allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Re: Static methods - please!

Postby allistar » Tue Oct 14, 2014 7:57 am

So it's agreed then, in order:

1) Static methods
2) Method overloading
3) Parameterised constructors

:-)

As well as a long list of smaller wishes: the ability to "sendMsg" on a primitive, for properties for controls added in the painter to be protected instead of public, for "protected" to be instances based and not class based.

User avatar
ghosttie
Posts: 181
Joined: Sat Aug 15, 2009 1:25 am
Location: Atlanta, GA, USA
Contact:

Re: Static methods - please!

Postby ghosttie » Tue Oct 14, 2014 9:08 am

for "protected" to be instances based and not class based.
I don't understand this one
I have a catapult. Give me all the money or I will fling an enormous rock at your head.

allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Re: Static methods - please!

Postby allistar » Tue Oct 14, 2014 9:55 am

for "protected" to be instances based and not class based.
I don't understand this one
I have a property on a class which is protected. I should not be able to access this protected property on instance1 of the class when running in a method on instance2 of the class. A protected propery should only be able to be accessed from a method *running on the instance that holds the property*. The way this works in JADE is that you can access the property from any instance of that class, not just the self instance. I consider this to be a bug in the way access modes have been implemented. The same problem exists with protected methods. A protected method should only be able to be called from within another method running on the same instance.

davidmellow
Posts: 42
Joined: Thu Aug 27, 2009 1:27 pm
Location: New Plymouth, New Zealand

Re: Static methods - please!

Postby davidmellow » Tue Oct 14, 2014 11:00 am

Interesting point allistar.

Just to muddy the waters even more, maybe off topic, and I guess one could go on and on about features that we'd like but...

Regarding something I tried quite a while back, and on an older Jade version, so correct me if I'm talking nonsense...

I don't think it's possible to specify attributes when defining an Interface, nor (therefore) define a MemberKeyDictionary class with membership ISomeInterface? Only methods?

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Static methods - please!

Postby BeeJay » Tue Oct 14, 2014 11:14 am

Interesting point allistar.

Just to muddy the waters even more, maybe off topic, and I guess one could go on and on about features that we'd like but...

Regarding something I tried quite a while back, and on an older Jade version, so correct me if I'm talking nonsense...

I don't think it's possible to specify attributes when defining an Interface, nor (therefore) define a MemberKeyDictionary class with membership ISomeInterface? Only methods?
Déjà vu ;) : https://forums.jadeworld.com/viewtopic.php?f=7&t=2049

User avatar
ghosttie
Posts: 181
Joined: Sat Aug 15, 2009 1:25 am
Location: Atlanta, GA, USA
Contact:

Re: Static methods - please!

Postby ghosttie » Tue Oct 14, 2014 11:21 am

I have a property on a class which is protected. I should not be able to access this protected property on instance1 of the class when running in a method on instance2 of the class. A protected propery should only be able to be accessed from a method *running on the instance that holds the property*. The way this works in JADE is that you can access the property from any instance of that class, not just the self instance. I consider this to be a bug in the way access modes have been implemented. The same problem exists with protected methods. A protected method should only be able to be called from within another method running on the same instance.
Wow, I've never tried that - I agree that's not right
I have a catapult. Give me all the money or I will fling an enormous rock at your head.

User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Re: Static methods - please!

Postby Dr Danyo » Tue Aug 09, 2016 12:07 am

Just to close the loop, Class Methods made the cut for the 2016 release.
Class Methods
Benefit
Class methods allow a cleaner implementation of
programming models. Most modern languages provide
this capability and it has been a long requested feature
for JADE.
Description
We will implement Class methods which allow developers
to define and call methods on Classes, without having to
instantiate a dummy object. This will simplify aspects of
development in JADE.
see https://www.jadeworld.com/pdf/tech/JADE_Roadmap.pdf

allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Re: Static methods - please!

Postby allistar » Tue Aug 09, 2016 9:30 am

That's fantastic! I hope we will be able to treat them like normal methods (e.g. call them on instances of the class as well as the class itself, and do the equivalent of "sendMsg" on them). I look forward to upgrading (probably later next year) to get this feature.


Return to “Feature Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests

cron