Inherited class doesn't contain necessary methods

Hi, all!
Here's the problem (channeling Adrian Monk again): I've got a working agent-based model running as a Java app. Everything about the model works except that one of the GUI elements is only displaying 4 of the 6 necessary slider bars that tells the model how to initialize. That GUI element is built into the library that I'm using to construct this java app (RePast code library, you can see it at: http://repast.sourceforge.net/). The GUI class element is RangeWidget, which uses RangePropertyDescriptor to fill it up with the parameters for the slider bars. The RangeWidget in my GUI has space for only 4 of the sliders bars; I've never had to modify a class from its default values. I need some advice. Do I (a) build a personalized RangeWidget class and call it as one of the subservient classes in my main Model.java; (b) import RangeWidget into my main Model.java and explicitly change the values in a separate method next to the RangePropertyDescriptor method; or (c) do something I'm not yet aware of?

Here--I THINK this is the relevant snippets from my MyNewRangeWidget class:
  public MyRangeWidget(int min, int max, int tickSpacing) {
    super(new FlowLayout());
    slider = new JSlider(min, max);
    field = new JTextField(String.valueOf(max).length());
    add(slider);
    add(field);
    this.min = min;
    this.max = max;
    slider.setMajorTickSpacing(tickSpacing);
    slider.setPaintLabels(true);
    slider.setPaintTicks(true);
    slider.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent evt) {
          if (evt.getSource() == field) {
            // change the value to the fields value
            // check for non-integer value.
            setValue(new Integer(field.getText()));
          } else {
            // change the field to the slider value
            field.setText(String.valueOf(slider.getValue()));
            if (slider.getValueIsAdjusting() == false) fireActionPerformed();
and
  private void setSlider() {
    try {
      Integer i = new Integer(field.getText());
      setValue(i);
    } catch (NumberFormatException ex) {
      Integer i = (Integer)getValue();
      field.setText(i.toString());
      setValue(i);

Similar Messages

  • Hi ,info need on container creation,methods,class,interface....

    hi ppl,
              Can anybody give me information on what is and how to create
    container creation,methods,class,interface....with programs.

    >
    priyank dev wrote:
    > hi ppl,
    >           Can anybody give me information on what is and how to create
    >  container creation,methods,class,interface....with programs.
    Hi Dev,
    Interface is just the skeleton of the class definition.
    If you want to have your own code for all or any of the methods that interface is havings then you can create an instance of that interface and implement those methods with you own code.
    That is the advantage of object oriented programming. And if you want to use the standard method or original method's functionality then you have call the method along with the class which implemented it like below
    class => method1
    For Imore information on interfaces Check this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    For creating classes you can follow this procedure.
    Go with abap dictionary->select database table->provide the table for dev classs eg. V_TDEVC-> go for display option-> select utilities->select contents option-> select create dev class,
    provide the name and short text,software component->create req.no.
    with this dev class will be created.
    Thanks
    Nitesh
    Edited by: Nitesh Kumar on Nov 18, 2008 10:56 AM

  • Storyboard doesn't contain a view controller with identifier 'myViewController'

    I have 3 view controllers on storyboard. One of them has Storyboard Id as 'myViewController'. its runs perfectly on simulator. But when I try to run it on my device it gives following error:
    'Storyboard (<UIStoryboard: 0x1cd626d0>) doesn't contain a view controller with identifier 'myViewController''
    Please help me out with this.

    I'm not sure how "new" you are to Xcode and IB, but just double checking -- did you create the XIB file from Xcode (so that it was added to your project?). Or, if not, did you save it to your project directory somewhere and were prompted to add it to your project? If you created it new from IB it may not be part of your project yet. That's when I have seen my classes missing from the drop down menu on the Identity Inspector.
    One final thing -- after setting File's Owner, I don't see from your code how you are actually loading the NIB file (xib file). You are calling plain "init" in your app delegate where you create these view Controllers. You need to call the "initWithNibName" method. It is the designated init method for view controllers that load their interface from a NIB file.
    Cheers,
    George
    Message was edited by: gkstuart

  • Inheritance class not working

    Alright, so I'm supposed to write an inheritance class called MusicStore, which is inherited from the Store ( already written), and then the MusicStore method tests out the MusicStore. The MusicStore has the additional attributes of the number of titles it offers and the its address...The store already offers the name of the store where the titles are located...I believe I'm writing it the MusicStore correctly, but I get this really odd error when I compile...I am not quite sure how it happens????? Helllpppp!!! I would appreciate it
    I will post the error and the error is located a bit lower in the MusicStore that I posted-
    "File: E:\comp 150\H10\MusicStore.java [line: 13]
    Error: E:\comp 150\H10\MusicStore.java:13: cannot find symbol
    symbol : constructor Store()
    location: class Store"
    Here is the Store:
    /* Store Class
       Anderson, Franceschi
    public class Store
      public final double SALES_TAX_RATE = 0.06;
      private String name;
      public Store( String newName )
        setName( newName );
      public String getName( )
        return this.name;
      public void setName( String newName )
        this.name = newName;
      public String toString( )
        return( "name: " + this.name );
      public boolean equals( Store otherStore )
        return ( this.name.equalsIgnoreCase( otherStore.name ) );
    }Here is the MusicStore:
    /* MusicStore class
    Smith, Tahnee
    public class MusicStore extends Store
      public final int DEFAULT_NUMBER = 0;
      private int numberOfTitles;
      public final String DEFAULT_ADDRESS = " ";
      private String address;
      public MusicStore()
      {                                         // LINE 13 : Here is where the error is...I don't understand what is going on here.
        address = DEFAULT_ADDRESS;
        numberOfTitles = DEFAULT_NUMBER;
      public MusicStore(String startNameStore, int startNumber, String startAddress)
        super( startNameStore );
        setNumberOfTitles( startNumber );
        setAddress( startAddress);
      public void setAddress( String newAddress)
        address = newAddress;
      public void setNumberOfTitles(int newNumber)
        if ( numberOfTitles > 0 )
          numberOfTitles = newNumber;
        else
          System.out.println(" Number of titles cannot be negative");
      public String toString()
        return super.toString()
          + " The number of titles are " + numberOfTitles
          + " The address is " + address;
    }Here is the MusicStoreClient:
    /* MusicStoreClient class
       Anderson, Franceschi
    public class MusicStoreClient
      public static void main( String [] args )
        MusicStore ms1 = new MusicStore( "Records, Inc.", 1000, "123 Elm Street" );
        MusicStore ms2 = new MusicStore( "All Records Unlimited", 1200, "999 Green Street" );
        System.out.println( ms1 );
        System.out.println( ms2 );
        ms2.setNumberOfTitles( 1000 );
        ms2.setAddress( "123 Elm Street" );
        if ( ms1.equals( ms2 ) )
          System.out.println( "ms1 and ms2 are equal" );
        else
          System.out.println( "ms1 and ms2 are not equal" );
        ms2.setName( "Records, Inc." );
        if ( ms1.equals( ms2 ) )
          System.out.println( "ms1 and ms2 are now equal" );
        else
          System.out.println( "ms1 and ms2 are still not equal" );
    }Edited by: guitarlady3000 on Nov 5, 2008 4:22 PM
    Edited by: guitarlady3000 on Nov 5, 2008 4:37 PM

    You don't explicitly call the super(...) constructor in your parameterless MusicStore constructor code and so Java will automatically and behind the scenes place a call to super() there. Problem is, Store doesn't have a parameterless constructor. Solution: either give Store a parameterless constructor or explicitly call super with a proper parameter.

  • Scr doesn't contain powerup

    I discovered that my script file doesn't contain the powerup.
    This is my scr file:
    C:\jc22\mydemo>..\bin\scriptgen walletApp.scr com\idt\javacard\samples\wallet\ja
    vacard\wallet.cap
    Java Card 2.2 APDU Script File Builder (version 0.11)
    Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    0x80 0xB0 0x00 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Header.cap
    0x80 0xB2 0x01 0x00 0x00 0x7F;
    0x80 0xB4 0x01 0x00 0x16 0x01 0x00 0x13 0xDE 0xCA 0xFF 0xED 0x01 0x02 0x04 0x00
    0x01 0x09 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x0C 0x06 0x7F;
    0x80 0xBC 0x01 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Directory.cap
    0x80 0xB2 0x02 0x00 0x00 0x7F;
    0x80 0xB4 0x02 0x00 0x20 0x02 0x00 0x1F 0x00 0x13 0x00 0x1F 0x00 0x0E 0x00 0x0B
    0x00 0x66 0x00 0x12 0x01 0x88 0x00 0x0A 0x00 0x3A 0x00 0x00 0x00 0xDB 0x00 0x00
    0x00 0x00 0x00 0x00 0x01 0x7F;
    0x80 0xB4 0x02 0x00 0x02 0x01 0x00 0x7F;
    0x80 0xBC 0x02 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Import.cap
    0x80 0xB2 0x04 0x00 0x00 0x7F;
    0x80 0xB4 0x04 0x00 0x0E 0x04 0x00 0x0B 0x01 0x01 0x01 0x07 0xA0 0x00 0x00 0x00
    0x62 0x01 0x01 0x7F;
    0x80 0xBC 0x04 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Applet.cap
    0x80 0xB2 0x03 0x00 0x00 0x7F;
    0x80 0xB4 0x03 0x00 0x11 0x03 0x00 0x0E 0x01 0x0A 0xA0 0x00 0x00 0x00 0x62 0x03
    0x01 0x0C 0x06 0x01 0x00 0x01 0x7F;
    0x80 0xBC 0x03 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Class.cap
    0x80 0xB2 0x06 0x00 0x00 0x7F;
    0x80 0xB4 0x06 0x00 0x15 0x06 0x00 0x12 0x00 0x80 0x03 0x02 0x00 0x01 0x04 0x04
    0x00 0x00 0x00 0x3A 0xFF 0xFF 0x00 0x2D 0x00 0x42 0x7F;
    0x80 0xBC 0x06 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Method.cap
    0x80 0xB2 0x07 0x00 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x07 0x01 0x88 0x00 0x04 0x30 0x8F 0x00 0x13 0x18 0x1D
    0x1E 0x8C 0x00 0x05 0x7A 0x05 0x40 0x18 0x8C 0x00 0x02 0x18 0x8F 0x00 0x03 0x3D
    0x06 0x10 0x08 0x8C 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x04 0x87 0x00 0xAD 0x00 0x19 0x1E 0x1F 0x8B 0x00 0x06
    0x18 0x8B 0x00 0x07 0x7A 0x01 0x10 0xAD 0x00 0x8B 0x00 0x08 0x61 0x04 0x03 0x78
    0x04 0x78 0x01 0x10 0xAD 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x00 0x8B 0x00 0x09 0x7A 0x02 0x21 0x19 0x8B 0x00 0x0A
    0x2D 0x18 0x8B 0x00 0x0B 0x60 0x03 0x7A 0x1A 0x03 0x25 0x10 0xB0 0x6A 0x08 0x11
    0x6E 0x00 0x8D 0x00 0x0C 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x1A 0x04 0x25 0x75 0x00 0x2D 0x00 0x04 0x00 0x20 0x00
    0x27 0x00 0x30 0x00 0x21 0x00 0x40 0x00 0x1B 0x00 0x50 0x00 0x15 0x18 0x19 0x8C
    0x00 0x0D 0x7A 0x18 0x19 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x8C 0x00 0x0E 0x7A 0x18 0x19 0x8C 0x00 0x0F 0x7A 0x18
    0x19 0x8C 0x00 0x10 0x7A 0x11 0x6D 0x00 0x8D 0x00 0x0C 0x7A 0x03 0x24 0xAD 0x00
    0x8B 0x00 0x11 0x61 0x08 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x11 0x63 0x01 0x8D 0x00 0x0C 0x19 0x8B 0x00 0x0A 0x2D
    0x1A 0x07 0x25 0x32 0x19 0x8B 0x00 0x12 0x5B 0x29 0x04 0x1F 0x04 0x6B 0x07 0x16
    0x04 0x04 0x6A 0x08 0x11 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x67 0x00 0x8D 0x00 0x0C 0x1A 0x08 0x25 0x29 0x05 0x16
    0x05 0x10 0x64 0x6E 0x06 0x16 0x05 0x63 0x08 0x11 0x6A 0x83 0x8D 0x00 0x0C 0xAF
    0x01 0x16 0x05 0x41 0x11 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x27 0x10 0x6F 0x08 0x11 0x6A 0x84 0x8D 0x00 0x0C 0x18
    0xAF 0x01 0x16 0x05 0x41 0x89 0x01 0x7A 0x03 0x24 0xAD 0x00 0x8B 0x00 0x11 0x61
    0x08 0x11 0x63 0x01 0x8D 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x00 0x0C 0x19 0x8B 0x00 0x0A 0x2D 0x1A 0x07 0x25 0x32
    0x19 0x8B 0x00 0x12 0x5B 0x29 0x04 0x1F 0x04 0x6B 0x07 0x16 0x04 0x04 0x6A 0x08
    0x11 0x67 0x00 0x8D 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x0C 0x1A 0x08 0x25 0x29 0x05 0x16 0x05 0x10 0x64 0x6E
    0x06 0x16 0x05 0x63 0x08 0x11 0x6A 0x83 0x8D 0x00 0x0C 0xAF 0x01 0x16 0x05 0x43
    0x63 0x08 0x11 0x6A 0x85 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x8D 0x00 0x0C 0x18 0xAF 0x01 0x16 0x05 0x43 0x89 0x01
    0x7A 0x03 0x22 0x19 0x8B 0x00 0x0A 0x2D 0x19 0x8B 0x00 0x14 0x32 0x19 0x05 0x8B
    0x00 0x15 0x1A 0x03 0xAF 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x01 0x8D 0x00 0x16 0x3B 0x19 0x03 0x05 0x8B 0x00 0x17
    0x7A 0x04 0x22 0x19 0x8B 0x00 0x0A 0x2D 0x19 0x8B 0x00 0x12 0x5B 0x32 0xAD 0x00
    0x1A 0x08 0x1F 0x8B 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x0B 0x18 0x03 0x6B 0x08 0x11 0x63 0x00 0x8D 0x00 0x0C 0x7A
    0x7F;
    0x80 0xBC 0x07 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/StaticField.cap
    0x80 0xB2 0x08 0x00 0x00 0x7F;
    0x80 0xB4 0x08 0x00 0x0D 0x08 0x00 0x0A 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    0x00 0x00 0x7F;
    0x80 0xBC 0x08 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/ConstantPool.cap
    0x80 0xB2 0x05 0x00 0x00 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0x05 0x00 0x66 0x00 0x19 0x02 0x00 0x00 0x00 0x02 0x00
    0x00 0x01 0x06 0x80 0x03 0x00 0x01 0x80 0x09 0x00 0x06 0x80 0x09 0x00 0x06 0x00
    0x00 0x0D 0x03 0x80 0x09 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0x08 0x03 0x80 0x03 0x01 0x03 0x80 0x09 0x02 0x03 0x80
    0x09 0x05 0x03 0x80 0x0A 0x01 0x03 0x80 0x03 0x03 0x06 0x80 0x07 0x01 0x06 0x00
    0x01 0x49 0x06 0x00 0x00 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0xF0 0x06 0x00 0x00 0x94 0x06 0x00 0x01 0x69 0x03 0x80
    0x09 0x04 0x03 0x80 0x0A 0x06 0x01 0x00 0x00 0x00 0x03 0x80 0x0A 0x07 0x03 0x80
    0x0A 0x09 0x06 0x80 0x10 0x7F;
    0x80 0xB4 0x05 0x00 0x09 0x06 0x03 0x80 0x0A 0x04 0x03 0x80 0x09 0x01 0x7F;
    0x80 0xBC 0x05 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/RefLocation.cap
    0x80 0xB2 0x09 0x00 0x00 0x7F;
    0x80 0xB4 0x09 0x00 0x20 0x09 0x00 0x3A 0x00 0x0E 0x1F 0x02 0x0F 0x0D 0x5A 0x41
    0x11 0x05 0x05 0x41 0x0E 0x05 0x16 0x1A 0x00 0x28 0x04 0x06 0x07 0x04 0x07 0x0A
    0x04 0x08 0x0D 0x07 0x05 0x7F;
    0x80 0xB4 0x09 0x00 0x1D 0x10 0x1D 0x06 0x06 0x06 0x07 0x08 0x08 0x04 0x09 0x12
    0x15 0x10 0x10 0x08 0x04 0x09 0x12 0x15 0x0D 0x0F 0x05 0x06 0x07 0x07 0x07 0x05
    0x0A 0x09 0x7F;
    0x80 0xBC 0x09 0x00 0x00 0x7F;
    0x80 0xBA 0x00 0x00 0x00 0x7F;
    APDU script file for CAP file download generated.
    I used the scriptgen cmd to generate the scr file called walletApp.src
    But I got the error when running jcwde:
    C:\jc22\mydemo>..\bin\jcwde -p 9025 jcwde.app
    Java Card 2.2 Workstation Development Environment (version 0.18).
    Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    jcwde is listening for T=0 Apdu's on TCP/IP port 9,025.
    java.net.SocketException: Connection reset by peer: JVM_recv in socket input str
    eam read
    jcwde terminating on receipt of SimulationException. See previous messages for
    cause.
    com.sun.javacard.jcwde.SimulationException
    I know somethings wrong with my walletApp.scr,
    may I have your advise,
    Thanx

    Sorry...
    I think I was too careless.
    I managed to open the .scr file already.
    I have added some scripts into it and it works properly.
    The scripts I've added:
    powerup;
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
    powerdown;
    But I discovered that my walletApp.scr is totally different with the sample given in the walletdemo directory.
    my walletApp.src:
    powerup;
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
    0x80 0xB0 0x00 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Header.cap
    0x80 0xB2 0x01 0x00 0x00 0x7F;
    0x80 0xB4 0x01 0x00 0x16 0x01 0x00 0x13 0xDE 0xCA 0xFF 0xED 0x01 0x02 0x04 0x00 0x01 0x09 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x0C 0x06 0x7F;
    0x80 0xBC 0x01 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Directory.cap
    0x80 0xB2 0x02 0x00 0x00 0x7F;
    0x80 0xB4 0x02 0x00 0x20 0x02 0x00 0x1F 0x00 0x13 0x00 0x1F 0x00 0x0E 0x00 0x0B 0x00 0x66 0x00 0x12 0x01 0x88 0x00 0x0A 0x00 0x3A 0x00 0x00 0x00 0xDB 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x7F;
    0x80 0xB4 0x02 0x00 0x02 0x01 0x00 0x7F;
    0x80 0xBC 0x02 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Import.cap
    0x80 0xB2 0x04 0x00 0x00 0x7F;
    0x80 0xB4 0x04 0x00 0x0E 0x04 0x00 0x0B 0x01 0x01 0x01 0x07 0xA0 0x00 0x00 0x00 0x62 0x01 0x01 0x7F;
    0x80 0xBC 0x04 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Applet.cap
    0x80 0xB2 0x03 0x00 0x00 0x7F;
    0x80 0xB4 0x03 0x00 0x11 0x03 0x00 0x0E 0x01 0x0A 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x0C 0x06 0x01 0x00 0x01 0x7F;
    0x80 0xBC 0x03 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Class.cap
    0x80 0xB2 0x06 0x00 0x00 0x7F;
    0x80 0xB4 0x06 0x00 0x15 0x06 0x00 0x12 0x00 0x80 0x03 0x02 0x00 0x01 0x04 0x04 0x00 0x00 0x00 0x3A 0xFF 0xFF 0x00 0x2D 0x00 0x42 0x7F;
    0x80 0xBC 0x06 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Method.cap
    0x80 0xB2 0x07 0x00 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x07 0x01 0x88 0x00 0x04 0x30 0x8F 0x00 0x13 0x18 0x1D 0x1E 0x8C 0x00 0x05 0x7A 0x05 0x40 0x18 0x8C 0x00 0x02 0x18 0x8F 0x00 0x03 0x3D 0x06 0x10 0x08 0x8C 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x04 0x87 0x00 0xAD 0x00 0x19 0x1E 0x1F 0x8B 0x00 0x06 0x18 0x8B 0x00 0x07 0x7A 0x01 0x10 0xAD 0x00 0x8B 0x00 0x08 0x61 0x04 0x03 0x78 0x04 0x78 0x01 0x10 0xAD 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x00 0x8B 0x00 0x09 0x7A 0x02 0x21 0x19 0x8B 0x00 0x0A 0x2D 0x18 0x8B 0x00 0x0B 0x60 0x03 0x7A 0x1A 0x03 0x25 0x10 0xB0 0x6A 0x08 0x11 0x6E 0x00 0x8D 0x00 0x0C 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x1A 0x04 0x25 0x75 0x00 0x2D 0x00 0x04 0x00 0x20 0x00 0x27 0x00 0x30 0x00 0x21 0x00 0x40 0x00 0x1B 0x00 0x50 0x00 0x15 0x18 0x19 0x8C 0x00 0x0D 0x7A 0x18 0x19 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x8C 0x00 0x0E 0x7A 0x18 0x19 0x8C 0x00 0x0F 0x7A 0x18 0x19 0x8C 0x00 0x10 0x7A 0x11 0x6D 0x00 0x8D 0x00 0x0C 0x7A 0x03 0x24 0xAD 0x00 0x8B 0x00 0x11 0x61 0x08 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x11 0x63 0x01 0x8D 0x00 0x0C 0x19 0x8B 0x00 0x0A 0x2D 0x1A 0x07 0x25 0x32 0x19 0x8B 0x00 0x12 0x5B 0x29 0x04 0x1F 0x04 0x6B 0x07 0x16 0x04 0x04 0x6A 0x08 0x11 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x67 0x00 0x8D 0x00 0x0C 0x1A 0x08 0x25 0x29 0x05 0x16 0x05 0x10 0x64 0x6E 0x06 0x16 0x05 0x63 0x08 0x11 0x6A 0x83 0x8D 0x00 0x0C 0xAF 0x01 0x16 0x05 0x41 0x11 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x27 0x10 0x6F 0x08 0x11 0x6A 0x84 0x8D 0x00 0x0C 0x18 0xAF 0x01 0x16 0x05 0x41 0x89 0x01 0x7A 0x03 0x24 0xAD 0x00 0x8B 0x00 0x11 0x61 0x08 0x11 0x63 0x01 0x8D 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x00 0x0C 0x19 0x8B 0x00 0x0A 0x2D 0x1A 0x07 0x25 0x32 0x19 0x8B 0x00 0x12 0x5B 0x29 0x04 0x1F 0x04 0x6B 0x07 0x16 0x04 0x04 0x6A 0x08 0x11 0x67 0x00 0x8D 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x0C 0x1A 0x08 0x25 0x29 0x05 0x16 0x05 0x10 0x64 0x6E 0x06 0x16 0x05 0x63 0x08 0x11 0x6A 0x83 0x8D 0x00 0x0C 0xAF 0x01 0x16 0x05 0x43 0x63 0x08 0x11 0x6A 0x85 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x8D 0x00 0x0C 0x18 0xAF 0x01 0x16 0x05 0x43 0x89 0x01 0x7A 0x03 0x22 0x19 0x8B 0x00 0x0A 0x2D 0x19 0x8B 0x00 0x14 0x32 0x19 0x05 0x8B 0x00 0x15 0x1A 0x03 0xAF 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x01 0x8D 0x00 0x16 0x3B 0x19 0x03 0x05 0x8B 0x00 0x17 0x7A 0x04 0x22 0x19 0x8B 0x00 0x0A 0x2D 0x19 0x8B 0x00 0x12 0x5B 0x32 0xAD 0x00 0x1A 0x08 0x1F 0x8B 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x0B 0x18 0x03 0x6B 0x08 0x11 0x63 0x00 0x8D 0x00 0x0C 0x7A 0x7F;
    0x80 0xBC 0x07 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/StaticField.cap
    0x80 0xB2 0x08 0x00 0x00 0x7F;
    0x80 0xB4 0x08 0x00 0x0D 0x08 0x00 0x0A 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x7F;
    0x80 0xBC 0x08 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/ConstantPool.cap
    0x80 0xB2 0x05 0x00 0x00 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0x05 0x00 0x66 0x00 0x19 0x02 0x00 0x00 0x00 0x02 0x00 0x00 0x01 0x06 0x80 0x03 0x00 0x01 0x80 0x09 0x00 0x06 0x80 0x09 0x00 0x06 0x00 0x00 0x0D 0x03 0x80 0x09 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0x08 0x03 0x80 0x03 0x01 0x03 0x80 0x09 0x02 0x03 0x80 0x09 0x05 0x03 0x80 0x0A 0x01 0x03 0x80 0x03 0x03 0x06 0x80 0x07 0x01 0x06 0x00 0x01 0x49 0x06 0x00 0x00 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0xF0 0x06 0x00 0x00 0x94 0x06 0x00 0x01 0x69 0x03 0x80 0x09 0x04 0x03 0x80 0x0A 0x06 0x01 0x00 0x00 0x00 0x03 0x80 0x0A 0x07 0x03 0x80 0x0A 0x09 0x06 0x80 0x10 0x7F;
    0x80 0xB4 0x05 0x00 0x09 0x06 0x03 0x80 0x0A 0x04 0x03 0x80 0x09 0x01 0x7F;
    0x80 0xBC 0x05 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/RefLocation.cap
    0x80 0xB2 0x09 0x00 0x00 0x7F;
    0x80 0xB4 0x09 0x00 0x20 0x09 0x00 0x3A 0x00 0x0E 0x1F 0x02 0x0F 0x0D 0x5A 0x41 0x11 0x05 0x05 0x41 0x0E 0x05 0x16 0x1A 0x00 0x28 0x04 0x06 0x07 0x04 0x07 0x0A 0x04 0x08 0x0D 0x07 0x05 0x7F;
    0x80 0xB4 0x09 0x00 0x1D 0x10 0x1D 0x06 0x06 0x06 0x07 0x08 0x08 0x04 0x09 0x12 0x15 0x10 0x10 0x08 0x04 0x09 0x12 0x15 0x0D 0x0F 0x05 0x06 0x07 0x07 0x07 0x05 0x0A 0x09 0x7F;
    0x80 0xBC 0x09 0x00 0x00 0x7F;
    0x80 0xBA 0x00 0x00 0x00 0x7F;
    powerdown;
    The samples given:
    //+
    // Copyright (c) 1999 Sun Microsystems, Inc. All rights reserved.
    // This software is the confidential and proprietary information of Sun
    // Microsystems, Inc. ("Confidential Information"). You shall not
    // disclose such Confidential Information and shall use it only in
    // accordance with the terms of the license agreement you entered into
    // with Sun.
    // SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
    // SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    // IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
    // PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
    // SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
    // THIS SOFTWARE OR ITS DERIVATIVES.
    // This file contains command APDUs for the wallet applet.
    // Comments lines begin with "//".
    // Non-comment lines are C-APDUs represented by hex digits.
    // Beneath each C-APDU is a comment the corresponding R-APDU expected to be returned
    // by the card.
    // Select all installed Applets
    powerup;
    // Select the installer applet
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
    // 90 00 = SW_NO_ERROR
    // begin installer command
    0x80 0xB0 0x00 0x00 0x00 0x7F;
    // instantiate a wallet applet
    // apdu data contain the applet AID followed by the initial owner PIN
    0x80 0xB8 0x00 0x00 0x11 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
    // end installer command
    0x80 0xBA 0x00 0x00 0x00 0x7F;
    // Initialize Wallet
    //Select Wallet
    0x00 0xA4 0x04 0x00 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x7F;
    // 90 00 = SW_NO_ERROR
    //Verify user pin
    0xB0 0x20 0x00 0x00 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
    //90 00 = SW_NO_ERROR
    //Get wallet balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x00 0x00 0x00 0x90 0x00 = Balance = 0 and SW_NO_ERROR
    //Attemp to debit from an empty account
    0xB0 0x40 0x00 0x00 0x01 0x64 0x7F;
    //0x6A85 = SW_NEGATIVE_BALANCE
    //Credit $100 to the empty account
    0xB0 0x30 0x00 0x00 0x01 0x64 0x7F;
    //0x9000 = SW_NO_ERROR
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x64 0x9000 = Balance = 100 and SW_NO_ERROR
    //Debit $50 from the account
    0xB0 0x40 0x00 0x00 0x01 0x32 0x7F;
    //0x9000 = SW_NO_ERROR
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    //Credit $128 to the account
    0xB0 0x30 0x00 0x00 0x01 0x80 0x7F;
    //0x6A83 = SW_INVALID_TRANSACTION_AMOUNT
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    //Debit $51 from the account
    0xB0 0x40 0x00 0x00 0x01 0x33 0x7F;
    //0x6A85 = SW_NEGATIVE_BALANC
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    //Debit $128 from the account
    0xB0 0x40 0x00 0x00 0x01 0x80 0x7F;
    //0x6A83 = SW_INVALID_TRANSACTION_AMOUNT
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    //Reselect Wallet applet so that userpin is reset
    0x00 0xA4 0x04 0x00 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x7F;
    // 90 00 = SW_NO_ERROR
    //Credit $127 to the account before pin verification
    0xB0 0x30 0x00 0x00 0x01 0x7F 0x7F;
    //0x6301 = SW_PIN_VERIFICATION_REQUIRED
    //Verify User pin with wrong pin value
    0xB0 0x20 0x00 0x00 0x04 0x01 0x03 0x02 0x66 0x7F;
    //0x6300 = SW_VERIFICATION_FAILED
    //Verify user pin again with correct pin value
    //0xB0 0x20 0x00 0x00 0x08 0xF2 0x34 0x12 0x34 0x56 0x10 0x01 0x01 0x7F;
    0xB0 0x20 0x00 0x00 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
    //0x9000 = SW_NO_ERROR
    //Get balance with incorrrect LE value
    0xB0 0x50 0x00 0x00 0x00 0x01;
    //0x6700 = ISO7816.SW_WRONG_LENGTH
    //Get balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    // *** SCRIPT END ***
    powerdown;
    I think I followed exactly the sample given but how come the result is different?
    Will it cause any effect?
    Thanx.

  • Publishing server doesn't work - error 'The request URL doesn't contain the query string for the client OS'

    Hi,
    I'm trying to setup an App-V environment in my lab.
    I've used the App-V 5.0 Trial guide to help me configure all necessary components.
    I'm able to install everything without error.
    when come time to publish an app, it simply doesn't show up on my client.
    after looking at events on the client and server, I found that the Publishing server is returning under Admin the following message.
    'The request URL doesn't contain the query string for the client OS'
    My setup is pretty simple.
    App-V Server managament and Publishing on the same box
    App-V database on my SQL server.
    I'm able to see the publishing "webpage" by using http:://localhost:889.
    It only display this :
    -<Publishing Protocol="1.0"
    <Packages />
    </Publishing>
    I've published one app from the management console.
    any idea what could mean this error?
    thanks

    Hi,
    thanks for the link.
    I've validated the suggested debug steps. It seems that the problem is with my Publish server again.
    I've looked in the web.config file. It seems to be missing some parts compare to the example provided.
    Again, I've published an application from the management console. Management and Publishing are running on the same box, while SQL is remote.
    Here's the web.config
    <?xml version="1.0" ?>
    - <configuration>
    - <system.web>
    <compilation debug="false" targetFramework="4.0" />
    <machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" />
    - <authentication>
    - <!-- We don't support form authentication, but this will supress x-ray security warning
    -->
    <forms requireSSL="true" />
    </authentication>
    </system.web>
    - <system.webServer>
    - <modules runAllManagedModulesForAllRequests="true">
    <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
    - <security>
    - <requestFiltering>
    - <verbs>
    <remove verb="GET" />
    <add verb="GET" allowed="true" />
    </verbs>
    </requestFiltering>
    </security>
    </system.webServer>
    - <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    + <behaviors>
    - <serviceBehaviors>
    - <behavior name="">
    <serviceAuthorization impersonateCallerForAllOperations="true" />
    <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
    </behavior>
    </serviceBehaviors>
    </behaviors>
    - <bindings>
    - <webHttpBinding>
    - <binding name="SecureBinding">
    - <security mode="Transport">
    <transport clientCredentialType="Windows" />
    </security>
    </binding>
    <binding name="UnsecureBinding" />
    </webHttpBinding>
    </bindings>
    - <protocolMapping>
    <add scheme="http" binding="webHttpBinding" bindingConfiguration="UnsecureBinding" />
    <add scheme="https" binding="webHttpBinding" bindingConfiguration="SecureBinding" />
    </protocolMapping>
    - <standardEndpoints>
    - <webHttpEndpoint>
    - <!--
    Configure the WCF REST service base address via the global.asax.cs file and the default endpoint
    via the attributes on the <standardEndpoint> element below
    -->
    <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" />
    </webHttpEndpoint>
    </standardEndpoints>
    </system.serviceModel>
    </configuration>

  • How to get the Class name of an API method?

    Like most of us, it's difficult to know where every method within a Java class is. Also, many of the same methods are scattered throughout Java Classes. I know of two methods that retreive this... getClass().getName(). But, you must have an object to use these. Is there a way to find out what Class contains a method or Class variable thru an Applet or Java Application?? Obviously, I can look at API Docs; but this takes time.
    Tks Randy

    RajEndiran wrote:
    Can anyone please let me know how we can get the class name of a page or region in oracle apex?What do you mean with class name? The name of the template (e.g. the css style class name)?
    I would also like to know how we get the DOM object ID for particular item.Use firebug or inspect the source code of the rendered page to see the object IDs. Other then then, the typical ID of page items is the name of the item. For regions you can set your own ID.

  • Use CAST to check if an instance belongs to inherited classes.

    Dear all.
    I have got a method called GET_LINKS which is supposed to give back all references in an internal table which are of a given class or belong to classes being inherited.
    ( I do not have both - access to the internet and our R3 at once that is why I only provide pseudo code)
    Example:
    think of follwing structure:
      cl_object
         cl_class1
            cl_class11
         cl_class2
            cl_class21
            cl_class22
    so if check against cl_objets the method should give back all references .... if cl_class1 only those who belongs to cl_class1 or class11...you got the idea.
    so My method looks somewhat like following.
    method get_links.
    * changing  ch_instance type ref to object.
    * returnning re_links (table of instances)
    loop at ait_links into lwa_links.
      catch system-exception - move_cast_error
       ch_instance ?= lwa_links-instance.
      endcatch.
      if sy-subrc is initial.
        insert lwa_links into table re_links.  
      endif.
    endloop.
    endmethod.
    coding works fine so far - the only thing I do not like is that I have to provide a changing parameter for the cast. I would prefer a local copy of an importing parameter for the checks.
    But as soon as I use a very generic type declaration - like ref to object - no casting error will take place and I am not able to differentiate the groups down the inheritance.
    I tried to create a dynamic reference variable but failed. I guess I would need to create a type dynamically but this is not possible before 6.4 (and I am on 4.6c)
    Any suggestion for that?
    Thank you very much.
    Christian

    Hi, list my suggestion as following:
    'ch_instance type ref to object'
    As it is defined as an object type,
    'ch_instance ?= lwa_links-instance.' won't catch any error, because OBJECT is the root type of any object type, if you only need to compare them and differentiate the class and inherited class from others, you can do like this:
      catch system-exception - move_cast_error
       lwa_links-instance ?= ch_instance.
      endcatch.
    By the way, I don't know what's the definition of lwa_links-instance is. I wrote some sample code for you scenario, as list it as following:
    * I create two inherited class
    CLASS C1 DEFINITION INHERITING FROM CL_ABAP_TYPEDESCR.
      PUBLIC SECTION.
        DATA: C1  TYPE  C.
    ENDCLASS.
    CLASS C2 DEFINITION INHERITING FROM CL_GUI_CONTROL.
      PUBLIC SECTION.
        DATA: C2  TYPE  C.
        METHODS CONSTRUCTOR.
    ENDCLASS.
    CLASS C2 IMPLEMENTATION.
      METHOD CONSTRUCTOR.
        CALL METHOD SUPER->CONSTRUCTOR EXPORTING NAME = 'aaa'.
      ENDMETHOD.
    ENDCLASS.
    * assume that you have a class, using CL_ABAP_CLASSDESCR
    * we can get the name of it
    DATA:
    descr_ref TYPE ref to CL_ABAP_CLASSDESCR.
      descr_ref ?= cl_abap_typedescr=>DESCRIBE_BY_OBJECT_REF( CLass ).
    * then we can transfer the class name into the module get_links
    module XXXX.
      DATA: A  TYPE  REF TO C1,
            B  TYPE  REF TO C2,
            R  TYPE REF TO OBJECT.
      CREATE OBJECT A.
      CREATE OBJECT R TYPE ('C1').
    * here it goes well
    * as the A type is C1, and R is create as C1 too
      CATCH SYSTEM-EXCEPTIONS MOVE_CAST_ERROR = 1.
        A ?= R.
      ENDCATCH.
      CREATE OBJECT R TYPE ('C2').
    * here it can catch the error
    * as the A type is C1, and R is create as C2, C1 & C2 has
    * no relation like inherit
      CATCH SYSTEM-EXCEPTIONS MOVE_CAST_ERROR = 1.
        A ?= R.
      ENDCATCH.
    * XXXX is the class name which transfered into module
      CREATE OBJECT R TYPE ('XXXX'). 
    * then try to create the class according to class name
    * which is you want
      CATCH SYSTEM-EXCEPTIONS MOVE_CAST_ERROR = 1.
        A ?= R.
      ENDCATCH.
    Hope my reply can help you solve the problem
    By the way, the code cost me some time, so don't forget the reward points
    thanks a lot

  • Problems with smart collection "doesn't contain"

    I have photos with keywords like
    xxxxx, grand canyon,xxxxx
    xxxxx, grand island, xxxxx
    xxxxx, grand sable dunes, xxxxx
    What I need is the abilty creat a smart collection that excludes grand canyon, but leaves in grand island, grand sable dunes
    I can't get doesn't contain to work with
    grand canyon
    "grand canyon"
    Any ideas?

    Tudor asks, "What I need is the ability to create a smart collection that excludes grand canyon, but leaves in grand island, grand sable dunes".   Tudor wants to exclude "grand canyon", but include "grand island", "grand sable dunes", "red rock canyon", and presumably every other keyword except "grand canyon".
    BKKDon's suggestion of
    Match all: Keywords contains grand; Keywords doesn't contain canyon
    doesn't quite work, because it excludes "red rock canyon".   A somewhat better query might be:
    Match none: Keywords contains words grand canyon
    The "contains words grand canyon" will match all images with the words "grand" and "canyon" in the keywords, and "Match none" inverts that and selects all other images.  
    But this still isn't right, because it will exclude an image having the two keywords, "Grand Island" and "Canyon Drive".  As Rob explained, the Keywords criterion splits all the keywords up into "words", and then treats all the words in all the image's keywords as a single field to be searched.
    Two possible workarounds:
    - If you just want to manually exclude images with the keyword "grand canyon", use this recipe: 
    In the Keyword List pane on the right, click the arrow to the right of the keyword "grand canyon".  This will filter just those images with exactly "grand canyon". 
    Select all the images.
    Turn off the filter by clicking None in the Library Filter bar.
    Do Edit > Invert Selection to select all the images that don't have exactly "grand canyon".
    Add the selected images to the Quick Collection or another collection, if necessary.
    - Use the plugins Space Urchin or Any Filter, as Rob suggested.
    In general, LR's text-matching operators are a mess.  Inexplicably, LR doesn't have exact match, the most basic keyword operator, and without exact match, it's difficult to work with a controlled vocabulary of keywords, as this discussion and many others have highlighted.  Users repeatedly get all twisted up trying to understand how to use LR's weird text-match operators.

  • Casting inheritance class in instance

    Hi All..
    my question is almost same as the question in this post:
    http://forum.java.sun.com/thread.jspa?threadID=545767&messageID=2655556
    in the post, charlie2086 ask how to access method in class ComputerPlayer when play declared as:
    Player play = new ComputerPlayer();jsalonen answer with 3 solutions:
    1) Declare the method in the Player class
    2) Declare play as ComputerPlayer rather than Player
    3) Cast play to ComputerPlayer before accessing the method. It is:
    ((ComputerPlayer)play).theMethod();But however, i would like to ask, is it possible to cast the inheritance class? what i mean is, play declared as:
    Player play = new ComputerPlayer();and apply a 1 time casting in the instance, so that each time will no need to apply:
    ((ComputerPlayer)play).theMethod();when access methods in class ComputerPlayer
    Thx or ur all helps..

    But however, i would like to ask, is it possible to
    cast the inheritance class? what i mean is, play
    declared as:
    Player play = new ComputerPlayer();
    and apply a 1 time casting in the instance, so that
    each time will no need to apply:
    ((ComputerPlayer)play).theMethod();when access methods in class ComputerPlayer
    Oh yes, you could do that, but you will have to it in a variable like this
              ComputerPlayer cPlayer = ((ComputerPlayer)play) ;
              //now use cPlayer variable to access methods in class ComputerPlayer
       play has been declared as type 'Player' . So if u want 2 use the 'play' variable, then ofcourse you will have 2 cast it each time.
    however, if u r class has been properly designed, u could, using play access all methods of ComputerPlayer (either inherited from Player or overridden in ComputerPlayer), except those methods defined exclusively by ComputerPlayer (i.e not inherited from Player).
    tx,
    ram.

  • Trouble with  instantiating inherited classes in a switch statement

    Hi
    I have few inherited classes which I need to instantiate in a switch statement based on command line argument supplied by user. I am ble to do that but I cannot access any methods once I come out of the switch scope. Please suggest a way to resolve this problem. The error I am getting is in the end of code in comments // //. Would really appreciate your help.
    Thanks
    Here is the code.
    package assignment2;
    import java.util.*;
    import java.io.*;
    abstract class Parent
    abstract void childclassDescription();
    void generalDescriptionToAllChilds()
    System.out.println("general to all child classes");
    childclassDescription();
    class Child1 extends Parent
    public void childclassDescription()
    System.out.println("i'm child1");
    class Child2 extends Parent
    public void childclassDescription()
    System.out.println("i'm child2");
    class Child3 extends Parent
    public void childclassDescription()
    System.out.println("i'm child3");
    public class Demo
    public static void main(String[] args)
    int option;
    Parent p;
    System.out.println("Pick from one of the following:");
    option=1; // supplying
    switch(option)
    case 1:
    p=new Child1();
    break;
    case 2:
    p=new Child2();
    break;
    case 3:
    p=new Child3();
    default:
    break;
    p.generalDescriptionToAllChilds();
    //error variable p might not have been initialized at line //
    }

    Well I also think that in Java, it is possible for a reference type variable to refer to nothing at all. A reference that refers to nothing at all is called a null reference . By default, an uninitialized reference is null.
    We can explicitly assign the null reference to a variable like this:
    f = null;
    But still i am not quety sure why you needed to do it.

  • Converting a string to Class object and calling its method

    I have recently moved to Java and I need help on this specific issue given below.
    I have to do this :
    ValModule1 val1 = new ValModule1();
    ValModule2 val2 = new ValModule2();
    if(val1.checkModule(xmlDocument)){
    $i++;
    There are many ValModule* classes and they all have the method called checkModule in them. I need to instantiate each class and run the checkMethod which returns true or false. My problem is that I am trying to get the name of the module (if it is ValModule1 or 2 or 3) from the user. What I get from the user is the name of the class for which I should call checkModule method on.
    how can I convert this string validationname given by the user and instantiate that class and call the method?
    I have tried this:
    String str="c:/xpathtest/src/Plugin_Config.xml";
    File xmlDocument = new File(str);
    String cls = "ValModule1"; // assuming this is what the user gave me
    Class t = Class.forName("ValModule1");
    Object o = t.newInstance();
    After that if I try
    if(o.checkModule(xmlDocument)){
    $i++;
    It gives me an error saying that it is not an existing method
    cannot resolve symbol
    [javac] symbol : method checkModule (java.io.File)
    [javac] location: class java.lang.Object
    [javac] if(o.checkModule(xmlDocument)){
    [javac] ^
    [javac] 1 error
    Can you please let me know where I am screwing up :-) ? If you need me to put both the programs I can do that too. Thanks in Anticipation

    I have recently moved to Java and I need help on this
    specific issue given below.
    I have to do this :
    ValModule1 val1 = new ValModule1();
    ValModule2 val2 = new ValModule2();
    if(val1.checkModule(xmlDocument)){
    $i++;
    There are many ValModule* classes and they all have
    the method called checkModule in them. I need to
    instantiate each class and run the checkMethod which
    returns true or false. My problem is that I am trying
    to get the name of the module (if it is ValModule1 or
    2 or 3) from the user. What I get from the user is
    the name of the class for which I should call
    checkModule method on.
    how can I convert this string validationname given by
    the user and instantiate that class and call the
    method?
    Define an interface containing the method all your classes have in common, cast the Object reference returned by newInstance to that interface, then you can call that method.
    Good Luck
    Lee

  • DataSocket JavaBean doesn't contain any beans. Why not?

    I can't get my DataSocket JavaBean to install in my Java application. I can't find any classes and I try loading it into a Java BeanBox and it gives me the error that it doesn't contain any beans. Anyone know how to fix this or what I'm doing wrong? I need to be able to communicate between a Java Application and LabVIEW RT.

    have you tried to import the whole class inot your bean application?

  • This disk doesn't contain an EFI system partition. If you want to start up your computer with this disk or include it in a RAID set, back up your data and partition this disk.

    As stated above. I get this when I try to resize my HD. Was having issues with BootCamp so I removed it and got this.
    This disk doesn’t contain an EFI system partition. If you want to start up your computer with this disk or include it in a RAID set, back up your data and partition this disk.

    the same problem...
    any help?

  • When trying to upload a MS word file (.docx) to gmail, it uploads into a folder that doesn't contain the original document when i try to download it from e-mail.  how do i solve this?

    when trying to upload a MS word file (.docx) to gmail, it uploads as a 'folder' that doesn't contain the original document when i try to download it back from the e-mail.  how do i set the format to simply upload the document itself???  Thanks...

    Yes, excuse me. attach a file.  I have separate folders on my desktop to organize my word documents, so I'm guessing this might be a part of the problem.  When I go to attach one of these documents into gmail, the resulting attachment is another folder icon (not the original organizational folders) with 4 subfolders containing a slew of .xml files reading things like "header.xml" "format.xml" "settings.xml" "style.xml" "contenttype.xml" There are also a few .jpegs and a small folder reading "word" as one of the subfolders.

Maybe you are looking for

  • The file download window keep coming up wheneven i...

    Wheneven i opened the skype, it will come out a file download asking me to open or save the index.html or chatwidget.html and recently skype require me to change password so after that i cant log in anymore because everytime i go inside if i click ca

  • Outbound IDOC - Sender and reciever

    Hello SDNites, I have created a report pgm which is equipped to send an outbound IDOC i.e used FM 'MASTER_IDOC_DISTRIBUTE'. Can someone please tell me how do I decide my sender and reciever when populating the control record in this FM. I know sender

  • Brarchive through Db13

    Hi Support Team, Here we have an issue while taking backup of our Golden Master.We are trying to take backup through db13 ( whole database online + redo log backup).We are copying the whole databse backup to the local harddisk of the golden master se

  • Error Message OCI-21710

    All, I am getting an error message from Oracle (I assume) when I attempt a insert statment. The insert is happening against a table to contains a spatial column. This error does not happen all the time and can only be fixed by bouncing our app server

  • Linking Frames Problem

    Here's the deal, I have a left frame, right frame, and mainframe. In the left frame I have a list of main categories that I am linking to subcategories in the right frame. To do this, I created new HTML pages and typed the lists on those. So when I c