Question
override & different packages?
Hello.
I've having a problem overriding a method while extending a class whose parent class resides in another package.
My desire is to create a subclass based on the super class Calendar, but located in another package.
Unfortunately I'm only able to override the 'dosomething' method if I make it public [inside Class] or putting ExtendedCalendar in the same folder as Calendar [wich I dont want to...]. Any thoughts?
package utils1 {
public class Calendar {
public function Calendar(){
dosomething();
}
internal function dosomething():void {
. . .
}
}
}
//this will give me the following error:
//"1020: Method marked override must override another method."
package utils2 {
import utils1.Calendar;
public class ExtendedCalendar extends Calendar {
public function ExtendedCalendar (){
super();
}
override internal function dosomething():void {
. . .
}
}
}
Thanks in advance,
T.
I've having a problem overriding a method while extending a class whose parent class resides in another package.
My desire is to create a subclass based on the super class Calendar, but located in another package.
Unfortunately I'm only able to override the 'dosomething' method if I make it public [inside Class] or putting ExtendedCalendar in the same folder as Calendar [wich I dont want to...]. Any thoughts?
package utils1 {
public class Calendar {
public function Calendar(){
dosomething();
}
internal function dosomething():void {
. . .
}
}
}
//this will give me the following error:
//"1020: Method marked override must override another method."
package utils2 {
import utils1.Calendar;
public class ExtendedCalendar extends Calendar {
public function ExtendedCalendar (){
super();
}
override internal function dosomething():void {
. . .
}
}
}
Thanks in advance,
T.