abstract method with an optinally parameter
BlitzMax Forums/BlitzMax Beginners Area/abstract method with an optinally parameter
| ||
Hi @all I have a problem with an optinally parameter in abstract method. Type TSay Method Text(t:String = "everybody") Abstract End Type Type TSay_hi Extends TSay Method Text(t:String = "everybody") Print "Hi "+t End Method End Type Type TSay_hello Extends TSay Method Text(t:String = "everybody") Print "Hello "+t End Method End Type Global Say:TSay = New TSay_hi Say.text("simi") 'that works Say.text() 'that doesn't work What's wrong? Or isn't that allowed? Thanks simi |
| ||
I'm going to go with "Wow that's odd." Surely that's a foul? |
| ||
wow that sucks. same thing for Ints, Floats, and Null as well. i have a whole crapload of abstracts with default values that i havent written the implementation for yet :( just when i thought i was nearing the implementation phase... i guess i will alter them as i implement. EDIT: posted this issue in the bug forum |
| ||
http://blitzbasic.com/Community/posts.php?topic=48842#544604 still have no answer ... |
| ||
@Koriolis - thx for the post. i looked in the bug forum and didnt find anything so i posted there. i literally have hundreds of default parameters on abstract methods that i havent written the implementation for yet. i guess i just take it one at a time although i dont like losing the qualities of Abstract. unfortunately its the only option that enables me to move forward :( |
| ||
Thanks a lot to all :D |