Kain Nobel
Member
Good day everybody!
Earlier I was trying to define methods that aren't in the default File class, mainly ".copy", but after I defined it and tested it with an event's call script, it would pop a no method error... okay, so next I tried just screwing with default File class methods and overwritting them so I could get some stupid error, but nothing happened. For instance, I tried overwritting .delete() to print "Test", but... it didn't do anything.
Is there a reason I can't define methods in the File class? Here's my cheap example, which didn't do anything whatsoever when I tested it.
class File
def delete(filename = "")
p "All I do now is print a stupid message, I'm not even going to listen to your arguments."
end
end
I've also tried creating a new module called File2, then include it in File, but that didn't help either.
Basically, what I'm needing for the File class is certain methods that aren't included in RPGXP, such as "cp" or "copy", and perhaps some other stuff I can't really think of off the top of my head right now, but I can't even define methods within the File class, it acts like the method isn't defined whatsoever when it really has been. Any particular reason why?
Earlier I was trying to define methods that aren't in the default File class, mainly ".copy", but after I defined it and tested it with an event's call script, it would pop a no method error... okay, so next I tried just screwing with default File class methods and overwritting them so I could get some stupid error, but nothing happened. For instance, I tried overwritting .delete() to print "Test", but... it didn't do anything.
Is there a reason I can't define methods in the File class? Here's my cheap example, which didn't do anything whatsoever when I tested it.
class File
def delete(filename = "")
p "All I do now is print a stupid message, I'm not even going to listen to your arguments."
end
end
I've also tried creating a new module called File2, then include it in File, but that didn't help either.
Basically, what I'm needing for the File class is certain methods that aren't included in RPGXP, such as "cp" or "copy", and perhaps some other stuff I can't really think of off the top of my head right now, but I can't even define methods within the File class, it acts like the method isn't defined whatsoever when it really has been. Any particular reason why?