Help with AUTOMAKE_OPTIONS = subdir-objects

I'm trying to put all objects and binaries in the same directory, I have the following project tree:
./configure
./Makefile.am
+ src/
-- main.cpp
+ build/
-- Makefile.am
This is my configure.ac:
AC_INIT([gtkalarm], [1.0], [[email protected]])
AC_CONFIG_SRCDIR([src/main.cpp])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_PROG_INTLTOOL
AC_CONFIG_MACRO_DIR([m4])
AX_CXX_COMPILE_STDCXX_0X
AX_CXX_COMPILE_STDCXX_11
# Checking debug or release enable
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debug mode for the maintainer.]), [enable_debug=yes], [enable_debug=no])
state_debug=false
AS_IF([test "x$enable_debug" = "xyes"],
AC_MSG_NOTICE([********* Debug is enabled *****])
CXXFLAGS="$CXXFLAGS -g3 -O0"
AC_DEFINE(DEBUG,1,[Debugging])
state_debug=true
AC_MSG_NOTICE([********* Release is enabled *****])
CXXFLAGS="$CXXFLAGS -s"
AC_SUBST(CXXFLAGS)
AM_CONDITIONAL([ENABLE_DEBUG], [$state_debug])
# Checking for gettext: requiered
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.18.3])
GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [package name for gettext])
AC_OUTPUT(
po/Makefile.in
Makefile
build/Makefile
my build/Makefile.am
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
if ENABLE_DEBUG
UI_PATH = "$(abs_top_builddir)/data/@[email protected]"
ICON_PATH = "$(abs_top_builddir)/data/@[email protected]"
OGG_PATH = "$(abs_top_builddir)/data/@[email protected]"
locale_dir = "$(abs_top_builddir)/locale"
else
UI_PATH = "@datadir@/@PACKAGE@/@[email protected]"
ICON_PATH = "@datadir@/pixmaps/@[email protected]"
OGG_PATH = "@datadir@/@PACKAGE@/@[email protected]"
locale_dir = "$(datadir)/locale"
endif
bin_PROGRAMS = gtkalarm
gtkalarm_SOURCES = ../src/main.cpp
AM_CXXFLAGS = -DUI_PATH='$(UI_PATH)' -DICON_PATH='$(ICON_PATH)' -DOGG_PATH='$(OGG_PATH)' -DLOCALEDIR=\"$(locale_dir)\"
LDADD = $(LTLIBINTL)
When I hit "make", the binary is placed on "build" as expected, but the object files are in the "src" directory, any ideas how to put object files on "build" directory too?

What do you want to actually achieve? Simply seperating the source files from the binaries and object files? If so, I usually just make a seperate build directory, in which I make the binaries. Something like
mkdir build && cd build
../configure
make
Then your source directories are "mirrored" in the build directory and the object files are dumped therein.

Similar Messages

  • Help with httpService returnFormat "object"

    Problem:
    My flex httpservice returns an xml file in the "object"
    resultFormat.
    How could I get the count of all childNodes of an object in
    that returned object tree.
    For example, in the xml file below:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <reporting>
    <series>
    <title>Edge Page Views, in Page Views per
    Second</title>
    <xLabel>startdatetime</xLabel>
    <y1Label>sum(pageviews)</y1Label>
    <data>
    <x>1216233600</x>
    <y1>79.605</y1>
    </data>
    <data>
    <x>1216233900</x>
    <y1>78.076</y1>
    </data>
    </series>
    <series>
    <title>Total Bandwidth, in Mbits per
    Second</title>
    <xLabel>startdatetime</xLabel>
    <y1Label>sum(egress_bytes_mbps)</y1Label>
    <y2Label>combined_midgress_bytes_mbps</y2Label>
    <y3Label>ovh_bytes_mbps</y3Label>
    <y4Label>sum(ingress_bytes_mbps)</y4Label>
    <data>
    <x>1216233600</x>
    <y1>36.160352</y1>
    <y2>66.48362700000001</y2>
    <y3>66.48362700000001</y3>
    <y4>96.01235200000002</y4>
    </data>
    <data>
    <x>1216233900</x>
    <y1>34.260794</y1>
    <y2>62.10649799999999</y2>
    <y3>62.10649799999999</y3>
    <y4>88.902323</y4>
    </data>
    <data>
    <x>1216234200</x>
    <y1>35.329617</y1>
    <y2>62.77339099999999</y2>
    <y3>62.77339099999999</y3>
    <y4>89.30751</y4>
    </data>
    </series>
    </reporting>
    The first series element has 4 children
    I am able to get the number of data elements as:
    "resultObj.reporting.series[0].data.length"
    How do I effectively retreive:
    "resultObj.reporting.series[0].childNodes().length"
    Apparently this does'nt work, I also tried Nodes, children().
    Any documentation or help with this would be awesome
    Thanks a ton
    Pranay

    Can someone please help me understand this error maybe?
    I would appreciate it
    [MessagingError message='Destination 'the destination of an
    xml file' either does not exist or the destination has no channels
    defined (and the application does not define any default
    channels.)']
    what are channels?

  • Help with a smart object

    While I'm in ps cs5 and have converted a layer to a smart object, when I click/double click on the layer or the icon it will not open into camera raw. I have tried this with jpgs, tiffs and psd files, I have no other problems with raw, bridge of photoshop. I have also downloaded the latest patch from Adobe, any help would be appreciated/

    Um, the function of Smart Objects isn't to invoke Camera Raw, in general. 
    You only get that behavior if you open a raw conversion as a Smart Object, in which case the Camera Raw plug-in embeds the raw file in the Smart Object layer in the document.  Specifically because it has done that and is a "raw file smart object" it knows to go back to Camera Raw when you double-click it.
    -Noel

  • Help with set(index, object) please / new to java

    private static void setDobject(Rectangle [] setrect)
              LinkedList<Rectangle> rects = new LinkedList<Rectangle>();
              Rectangle myrectangle = new Rectangle(9.0,9.0);                                                                  
                 rects.set(1,myrectangle);
              for(Rectangle x : setrect)
                   System.out.print("Rectangle: ");
                   System.out.println(x.getLength() + " by " + x.getWidth());
              }  //End of for loop
         }  //End of unsorted
         }  the other previous code works, i have used the add(object) and it works here is the code for that:
    private static void addDobject(Rectangle [] addrect)
              LinkedList<Rectangle> rects = new LinkedList<Rectangle>();
              Rectangle myrectangle = new Rectangle(9.0,9.0);                                                                  
                 rects.add(myrectangle);
                 for(Rectangle x : rects)
                   System.out.print("Rectangle: ");
                   System.out.println(x.getLength() + " by " + x.getWidth());
              }  //End of for loop
              System.out.println();
         }  //End of unsorted
    this is the output error it is giving me :
    Part 1 : An Array List of Rectangles
    Enter length or 999 to exit: 3
    Enter width: 2
    Enter length or 999 to exit: 1
    Enter width: 2
    Enter length or 999 to exit: 10
    Enter width: 20
    Enter length or 999 to exit: 999
    Rectangle: 3.0 by 2.0
    Rectangle: 1.0 by 2.0
    Rectangle: 10.0 by 20.0
    Display Object with added item
    Rectangle: 3.0 by 2.0
    Rectangle: 1.0 by 2.0
    Rectangle: 10.0 by 20.0
    Rectangle: 9.0 by 9.0
    Displaying Objects with SET item
    Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size:
    0
    at java.util.LinkedList.entry(LinkedList.java:365)
    at java.util.LinkedList.set(LinkedList.java:328)
    at Lab11.setDobject(Lab11.java:129)
    at Lab11.main(Lab11.java:78)
    Press any key to continue...
    finally here is the Rectangle class i'm using:
    public class Rectangle
        private double length;     // Instance variables
        private double width;
        public Rectangle(double l, double w)  // Constructor method
            length = l;
            width = w;
        } // end Rectangle constructor
        public double getLength()             // getter 
             return length;
        } // end getLength
         public double getWidth()             // getter 
             return width;
        } // end getWidth
        public void setLength(double l)      // setter 
             length = l;
        } // end setLength
         public void setWidth(double w)     // setter 
             width = w;
        } // end setWidth
         public double calculateArea()         // calculation method
            return length * width;
        } // end calculateArea
        public void displayRectangle()         // display method
            System.out.println("Rectangle Length = " + length);
            System.out.println("Rectangle Width = " + width);               
        } // end displayRectangle
    } // Rectangle ClassHope you can help guys! thanks!

    LinkedList<Rectangle> rects = new LinkedList<Rectangle>();rects is an empty LinkedList at this point. It has no elements added to it.
    rects.set(1,myrectangle);So you can't set the item at index 1 (the 2nd element in the list) because it doesn't even exist. You need to add items to it.

  • Help with a Invalid Object

    Hello!
    I have here 6 invalid objects, but 5 are view's and olny this is a procedure that i dont now where i put the INTO that the oracle say me. Somebody can help me?
    the error message is:
    Line # = 51 Column # = 4 Error Text = PLS-00428: an INTO clause is expected in this SELECT statement
    and the SELECT is:
    SELECT clientemp.rut, REPLACE (razon, '''', '') AS RAZON, ultima_boleta.numdoc AS NUMDOC,
    TO_CHAR (ultima_boleta.fecvct, 'dd-mm-yyyy') AS FECHA_ULT,
    SUM (saldo) - NVL (SUM (saldo_cuotas), 0) AS SALDO
    FROM clientemp, cuotas_novencidas, ultima_boleta
    WHERE empresa = '760208701'
    AND sede = 'Santiago'
    AND SALDO > 0
    AND SALDO <= 99999999
    AND cuotas_novencidas.cliente(+) = clientemp.cliente
    AND ultima_boleta.cliente = clientemp.cliente AND LENGTH(clientemp.rut)<10
    GROUP BY clientemp.rut,
    clientemp.cliente,
    REPLACE (razon, '''', ''),
    ultima_boleta.numdoc,
    TO_CHAR (ultima_boleta.fecvct, 'dd-mm-yyyy');
    i allready tryed so many options, but without solution.
    Thanks!

    When I see this error... I could assume that the select statement is inside a PL/SQL block.
    And you might need these columns into the variables. If you have declared the variables, make an "INTO" into those from these columns you are selecting.
    example:
    declare
    num number;
    begin
    select 1 into num from dual;
    dbms_output.put_line(num);
    end;

  • Help with a program (object modelling)

    Hi. I hope someone can help me with this, give me some hints.
    First there is a category Human, which has information about name, gender and age.
    Human shall be saved in a class Town using a table.
    The constructor Town(int numberhumans) has parameters, which says the number of humans the town can have (maximum).
    Can anyone help me get started?

    Great, let's see the code you've come up with so far.

  • Help with constraints on object relational tables

    Hi
    I am looking to create an object relational database with a check constraint on the relationships. For example:
    * I have table called person_tab which is a table of person_t type.
    * Person_t type is inherited by the manager_t type and the applicant_t type.
    * I have a second table called interview_tab of interview_t type.
    * The interview table has two columns (manager and appilcant) that are scope restrained to the person table.
    * I would also like to put check constraints on these columns to say:
    ----- Manager: check the person_number is less than 20000
    ----- Applicant: check the person_number is greater than 19999
    Can anyone tell me if this is possible and if so how can it be done?
    Thanks in advance
    Stephen

    You have circular dependencies (manager_t depends upon interview_list_t depends upon interview_t depends upon manager_t) which I don't think is a good idea. But then that's probably just my old-fashioned relational head baulking at this new-fangled OO way of looking at data models. However, my experience with using types and subtypes in Oracle does teach me that this is a complete pain in the neck, because it makes changing your Type definitions a very awkward process.
    am I right in saying I cannot use the check constraint?I think so. If the value range for ID is a property of being a Manager or an Applicant then properly that should be enforced by those types not by the Interview type. Then all that Interviews needs to worry about is that it gets instantiated with attributes of the correct Type.
    I've simplified your model a bit. To start with I'm going to create a single PERSONS table to store both managers and applicants...
    SQL> CREATE TYPE person_t AS OBJECT (
      2  personno NUMBER,
      3  surname VARCHAR2(30),
      4  forename VARCHAR2(30),
      5  dob DATE
      6  ) NOT FINAL;
      7  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE applicant_t UNDER person_t
      2  (qualifications varchar2(200))
      3  FINAL ;
      4  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE manager_t UNDER person_t
      2  (extension varchar2(5)) FINAL;
      3  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE interview_t AS OBJECT (
      2  interviewno NUMBER,
      3  idate DATE,
      4  itime NUMBER,
      5  interest NUMBER,
      6  is_made_by REF manager_t,
      7  attended_by REF applicant_t
      8  ) ;
      9  /
    Type created.
    SQL>
    SQL>
    SQL> CREATE TABLE persons OF person_t
      2  /
    Table created.
    SQL> CREATE TABLE interviews OF interview_t
      2  /
    Table created.
    SQL> Okay let's create some objects...
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  person_t;
      6     a_ref REF person_t;
      7  begin
      8     INSERT INTO persons p VALUES mgr
      9         RETURNING REF(p) INTO m_ref   ;
    10     INSERT INTO persons p VALUES app
    11         RETURNING REF(p) INTO a_ref   ;
    12     insert into interviews
    13     values (interview_t(1001, sysdate, 45, 5, TREAT(m_ref AS REF manager_t)
            , TREAT(a_ref AS REF applicant_t)));
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001 RUNCITER                       CHIP                                
    SQL> Have we got integrity?
    SQL> rollback
      2  /
    Rollback complete.
    SQL>
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  person_t;
      6     a_ref REF person_t;
      7  begin
      8     INSERT INTO persons p VALUES mgr
      9         RETURNING REF(p) INTO m_ref   ;
    10     INSERT INTO persons p VALUES app
    11         RETURNING REF(p) INTO a_ref   ;
    12     insert into interviews
    13     values (interview_t(1001, sysdate, 45, 5, TREAT(a_ref AS REF manager_t)
             , TREAT(m_ref AS REF applicant_t)));
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001                                                                    
    SQL> Kind of, but it's not very satisfactory. Let's use separate tables for MANAGERS and APPLICANTS...
    SQL> rollback
      2  /
    Rollback complete.
    SQL>
    SQL> CREATE TABLE managers OF manager_t
      2  /
    Table created.
    SQL>
    SQL> CREATE TABLE applicants OF applicant_t
      2  /
    Table created.
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  manager_t;
      6     a_ref REF applicant_t;
      7  begin
      8     INSERT INTO managers m VALUES mgr
      9         RETURNING REF(m) INTO m_ref   ;
    10     INSERT INTO applicants a VALUES app
    11         RETURNING REF(a) INTO a_ref   ;
    12     insert into interviews values (interview_t(1001, sysdate, 45, 5, m_ref, a_ref));
    13 
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001 RUNCITER                       CHIP                                
    SQL> rollback
      2  /
    Rollback complete.
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  manager_t;
      6     a_ref REF applicant_t;
      7  begin
      8     INSERT INTO managers m VALUES mgr
      9         RETURNING REF(m) INTO m_ref   ;
    10     INSERT INTO applicants a VALUES app
    11         RETURNING REF(a) INTO a_ref   ;
    12     insert into interviews values (interview_t(1001, sysdate, 45, 5, a_ref, m_ref));
    13 
    14  end;
    15  /
       insert into interviews values (interview_t(1001, sysdate, 45, 5, a_ref, m_ref));
    ERROR at line 12:
    ORA-06550: line 12, column 69:
    PL/SQL: ORA-00932: inconsistent datatypes: expected REF APC.APPLICANT_T got REF
    APC.MANAGER_T
    ORA-06550: line 12, column 4:
    PL/SQL: SQL Statement ignored
    SQL>I hope that's useful to you.
    Cheers, APC
    Layout of SQL*Plus session tweaked for readability
    Message was edited by:
    APC

  • Need help with OCI8::Cursor object

    I'm using ActiveRecord::Base.connection.execute to run a SQL statement against an Oracle schema that is "external" to my Rails database.
    I'm building the connection on the fly using connection parameters stored in my Rails database (MySQL).
    So far so good...I can create the connection and run the query...I'm getting back an OCI8::Cursor object and that's where I'm stuck.
    I need to display the results of the query in a Rails view.
    New to Ruby and I'm not sure how to proceed.
    Here's what I'm getting back:
    #<OCI8::Cursor:0xb76c679c @stmttype=1, @svc=#<OCISvcCtx:0xb76c6c24>, @env=#<OCIEnv:0xb7765928>, @defns=[nil, #<OCIDefine:0xb76c5d10>, #<OCIDefine:0xb76c5cd4>, #<OCIDefine:0xb76c5c5c>, #<OCIDefine:0xb76c5bf8>, #<OCIDefine:0xb76c5bd0>, #<OCIDefine:0xb76c5ba8>, #<OCIDefine:0xb76c5b80>, #<OCIDefine:0xb76c5b58>, #<OCIDefine:0xb76c5b30>, #<OCIDefine:0xb76c5b08>, #<OCIDefine:0xb76c5ae0>, #<OCIDefine:0xb76c5ab8>, #<OCIDefine:0xb76c5a90>, #<OCIDefine:0xb76c5a68>, #<OCIDefine:0xb76c5a40>, #<OCIDefine:0xb76c5a18>, #<OCIDefine:0xb76c59f0>, #<OCIDefine:0xb76c59c8>, #<OCIDefine:0xb76c59a0>, #<OCIDefine:0xb76c5978>, #<OCIDefine:0xb76c5950>, #<OCIDefine:0xb76c5928>, #<OCIDefine:0xb76c5914>, #<OCIDefine:0xb76c58d8>, #<OCIDefine:0xb76c58b0>, #<OCIDefine:0xb76c5888>, #<OCIDefine:0xb76c5860>, #<OCIDefine:0xb76c5838>, #<OCIDefine:0xb76c5810>, #<OCIDefine:0xb76c57e8>, #<OCIDefine:0xb76c57c0>, #<OCIDefine:0xb76c5798>, #<OCIDefine:0xb76c5770>, #<OCIDefine:0xb76c5748>, #<OCIDefine:0xb76c5720>, #<OCIDefine:0xb76c56f8>, #<OCIDefine:0xb76c56d0>, #<OCIDefine:0xb76c56a8>, #<OCIDefine:0xb76c5680>, #<OCIDefine:0xb76c5658>, #<OCIDefine:0xb76c5630>, #<OCIDefine:0xb76c5608>, #<OCIDefine:0xb76c55e0>, #<OCIDefine:0xb76c55b8>, #<OCIDefine:0xb76c5590>, #<OCIDefine:0xb76c5568>, #<OCIDefine:0xb76c5540>, #<OCIDefine:0xb76c5518>, #<OCIDefine:0xb76c54f0>, #<OCIDefine:0xb76c54c8>, #<OCIDefine:0xb76c54a0>], @binds=nil, @ctx=[32, #<Mutex:0xb76c6c38>, nil, 65535], @parms=[#<OCIParam:0xb76c66c0>, #<OCIParam:0xb76c66ac>, #<OCIParam:0xb76c6698>, #<OCIParam:0xb76c6684>, #<OCIParam:0xb76c6670>, #<OCIParam:0xb76c665c>, #<OCIParam:0xb76c6648>, #<OCIParam:0xb76c6634>, #<OCIParam:0xb76c6620>, #<OCIParam:0xb76c65f8>, #<OCIParam:0xb76c65e4>, #<OCIParam:0xb76c65d0>, #<OCIParam:0xb76c65bc>, #<OCIParam:0xb76c65a8>, #<OCIParam:0xb76c6594>, #<OCIParam:0xb76c6580>, #<OCIParam:0xb76c656c>, #<OCIParam:0xb76c6558>, #<OCIParam:0xb76c6544>, #<OCIParam:0xb76c6530>, #<OCIParam:0xb76c651c>, #<OCIParam:0xb76c6508>, #<OCIParam:0xb76c64f4>, #<OCIParam:0xb76c64e0>, #<OCIParam:0xb76c64cc>, #<OCIParam:0xb76c64b8>, #<OCIParam:0xb76c64a4>, #<OCIParam:0xb76c6490>, #<OCIParam:0xb76c647c>, #<OCIParam:0xb76c6418>, #<OCIParam:0xb76c638c>, #<OCIParam:0xb76c62c4>, #<OCIParam:0xb76c61e8>, #<OCIParam:0xb76c6080>, #<OCIParam:0xb76c6058>, #<OCIParam:0xb76c5fcc>, #<OCIParam:0xb76c5fb8>, #<OCIParam:0xb76c5f68>, #<OCIParam:0xb76c5f54>, #<OCIParam:0xb76c5ea0>, #<OCIParam:0xb76c5e64>, #<OCIParam:0xb76c5e14>, #<OCIParam:0xb76c5e00>, #<OCIParam:0xb76c5dec>, #<OCIParam:0xb76c5dd8>, #<OCIParam:0xb76c5dc4>, #<OCIParam:0xb76c5db0>, #<OCIParam:0xb76c5d9c>, #<OCIParam:0xb76c5d88>, #<OCIParam:0xb76c5d74>, #<OCIParam:0xb76c5d60>], @stmt=#<OCIStmt:0xb76c6760>>
    My problem is that I simply don't have a firm enough grasp on the basics of Ruby to dissect this thing and get at it's innards.
    If someone could drop me a code snippet that shows how to reference the contents of this in my erb file I think I'll be off to the races.

    If you want low level access to Oracle database then you can use ruby-oci8 API directly without using ActiveRecord.
    You can read about ruby-oci8 API at http://ruby-oci8.rubyforge.org/en/api.html
    But if you want to use ActiveRecord then install and use oracle_enhanced adapter, see http://wiki.github.com/rsim/oracle-enhanced
    If you have any questions about oracle_enhanced adapter then probably it is better to ask them in http://groups.google.com/group/oracle-enhanced discussion group.
    It is not recommended approach to establish ActiveRecord connection and then use low level ruby-oci8 API.
    And if you have some problem then please describe exactly what you are doing and what you would like to achive and then also what error do you get.

  • Help with displaying an object from one class to a text box in another

    Hi everyone,
    Just a quick question
    I have a public class called Order which is in a processing folder;
    within this class I have a method which gets a sold basket (which is just a list of items sold)
    and adds it to another array list;
    public synchronized SoldBasket getOrderToPick()
    throws OrderException
    if (theWaitingTray.size()>0){
    thePickingTray.add(theWaitingTray.remove(0));
    System.out.print(""+toBePicked);
    return toBePicked;
    else{
    return null;
    The other class is a GUI which has a button called CHECK which is for the warehouse stock picker to see if any orders have been placed on the button I have this code;
    public void actionPerformed( ActionEvent ae ) // Interaction
    if ( theStock == null )
    theAction.setText("No conmection");
    return;
    String actionIs = ae.getActionCommand();
    try{
    if ( actionIs.equals( Name.CHECK ) ){
    theOutput.setText(""+theOrder.getOrderToPick());
    catch(OrderException e){
    System.out.print(e);
    However I am still getting a null pointer exception any ideas??
    Thanks !!

    I don't see enough information here to be able to answer this question. Try
    1) posting code here with code tags by using the CODE button above the Message window and checking your post with the Preview tab before posting it.
    2) Posting a small bit of code that compiles without need for other files, classes or non-standard classes and illustrates your problem, an SSCCE.
    Good luck.

  • Help With Multiple Class Objects With Methods

    I am dealing with multiple classes. I am wondering why I am getting an error on this line it's by the bottom
              obj1.array() = newArray[i];
    It gives the array out of bounds. On another note I believe I can change obj1 to just like incomingArray if I wanted correct since it's just a reference because I should be able to do this method sort on any array.
    method : selSort
    input - none
    output - void
    This is where we sort the arary
    Pseudocode Code:
    1 Initialize variable oldlocation to hold spot of smallest number in original array
    2 Initialize variable smallnumber to store smallest number in original array
    3 Initialize new integer array
    4 Set new array length to length of original array
    5 Initialize variable length to store lengh of new array
    6 For i = 0 and continue till i < new array length
    6.1 Find smallest number in original array
    6.2 Put the smallest number in new array
    6.3 Remove smallest number from original array
    7 Copy contents of new array that is sorted to original array
    Basic concept is to repetitively find the smallest
    (or largest) item in the original array. Once smallest
    is found, move it to the next spot in a new array and
    remove it from the old array.
    public void selSort ()
         int oldlocation = 0;
         int smallnumber = 0;
         int [] newArray = obj1.array();
         newArray = new int [obj1.length()];
         int length = newArray.length;
         for (int i = 0; i < newArray.length; i++)
    //          System.out.println("Test 1");
              newArray[i] = obj1.sortSmall();
    //          System.out.println("Test 2");
              smallnumber = obj1.sortSmall();
    //          System.out.println("This is the smallest number " + smallnumber);
              oldlocation = obj1.location(smallnumber);
    //          System.out.println("This is the old location " + oldlocation);
    //          System.out.println("Test 3");
              obj1.removeLocation(oldlocation);
    //          System.out.println("Test 4");
         System.out.println();
         System.out.println("The sorted array looks like");
         for (int k = 0; k < newArray.length; k++)
              System.out.print(newArray[k] + " ");
         System.out.println();
         System.out.println();
         obj1.resize(newArray.length);
         for (int i = 0; i < newArray.length; i++)
              obj1.array()[i] = newArray[i];
         return;

    method : selSort
    input - none
    output - void
    This is where we sort the arary
    Pseudocode Code:
    1 Initialize variable oldlocation to hold spot of smallest number in original array
    2 Initialize variable smallnumber to store smallest number in original array
    3 Initialize new integer array
    4 Set new array length to length of original array
    5 Initialize variable length to store lengh of new array
    6 For i = 0 and continue till i < new array length
    6.1 Find smallest number in original array
    6.2 Put the smallest number in new array
    6.3 Remove smallest number from original array
    7 Copy contents of new array that is sorted to original array
    Basic concept is to repetitively find the smallest
    (or largest) item in the original array. Once smallest
    is found, move it to the next spot in a new array and
    remove it from the old array.
    public void selSort ()
         int oldlocation = 0;
         int smallnumber = 0;
         int [] newArray = obj1.array();
         newArray = new int [obj1.length()];
         int length = newArray.length;
         for (int i = 0; i < newArray.length; i++)
    //          System.out.println("Test 1");
              newArray[i] = obj1.sortSmall();
    //          System.out.println("Test 2");
              smallnumber = obj1.sortSmall();
    //          System.out.println("This is the smallest number " + smallnumber);
              oldlocation = obj1.location(smallnumber);
    //          System.out.println("This is the old location " + oldlocation);
    //          System.out.println("Test 3");
              obj1.removeLocation(oldlocation);
    //          System.out.println("Test 4");
         System.out.println();
         System.out.println("The sorted array looks like");
         for (int k = 0; k < newArray.length; k++)
              System.out.print(newArray[k] + " ");
         System.out.println();
         System.out.println();
         obj1.resize(newArray.length);
         for (int i = 0; i < newArray.length; i++)
              obj1.array() = newArray[i];
         return;

  • Help with converting an object to something else

    How do I go about converting an Object from a Vector back into what it originally was?

    Vector v = new Vector();
    v.add(new String("Hello"));
    Object x = v.get(0);
    String s = (String) x; // this line; cast the object back to its type

  • Need help with Shockwave flash object by adobe systems it's an add ons

    Please any help you can give me as I can't figure
    out what is wrong I disable the add on but then I can't load any of
    my games without it but when it is enabled I keep getting the fatal
    error browser must close, the only options that I have are to
    enable it or disable it and neither one is working properly for me
    so PLEASE help me and tell me what I can do to resolve this
    stubborne issue!!!! Thanks Treblinka4444

    Please any help you can give me as I can't figure
    out what is wrong I disable the add on but then I can't load any of
    my games without it but when it is enabled I keep getting the fatal
    error browser must close, the only options that I have are to
    enable it or disable it and neither one is working properly for me
    so PLEASE help me and tell me what I can do to resolve this
    stubborne issue!!!! Thanks Treblinka4444

  • Help!! Calling PL/SQL with table of objects params

    Hi JDBC experts,
    This is probably a familiar problem to many of you and I was hoping you can help me.
    I have a JDBC application that makes calls to a PL/SQL stored procedure that accepts and returns tables (arrays) of objects. I have an equivalent representation of these in Java (the object is a simple Java class and the array of objects is a subclass of ArrayList). The object has around 10 attributes (varchar and number) and the call typically accepts and returns between 50 and 100 objects.
    I noticed that converting from one representation to the other before and after the JDBC call is very time consuming. Before calling the procedure, I need to instantiate a new oracle.sql.ARRAY and fill it with oracle.sql.STRUCT equivalents for each object in my ArrayList. After the procedure call returns, I need to instantiate a new ArrayList and fill it with my Java object representation for each oracle.sql.STRUCT in the returned oracle.sql.ARRAY. Given the # of objects returned and the size of each object, this causes performance degradation.
    Is there any way I can avoid the above conversion overhead? I was reading somewhere about jpub and CustomDatum. I tried it out but the code that sqlj generated looked rather complex - but if this is the recommended approach, I can follow that.
    Also, are there any java code examples for dealing with table of (non-scalar) objects with CustomDatum? I saw some code for using CustomDatum with single objects but not with a table of objects.
    Your help is much appreciated!
    Thanks,
    Niranjan

    I would do it like this :
    - use existsNode function in the filter predicate to look for candidate rows regardless of the number of occurrences of target nodes in the document
    - use XPath predicates on attributes to restrict target nodes
    SQL> create table temp1 of xmltype;
    Table created
    SQL>
    SQL> insert into temp1 values(xmlparse(document
      2  '<soc id="2">
      3   <listsectii>
      4    <sectie cods="4">
      5     <prodv codp="2" cant=""></prodv>
      6    </sectie>
      7    <sectie cods="5">
      8     <prodv codp="8"></prodv>
      9    </sectie>
    10    <sectie cods="6">
    11     <prodv codp="2"></prodv>
    12    </sectie>
    13   </listsectii>
    14  </soc>'));
    1 row inserted
    SQL>
    SQL> update temp1
      2  set object_value =
      3      updateXML( object_value
      4               , '/soc/listsectii/sectie[@cods="4"]/prodv[@codp="2"]/@cant'
      5               , 'new_cant' )
      6  where existsNode( object_value
      7                  , '/soc/listsectii/sectie[@cods="4"]/prodv[@codp="2"]' ) = 1
      8  ;
    1 row updated
    SQL> select * from temp1;
    SYS_NC_ROWINFO$
    <soc id="2">
      <listsectii>
        <sectie cods="4">
          <prodv codp="2" cant="new_cant"/>
        </sectie>
        <sectie cods="5">
          <prodv codp="8"/>
        </sectie>
        <sectie cods="6">
          <prodv codp="2"/>
        </sectie>
      </listsectii>
    </soc>
    Of course, that implies there's already an existing "cant" attribute (not the case in your samples).
    If you actually need to create one, then you must use insertChildXML() instead.

  • HELP with object carousel

    Hi,
    I need some help with the use of the DSM-CC object carousel.
    In my Xlet, I need to read a file (previsioni.TXT), that is in the package testo; this is the structure of my folder:
    \\mio; the first package
    \\ MyXlet.java
    \\ testo; package with the text
    \\ previsioni.TXT
    1. so I create un object carousel and then access the file with the java.io.File :
    try {
                   System.out.println("Requesting file");
                        DSMCCObject carouselFile = new DSMCCObject("testo/previsioni.TXT");
              carouselFile.synchronousLoad();
              FileInputStream inFile = new FileInputStream(carouselFile);
              //Construct a DataInputStream by using the
                   //FileInputStream in the constructor method.
              DataInputStream inData = new DataInputStream (inFile);
              //Invoke methods of DataInputStream to read data from the data source.
         String s = inData.readUTF();
         System.out.println(s);
              //Close the FilterInputStream.
         inData.close ();
                   catch (InvalidPathNameException e) {
                        System.out.println("Invalid path name!");
                   catch (IOException e){
                        System.out.println("Problem reading previsioni.txt ");
    but when I run this code Xletview write
    [XleTView]-INFO->loading Xlet... [mio.StatiXlet]
    [XleTView]-INFO->XLET started... [mio.StatiXlet]
    mio.StatiXlet : Inizializzazione avvenuta!
    mio.StatiXlet : Hello TV World
    Requesting file
    xjava.io.File -
    Problem reading previsioni.txt
    and so there is an IO execption. Can someone help me?
    2. then, when the file is in the string s, i would display this file; I try with the Htext:
    texts = new HText( s, 20, 20, 200, 300, new Font("Tiresias", Font.BOLD, 26), Color.black, Color.white, new HDefaultTextLayoutManager());
    but when I compile the code appear:
    StatiXlet.java:173: cannot resolve symbol
    symbol : variable s
    location: class mio.StatiXlet
    texts = new HText( s, 20, 20, 200, 300, new Font("Tiresi
    as", Font.BOLD, 26), Color.black, Color.white, new HDefaultTextLayoutManager());
    ^
    1 error
    Do you know how can I display this file?
    Thank you very much

    Hi beker,
    thank you so much for your help, but I have another question.
    I use your code and when I compile is OK, but when I run it in XletView it doesn't find the file previsioni.TXT and write this:
    [XleTView]-INFO->loading Xlet... [mio.StatiXlet]
    [XleTView]-INFO->XLET started... [mio.StatiXlet]
    mio.StatiXlet : Inizializzazione avvenuta!
    mio.StatiXlet : Hello TV World
    xjava.io.File - testo/previsioni.TXT
    java.io.FileNotFoundException: E:\Documenti\tirocinio\xlet esempi\testo\previsio
    ni.TXT (Impossibile trovare il percorso specificato)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at xjava.io.FileInputStream.<init>(Unknown Source)
    at xjava.io.FileInputStream.<init>(Unknown Source)
    at mio.StatiXlet.startXlet(StatiXlet.java:97)
    at net.beiker.xletview.xlet.XletManager.resumeRequest(Unknown Source)
    at net.beiker.xletview.xlet.XletManager.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:536)
    s=not read
    What does it mean? I'm sure that the path is right, what do you think?
    Thank you very much beiker for your help

  • Help with View Objects

    I have created a new ViewObject in my Application Module in the project where I have my BC4J.
    Previously, I created a BC4J JSP Application project based on the other project but a this time I didn4t have created a ViewObjet that I want to use now.
    Then, I created a new JSP pages and I added the DataTags referring to that new ViewObject like this:
    <%@ page language = "java" errorPage="errorpage.jsp" import = "java.util.*, oracle.jbo.*, javax.naming.*, oracle.jdeveloper.html.*, oracle.jbo.html.databeans.*" contentType="text/html;charset=ISO-8859-1" %>
    <%
    // make sure the application is registered
    oracle.jbo.html.jsp.JSPApplicationRegistry.registerApplicationFromPropertyFile(session , "PrjSegJSP_PkgSeg_PkgSegModule");
    %>
    <HTML xmlns:jbo="jbo">
    <HEAD>
    <TITLE>INSTITUTO ECUATORIANO DE SEGURIDAD SOCIAL</TITLE>
    <LINK href="estilo/estilo.sty" rel=stylesheet type=text/css>
    </HEAD>
    <BODY class="clbody" aLink=#800000 bgColor=#ffffff leftMargin=0 link=#808000 text=#000000 topMargin=0 vLink=#c0c0c0>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule configname="PkgSeg.PkgSegModule.PkgSegModuleLocal" id="PkgSegModule" username="iessuser" password="iess" />
    <jbo:DataSource id="dtsVista" appid="PkgSegModule" viewobject="ViewRolPorUsu" ></jbo:DataSource>
    <FONT class="texgen">Primero</FONT> |
    <FONT class="texgen">Anterior</FONT> |
    <FONT class="texgen">Siguiente</FONT> |
    <FONT class="texgen">Ultimo</FONT>
    <br>
    <%
    String navop = request.getParameter("NAV");
    if ( navop == null )
    navop = "First";
    if ( navop.equals("Previous") && !dtsVista.getRowSet().hasPrevious() )
    navop = "First";
    if ( navop.equals("Next") && !dtsVista.getRowSet().hasNext() )
    navop = "Last";
    %>
    <jbo:RowsetNavigate datasource="dtsVista" action="<%=navop%>" />
    <br>
    <form name="Vista" action="untitled2_Submit.jsp">
    <table border="0">
    <tr>
    <td>Nombre de Usuario</td>
    <td>
    <FONT class="texgen"><jbo:ShowValue datasource="dtsVista" dataitem="Nomuniusu" ></jbo:ShowValue></jbo:ShowValue></FONT>
    </td>
    </tr>
    <tr>
    <td>Cedula de Identidad</td>
    <td>
    <jbo:ShowValue datasource="dtsVista" dataitem="Cedideusu" ></jbo:ShowValue>
    </td>
    </tr>
    <tr>
    <td>Fecha Inicio Vigencia del Rol</td>
    <td>
    <jbo:InputText datasource="dtsVista" dataitem="fecinivigrol"/>
    </td>
    </tr>
    <tr>
    <td>Tipo de Usuario</td>
    <td>
    <jbo:InputText datasource="dtsVista" dataitem="tipusu"/>
    </td>
    </tr>
    <tr>
    <td>Descripcion del rol</td>
    <td>
    <jbo:InputText datasource="dtsVista" dataitem="desrol"/>
    </td>
    </tr>
    </table>
    <input name="MyRowKey" type="hidden" value="<jbo:ShowValue datasource="dtsRolPorUsu" dataitem="RowKey"/>" />
    </form>
    </BODY>
    </HTML>
    <jbo:ReleasePageResources releasemode="Stateless" />
    But when I run the page I found this error:
    Application Error
    Return
    Error Message: DataWebBean: Could not locate View Object: ViewRolPorUsu in application PkgSegModule
    How can I work with a View Object created recently and after I have created the BC4J JSP Application???
    Could you help me please?

    Yes, I added my new View Object to the Data Model because when I right_click on the JSP page and I want to add a new Datasource Datatag, I see the ViewObject but it gave me the error.

Maybe you are looking for