Results 1 to 5 of 5
  1. #1
    LordBios is offline Member
    Join Date
    Jan 2010
    Posts
    3
    Rep Power
    0

    Default WordSearchAPI cannot be applied to (java.lang.String)

    Receiving an err and can not figure it out:

    WordSearchAPI cannot be applied to (java.lang.String)
    [javac] if (api.executeKey1(word)) {
    [javac] ^


    WordSearch.java

    Java Code:
      public void doNext() {
        int x = 0;
        ICD9WordSearchAPI api = new ICD9WordSearchAPI();
        ICD9SearchAPI number_api = new ICD9SearchAPI();
        if (api.executeKey1(word)) {
          while (api.next() && x < 10) {
            ICD9Word ic = new ICD9Word(api.getRecord());
            records.add(number_api.getRecordFromIndex(ic.getIcd9Code()));
            //records.add(api.getRecord());
            x++;
          }
        }
        api.close();
      }
    WordSearchAPI.java
    Java Code:
      public boolean executeKey1(String word, String sequence) {
        PicX pword = new PicX(25, word);
        PicX psequence = new PicX(18, sequence);
        PicX passin = new PicX(43, pword.toStringWithSpaces() + psequence.toStringWithSpaces());
        Boolean returnstatus = new Boolean(false);
        boolean returnVal = false;
        Object[] objs = {
            returnstatus, passin};
        try {
          returnVal = runtime.cobcall_boolean("JAPISL211SEARCHKEY1", objs);
        }
        catch (COBOLException ex) {
          System.out.println(ex.toString());
        }
        catch (Exception ex) {
          System.out.println(ex.toString());
        }
        return returnVal;
      }
    Any help would be greatly appreciated.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,352
    Blog Entries
    7
    Rep Power
    20

    Default

    Your code:
    Java Code:
    api.executeKey1(word)
    Their code:
    Java Code:
      public boolean executeKey1(String word, String sequence) {
    Do you recognize something here?

    kind regards,

    Jos

  3. #3
    LordBios is offline Member
    Join Date
    Jan 2010
    Posts
    3
    Rep Power
    0

    Default Yikes!

    :eek: two parameters!

  4. #4
    LordBios is offline Member
    Join Date
    Jan 2010
    Posts
    3
    Rep Power
    0

    Default

    "He can't see without his glasses!"

    Thank you,

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,352
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by LordBios View Post
    :eek: two parameters!
    Yup, now do your work my dear Watson.

    kind regards,

    Jos

Similar Threads

  1. Replies: 2
    Last Post: 11-26-2010, 02:12 AM
  2. Replies: 3
    Last Post: 12-01-2008, 05:40 AM
  3. Replies: 4
    Last Post: 11-27-2008, 06:09 AM
  4. Replies: 2
    Last Post: 09-18-2008, 07:30 AM
  5. Error: cannot be applied to (java.lang.String)
    By carl in forum New To Java
    Replies: 1
    Last Post: 08-05-2007, 06:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •