How to extends base class???

Hi here I want to extend GoogleApiKeyStore. I am sure that this class is availabe, because when I  writing to import this class flash showing this classname in hint dialogue box. but when i make object of mykey in my document class then it shows error: The definition of base class GoogleApiKeyStore was not found.
package code {
          import be.boulevart.google.apicore.GoogleApiKeyStore
          public class mykey extends GoogleApiKeyStore{
                    public static const API_KEY : String = "xxxxxxxxxxxxxxxxxxxxxxxx"
                    public function mykey() {
                              // constructor code

download and save the class to make it local.

Similar Messages

  • Extend base class to customize some properties

    Hi
    Using Jdev 11g
    I need to extend UIGraph class to change the defualt color of pie graph . anyone have a solution to it ? i already extend the class but i donot know what is next steps and what is the method i must to override ??

    Hi frank
    how can i use skinning to change default color of pie chart . for example i have 5 status and count them for every emp but i need specified color for every status ( green for done , red for not done ans so on) if one status missing ( the emp have not (,done status) for example) then the pie color rearranged for other status ???:)). i try to change color in EL but color attr of pie series donot support EL

  • AS3.0: How to extend a class that extends MovieClip

    When I try to set the base class of a library symbol to a
    class that doesn't DIRECTLY extend MovieClip, but instead extends
    another class that DOES extend MovieClip, it's disallowed, saying,
    "The class 'Whatever' must subclass 'flash.display.MovieClip' since
    it is linked..."
    Is this just a validation bug in the property windows, only
    checking one class deep into the inheritance hierarchy? Because the
    specified class does extend MovieClip, just two levels in instead
    of one. Is there a fix for this? Or must library symbols always
    directly extend MovieClip? If so, why?

    Which classes from flash.display have you imported. Just
    because a class extends another doesn't mean that it inherits all
    of its properties. Saying a class extends sprite doesn't give you
    access to all of it's properties, members and display unless you
    first import flash.display.* or flash.display.Sprite. If you aren't
    already importing flash.display.*, try importing
    flash.display.MovieClip and see what happens...

  • How to extend a class in same package

    I have a class called LoginBean.java which extends the class ConnectDB.java
    this both files have a statement both the classes are under the directory pmtools.
    and both are included in package pmtools.
    (they both have statement "package pmtools; " at top)
    when i am trying to compile LoginBean.java, it is giving me following error,
    LoginBean.java:7: cannot resolve symbol
    symbol : class ConnectDB
    location: class pmtools.LoginBean
    public class LoginBean extends ConnectDB
    ^
    LoginBean.java:59: cannot resolve symbol
    symbol : variable dbConn
    location: class pmtools.LoginBean
    stmt = dbConn.createStatement();
    ^
    2 errors

    did you compile the other class already? donnow if ithahahaha!!!!!
    ok include the import statement
    import pmtools.ConnectDB;
    in the second class and than compile..

  • How to Extend Java class in UI Module

    Hi All,
    I am trying to make z for one of the java file GenericSearchDynamicContent.java in the standard package com.sap.wec.app.common.module.catalog.ui.utils. Can anyone please let me know what are steps do i need to follow to extend the same java file in our customer namespace and make use of it.
    Thanks in Advance.
    Regards,
    Rahul.

    Hi Rahul,
    It's upto you whether you want to keep seprate packages for custom changes (then create your own package and keep all the Z class under this) or create a Z_GenericSearchDynamicContent.java and extend this class by GenericSearchDynamicContent.java.
    After doing this you can make your custom changes accordingly and you have to also make the changes in *config.xml (replace this entry GenericSearchDynamicContent by Z_GenericSearchDynamicContent.java.) files as mapping is done there.
    Could you please let me know if you need any further information.
    Thanks,
    Hamendra

  • How to extend a class from super package?

    Say I have a dir a\
    in dir a\ there is a dir b\
    in b\ there is a class called DerivedClass
    in a\ there is a class called ExtendedClass
    how do I extend ExtendedClass from DerivedClass?

    package a.b;
    import a.ExtendedClass;
    public class DerivedClass extends ExtendedClass{
        //define class members
    This is interesting. But the question is, how does java know where is package b??     By the classpath variable - the classpath is set to one directory above 'a'. When you say
         a.ExtendedClass, since the classpath is set to the immediate parent of a, it searches the child directories
         for a directory called 'a' and upon finding it, searches for a .class file 'ExtendedClass'.
         Similarly when you say a.b.DerivedClass, the search begins in the parent directory for a directory called a and then
         a directory 'b' inside it on finding which it searches for DerivedClass.class
    Alternatively you could have defined DerivedClass to be in package 'b'.     
         package b; //note the difference. Its b and not a.b
         import a.ExtendedClass;
         public class DerivedClass extends ExtendedClass{
             //define class members
         }in which case, you should set the classpath to
    1. a's parent directory
    2. a itself
    The parent directory cp is still required to locate a.ExtendedClass
    The fully qualified name of DerivedClass is b.DerivedClass
    Thus if #1 alone were present, since 'b' is not directly inside the parent directory,
    b.DerivedClass would never be found
    Hence the #2 is required-the search should start from the directory 'a' (as directory 'b' is inside 'a').
    therefore, a package is a directory.No, package is a very java specific thing and though logically package names should match directory names, they
    arent the same.
    cheers,
    ram.

  • How java extends Object class?

    It is true that we cannot extend more than one class, it is true that java inherits Object class implicitly (if not explicitly) and it is also true that we can extend class X in class Y.
    My question is if java does not support multiple inheritance (directly, using extends) then how does it extends Object (implicitly) and my class X (explicitly)?
    In other words how does java inherits Object along with our specified class?
    Thanks in advance.
    Manish

    Java does support multi inheritance!Yes I know java support multiple inheritancethrough
    interfaces but what I meant was you cannot inherit
    multiple classes using "EXTENDS".and that is correct. Do you still have a question
    regarding this?Nop, actually due to over-concentration and over-thinking on this topic while reading I lost the track and asked this question.
    Thanks
    Message was edited by:
    Manish_India_1983

  • How to override base class events

    I Have faced one event problam. That is i have called one AA class in to stage. AA class is extends from BB class. BB class extends from CC class.CC class extends MovieClip.  In CC class i have given CLICK event trace("this is CC class"). i am also given for AA class CLICK event ("this is AA class ").When I Click the AA in out put panel "this is CC class" ,"this is AA class ") i want to stop CC Class mouseEvents.

    Events bubble by default... It sounds like you want to look at the Event class' stopImmediatePropagation method.

  • How to inherit base class properties ?

    Hi All,
    I have one doubt.Can anyone clear this doubt?
    Steps:
    1)I have created One movieClip & named as MyComp
    2)I export this movieclip to actionscript.Class name for this movieclip is MyComp.
    3)After that,Dynamically I have created 5 instance for this class & added to stage.
    4)Now i need to change width of MyComp. it should reflect on previous 5 instance too.
    I tried like,
    I have created MyComp.as file in same location. There I tried to inherite DisplayObject properties Width.
    Example :
    In authoring time,I have one movieclip in my library which contains one rectangle shape..Im adding 5 instance of that movieclip in stage.
    After that i get into one movieclip,and im increasing width of that movieclip by increasing Shape width. it ll get reflect in all instance..
    i need this thing in actionscript.... is it possible?
    Thanks...

    you can't do what you are trying to do the way you are trying to do it.
    I have included some code here (pure AS3, no timeline or library) which you might be able to adapt to your needs
    Basically I have created a static property (_rectWidth which controls the rectangles width) on the MovieClip class that contains the rectangle and a render() function that redraws the rectangle tot he correct width. Note you will have to call render() after setting a new width to see the rectangle drawn at the new  width.
    Then in the main class I create 5 rectangles with random colours and positions.
    The main class also listens for the "arrow up" and "arrow down" keys to change the rectangle's size. Note: I change the size of the rectangle and then run through all of the Main classes children (which are all RectMC's) and call render();
    package
              import flash.display.Sprite;
              import flash.events.Event;
              import flash.events.KeyboardEvent;
              public class Main extends Sprite
                        public function Main():void
                                  if (stage) init();
                                  else addEventListener(Event.ADDED_TO_STAGE, init);
                        private function init(e:Event = null):void
                                  removeEventListener(Event.ADDED_TO_STAGE, init);
                                  // entry point
                                  for (var i:int = 0; i < 5; i++)
                                            var col:uint = Math.floor(Math.random() * 0xffffff);
                                            var rectX:int = Math.floor(Math.random() * stage.stageWidth);
                                            var rectY:int = Math.floor(Math.random() * stage.stageHeight);
                                            var rectMC:RectMC = new RectMC(col);
                                            rectMC.x = rectX;
                                            rectMC.y = rectY;
                                            addChild(rectMC);
                                  stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
                        private function onKeyDown(e:KeyboardEvent):void
                                  switch (e.keyCode)
                                            case 38:
                                                      RectMC.rectWidth += 20;
                                                      break;
                                            case 40:
                                                      RectMC.rectWidth -= 20;
                                                      break;
                                  for (var i:int = 0; i < numChildren; i++)
                                            var rectMC:RectMC = getChildAt(i) as RectMC;
                                            rectMC.render();
    package 
              import flash.display.MovieClip;
              import flash.events.Event;
               * @author steven O'Boyle
              public class RectMC extends MovieClip
                        protected static var _rectWidth:int = 100;
                        protected static var _rectHeight:int = 50;
                        protected var _rectColour:uint;
                        public function RectMC(col:uint)
                                  _rectColour = col;
                                  render();
                        public function render():void
                                  graphics.clear();
                                  graphics.beginFill(_rectColour);
                                  graphics.drawRect(0, 0, _rectWidth, _rectHeight);
                                  graphics.endFill();
                        public static function set rectWidth(value:int):void
                                  _rectWidth = value;
                        public static function get rectWidth():int
                                  return _rectWidth;

  • How to use reflection to get base classes protected field

    I have one base Base classes which have protected fields and public get method to get the field.
    class Base
    protected int proField;
    public int getProField(){return proField;}
    Class Derive extends base class Base
    class Derive extends Base implements OtherInterface
    public void funtion(){};
    Now I have an instance of Derive, how can I use reflection to get the protected field inherited from Base. It seems Java Reflection only give runtime accessibility to public field and decleared field, protected-inherited field is excluded.
    Thanks
    Lei

    as the last poster said, traverse up the class hierarchy.
    ex:
    private void doSumfinToField(String fieldName throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException {
    Class clazz = getClass();
    Field field = findFieldInClass(clazz, fieldName);
    //field.doSumfin;
    private Field findFieldInClass(Class clazz, String fieldName) throws NoSuchFieldException {
    try { // to find the field in this class    
    return clazz.getDeclaredField(fieldName);
    } catch (NoSuchFieldException e) {
    // if we don't have a superclass, continue
    if (clazz.getSuperclass().equals(Object.class)) {
    throw e;
    // check in the superclass
    return findFieldInClass(clazz.getSuperclass(), fieldName);
    }

  • Extend ShoppingClientHelper.class

    Does anyone knows how to extend ShoppingClientHelper.class.
    I create a class xxShoppingClientHelper extend ShoppingClientHelper and method addToReqs. I want the system to process the original logic in addToRegs first then the extended addToReqs. But I get compilation error that 'super cannot be reference from a static context'. Does this means I can not extend the ShoppingClientHelper.class since all methods in the class are static.
    Regards
    Lawrence

    Hi,
    Here is a start (not compiled, not tested):
    public class TwoValuedInteger {
        // Refer to these to avoid allocation of new objects
        // (just like Boolean.TRUE/Boolean.FALSE)
        public static TwoValuedInteger ZERO = new TwoValuedInteger(0);
        public static TwoValuedInteger ONE  = new TwoValuedInteger(1);
        private int value;
        public TwoValuedInteger(int v) {
            if (v != 0 && v != 1)
                throw new IllegalArgumentException();
            this.value = v;
        public String toString() {
            return value == 0 ? "0" : "1";
        public boolean equals(Object obj) {
            if (obj == null)
                return false;
            if (!(obj instanceof TwoValuedInteger))
                return false;
            return ((TwoValuedInteger)obj).value == value;
    }Regards,
    S&oslash;ren Bak

  • Extend standar class with new button(method)

    Hi,
    I want to create new button in standard class /SAPSRM/IF_PDO_AO_BP_BASE.
    Does anyone know how to extend the class with a new button?
    Very thanks.

    I NEED TO CREATE NEW BUTTON IN THIS CLASS.
    THE BUTTON MUST SHOW A POP-UP WHEN PARTNET HAVE DOCUMENT´S IN SYSTEM.
    CAN YOU HELP ME?

  • How to specify a base class for Remote Interface in Workshop 9.2? -- URGENT

    Hi,
    I am trying to create a UUP EJB in WebLogic 9.2 workshop. I am using @FileGeneration to create my home & remote interfaces. And the generated remote interface is extending javax.ejb.EJBObject;I want my remote interface to extend com.bea.p13n.property.EntityPropertyManager which in turn implements javax.ejb.EJBObject. Can someone tell how i can do it in Workshop?.
    I came across Predefined Variable: remote.baseClass and as per docume
    ntation..."If specified, the value of this variable will be used as the base class for all generated remote classes. Where i should specify it?. @FileGeneration does nt have any option for it. Any help is grtly appreciated.
    Following are my code snippets:
    IMPL Class
    @FileGeneration(remoteClass = Constants.Bool.TRUE,remoteHome = Constants.Bool.TRUE, localClass = Constants.Bool.FALSE, localHome = Constants.Bool.FALSE,remoteClassName = "MyEntityPropertyManager",remoteHomeName = "MyEntityPropertyManagerHome")
    public class MyEntityPropertyManagerImpl extends GenericSessionBean implements
              SessionBean {
    //code
    }

    This question was posted to both the bea.workshop.developer.general and weblogic.developer.interest.workshop (I had replied to the later on 10/19); after seeing an identical question today on this list want to include a reference to that reply here:
    http://forums.bea.com/bea/message.jspa?messageID=600044925&tstart=0
    -Rob

  • How to call derived class to base class

    Hello everybody,
    I create a GUi application in java swing. Now i want to navigate between the screen but the timing between the screen is very slow bcoz i imported the class from package to another package. Now i want to extends one package to another package to reduce the navigation time but it saying error bcoz i cant able to call my derived class to base class. if anyone know the answer for this please answer this immediately.
    If any other method is there to optimise the navigation time please tell me
    by
    (kamal)

    Sorry, I've got major difficulties understanding your query:
    I create a GUi application in java
    ication in java swing. ok
    Now i want to navigate between
    the screenwhat? switch screens? display a different dialog?
    but the timing between the screen is very
    slowtiming? do you mean the time it takes to display a different dialog?
    bcoz i imported the class from package to
    another package.how did you come to the conclusion that that is the reason for the slowness? Did you do any profiling or is this just guess-work?

  • ClassFileTransformer and how to transform the base class first

    Hello,
    I've written a ClassFileTransformer that uses ASM to enhance classes at load time.
    But some of the enhancements depends on possible enhancements to the super class.
    Example: under some coditions a method doWork() is inserted. This method did not exist in any class (doWork is just an example, I use a name that is not accepted by the compiler but allowed by the JLS).
      public class A {}
      public class B extends A {}If the method doWork() was inserted into class A, then the doWork() of B has to call doWork() of class A:
       super.doWork().Currently I try to load the base class by using
       loader.loadClass(superName.replace('/', '.'));this loads the super class but without passing my transformer !
    How can I solve this ?

    Looking at the comments in ClassFileTransformer.java and the code in ClassLoader, it seems the transformers are called only for class files that get a ClassFormatError. Transformers are intended to fix old broken/incompatible class files on the fly.
    I guess the intended way to do what you are doing is to define a custom class loader. Read class into byte[], transform, call defineClass() on the transformed byte[]. Google for java custom class loader for examples.

Maybe you are looking for