|
|
#2851 |
|
User
Join Date: Sep 2009
Posts: 6
|
Is there a possibility to overload functions/methods?
JASS:
function test takes integer i returns nothing
call BJDebugMsg(I2S(i))
endfunction
function test takes string s returns nothing overload
call BJDebugMsg(s)
endfunction
...
call test(3)
call test("test")
...
Last edited by Lord_Executor : 10-30-2009 at 12:53 PM. |
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#2852 |
|
Free Software Terrorist
Technical Director
|
not yet.
__________________ |
|
|
|
|
|
#2853 | |
|
In Flames
Join Date: Jan 2006
Posts: 1,153
|
Quote:
Thats quite a difficult job ... think of: JASS:function test takes integer i returns nothing function test takes somestruct o returns nothing function test takes someotherstruct o returns nothing |
|
|
|
|
|
|
#2854 |
|
Free Software Terrorist
Technical Director
|
not that, but something like that.
__________________ |
|
|
|
|
|
#2855 | |
|
User
Join Date: Apr 2008
Posts: 49
|
Quote:
Hmmm, this is not the case for me. Just to make sure, I copy the three files in the executable folder into the jasshelper folder in newgen? That is what I've been doing. I'll see if microsoft will fix it :D Although if I try opening it directly, it says bin\SFmpq.dll is missing even though it is there. This may be the problem and I'll look at my paths once I get home. Last edited by Frozenhelfire : 10-30-2009 at 11:55 PM. |
|
|
|
|
|
|
#2856 |
|
Two Blue
|
JH error: "constant structs not supported"
__________________on the line: constant ARGB BonusBoard___COLOR_HEADINGS = 0xFFFF00 from the source: private constant ARGB COLOR_HEADINGS = 0xFFFF00 Step 2 (Structs) is the phase the error happens in. I'm guessing that's an error. If not, then consider this a feature request... |
|
|
|
|
|
#2857 |
|
Free Software Terrorist
Technical Director
|
It's a feature request.
__________________allow constant for array structs. Then allow constant for the time you can actually .create in globals. Since ARGB fails without it, I'll do it in the next version. |
|
|
|
|
|
#2858 |
|
User
Join Date: Nov 2007
Posts: 129
![]()
|
Even with [forcemethodevaluate] in jasshelper.conf, this code compiled without errors:
__________________ JASS:struct A method a takes nothing returns nothing call .b() endmethod method b takes nothing returns nothing call BJDebugMsg("") call BJDebugMsg("") endmethod endstruct ![]() |
|
|
|
|
|
#2860 |
|
User
Join Date: Mar 2007
Posts: 81
|
I think i have another feature request ._.
As there is inheritance of structs why isn't there also the keyword "protected"? I think it's really necessary cause otherwise we would have to declare all variables used by child structs as "public"... |
|
|
|
|
|
#2861 |
|
Free Software Terrorist
Technical Director
|
If something is supposed to be used by code outside the struct, public is precisely the keyword to use.
__________________I have always headed towards avoiding the use of implementation inheritance. |
|
|
|
|
|
#2862 | |
|
User
Join Date: Mar 2007
Posts: 81
|
Quote:
See, when one struct extends another struct, all members of the parent struct are in some way not outside of the child struct, are they? |
|
|
|
|
|
|
#2863 |
|
Free Software Terrorist
Technical Director
|
interfaces are interface inheritance (not implementation inheritance). Extensible structs were intended as a form of composition.
__________________Anyway, the point of encapsullation is to protect code from outsiders. protected does not do that better than public, it just turns out to be a way to force implementation inheritance which actually breaks encapsulation... |
|
|
|
|
|
#2864 | |
|
User
Join Date: Nov 2007
Posts: 129
![]()
|
Quote:
because I called a method before defining it which I guess would compile to an implicit evaluate which should be disabled with the setting in jasshelper.conf. So bug or me == fail? |
|
|
|
|
|
|
#2865 |
|
oO
Join Date: Jul 2008
Posts: 577
![]() ![]() ![]()
|
Yes it's a bug. It compiles to using TriggerEvaluate()
>< |
|
|
|
|
|
| Bobo_The_Kodo |
|
This message has been deleted by Bobo_The_Kodo.
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |