Adding a child to a Package -- problem...

The package code below is directly out of the Adobe flash help system:
It works fine as an external .as file.
However, I want to add some buttons from the library.  I haven't been able to add another child, no matter where I put the code.  I also tried putting the code to add a button in the internal movie frame script, but when I put ANY script there, I get this error
"1180: Call to a possibly undefined method addFrameScript."
What am I missing?
The add button script, where Sub1_Btn has been exported for Actionscript and set up as a class in the buttons property window.
var Sub1:Sub1_Btn = new Sub1_Btn();
Sub1.x = 10;
Sub1.y = 30;
var Sub1_txt:text = new text();
Sub1_txt.text = "New Text";
Sub1_txt.x = 10
Sub1_txt.y = 30
addChild (Sub1);
The package I mentioned above:
package {
import flash.display.Sprite;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.StyleSheet;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.events.IOErrorEvent;
import flash.events.Event;
import flash.events.MouseEvent;
public class StyleSheet_parseCSSExample extends Sprite {
private var loader:URLLoader = new URLLoader();
private var field:TextField = new TextField();
private var exampleText:String = "<h1>This is a headline</h1>"
                    + "<p>This is a line of text. <span class='bluetext'>"
                    + "This line of text is colored blue.</span></p>";
private var sheet:StyleSheet = new StyleSheet();
private var cssReady:Boolean = false;
public function StyleSheet_parseCSSExample () {
field.x = 10;
field.y = 10;
field.background = true;
field.multiline = true;
field.autoSize = TextFieldAutoSize.LEFT;
field.htmlText = exampleText;
field.addEventListener (MouseEvent.CLICK, clickHandler);
addChild (field)
var req:URLRequest = new URLRequest("test.css");
loader.load (req);
loader.addEventListener (IOErrorEvent.IO_ERROR, errorHandler);
loader.addEventListener (Event.COMPLETE, loaderCompleteHandler);
public function errorHandler (e:IOErrorEvent):void {
field.htmlText = "Couldn't load the style sheet file.";
public function loaderCompleteHandler (event:Event):void {
sheet.parseCSS (loader.data);
cssReady = true;
public function clickHandler (e:MouseEvent):void {
if (cssReady) {
field.styleSheet = sheet;
field.htmlText = exampleText;
var style:Object = sheet.getStyle("h1");
field.htmlText += "<p>Headline font-family is: " + style.fontFamily + "</p>";
field.htmlText+="<p>Headline color is: "+style.color+"</p>";
} else {
field.htmlText="Couldn't apply the CSS styles.";

Hi,
The following code is one way you can set up a scroller, when you add something to the group the scrollbars will appear if that object exceeds the scroller boundaries. When you add the oversized child component(I used a list here for simplicity) the scrollbars will kick in.
David
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.controls.List;
protected function button1_clickHandler(event:MouseEvent):void
var mylist:List = new List()
mylist.x=0;mylist.y=0;mylist.height=500;mylist.width=500;
grp.addElement(mylist);
]]>
</fx:Script>
<s:Scroller left="10" top="10" width="400" height="400" id="scroller" minViewportInset="1" hasFocusableChildren="true">
<s:Group id="grp" top="0" left="0" bottom="0" right="0"/>
</s:Scroller>
<s:Button x="32" y="446" label="Button" click="button1_clickHandler(event)"/>
</s:Application>

Similar Messages

  • Noob question about adding a child

    I'm exercising scripting and struggling with adding a child to a object when the creation of the child is wrapped in this function
    function makeBox():void {
    var box:Shape = new Shape;
    box.graphics.beginFill(0x66FF00);
    box.graphics.lineStyle(5, 0x6600CC);
    box.graphics.drawRect(mouseX, mouseY, 50, 50);
    addChild(box);
    Now I want to add the above shape as a child to this object
    var Clip:MovieClip = new MovieClip;
    addChild(Clip);
    if the first code was not a finction I have no problem to add the child by  Clip.addChild(box); but I cant figure out how to use it if it is as a function.

    I'm not clear on your true goal, but the thing with having all that code in the function is that because you declare the box inside the function it only has scope within the function.  If you want something outside the function to be able to utilize it then you need to declare it outside the function...
    var Clip:MovieClip = new MovieClip;
    addChild(Clip);
    var box:Shape;
    makeBox():
    Clip.addChild(box);
    function makeBox():void {
         box = new Shape();
         box.graphics.beginFill(0x66FF00);
         box.graphics.lineStyle(5, 0x6600CC);
         box.graphics.drawRect(mouseX, mouseY, 50, 50);

  • Issue :  Child view object refresh problem,

    Hi ,
    Child view object refresh problem,
    Detail expaination of problem with DEPT and Emp table:
    I have two pages first.jspx and secound.jspx
    In the First page we are showing one department and All Employee blongs to that department. Employees are shown in table format.
    and i have duplicate button in table--> this will create a duplication record of selected employee by calling application module
    and the control moves to sencound page to show the newly created Employee details.
    From secound form am returning back with some action button to previous page to the same dept , The newly created records are not showing in the table [but the database has newly crated].
    How do i refresh the child view object ?
    Regards,
    Bogi.

    Hi Frank,
    We are creating new record from the AM with help of ADFBC.
    Would like know how to refresh UI Datacollection and AM view objects.. ? i have added vo.executeQuery in AM . But the changes not reflecting in UI,
    Thanks for the reply... am ready to give any other info required,,,

  • TS3074 im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    Try the following user tip:
    " ... A DLL required for this installation to complete could not be run ..." error messages when installing iTunes for Windows

  • How to resolve AVCHD package problem in mountain lion

    how to resolve AVCHD package problem in mountain lion

    Thanks, David. I know this workaround. And one more with creating right-click Service. That's why I've used "uncomfortable" instead of "impossible". In my opinion, Apple should leave ability to choose OS's behavior, and I hoped somebody knew where to find it .

  • [svn:bz-trunk] 21277: Added ds-console source to package-oem and removed copy command for datavisualization .swc which doesn't exist in the specified location.

    Revision: 21277
    Revision: 21277
    Author:   [email protected]
    Date:     2011-05-18 11:35:28 -0700 (Wed, 18 May 2011)
    Log Message:
    Added ds-console source to package-oem and removed copy command for datavisualization.swc which doesn't exist in the specified location. I do not find it in the most recent package-oem.zip neither
    Modified Paths:
        blazeds/trunk/build.xml

    Gusar wrote:No, it's not. I have actually seen cases where software rendering gave a higher glxgears score than hardware rendering (and no, it wasn't about vsync). Of course, with *actual* apps on the same machine, software rendering sucked compared to hardware rendering.
    Please do not jump to conclusions and make assumptions here like 'when will people finally get it??'.  I never said it was a benchmark.  I have also seen many examples of where it's results do not go with conventional performance.  I have a Radeon 9000 that goes faster on glxgears than a Geforce FX 5600 running Nouveau.  Which is the faster card?  The FX by miles.  It is not a benchmark as it can not be compared between configurations.  What I know is that on this individual system, from prior experience over many years when 3D acceleration is working glxgears gets between 300 and 400 fps.  When it is not working it gets less than 10.  That is a fact but does not mean it is benchmarkable.  Yes, a Quake 3 timedemo (I have these numbers too and they very much correlate to glxgears performance for this system given just how slow it is) would be a benchmark but when it runs less than 0.1fps and even the 2D rendering means that navigating the menu is impossible, there just isn't the time to find out.  Hence if playing around with drivers on this system I would use glxgears to check that 3D acceleration is working but not to benchmark.  Glxinfo does not give you all this evidence.
    But to clarify, I wouldn't use glxgears as a benchmark, benchmarking is different and I do a lot of that too.

  • Adding a child to spark scroller in as

    Tried adding a child (group) to the scroller class by using the viewport function but it didnt seem to work. is there a way to add a scroller via as and then adding a group as its child ? right now the scroller was added to the stage using addElement and the group was added as its viewport. I tested by adding a textarea to the group and it did display. however i didnt see any scrollbars even though the textarea was 3000 pixels high.

    Hi,
    The following code is one way you can set up a scroller, when you add something to the group the scrollbars will appear if that object exceeds the scroller boundaries. When you add the oversized child component(I used a list here for simplicity) the scrollbars will kick in.
    David
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
    <![CDATA[
    import mx.controls.List;
    protected function button1_clickHandler(event:MouseEvent):void
    var mylist:List = new List()
    mylist.x=0;mylist.y=0;mylist.height=500;mylist.width=500;
    grp.addElement(mylist);
    ]]>
    </fx:Script>
    <s:Scroller left="10" top="10" width="400" height="400" id="scroller" minViewportInset="1" hasFocusableChildren="true">
    <s:Group id="grp" top="0" left="0" bottom="0" right="0"/>
    </s:Scroller>
    <s:Button x="32" y="446" label="Button" click="button1_clickHandler(event)"/>
    </s:Application>

  • Apparent SDL package problem

    I installed kdenlive and mlt from community and have a problem with the configuration. A dev on the kdenlive IRC channel said I should ask the mlt devs who in turn said it must be a SDL packaging problem. So I'm here now with this bit:
    #kdenlive
    [19:38] <dust__> need some help getting this program started
    [19:43] <dust__> says it can't find melt or SDL profiles and module
    [19:43] <dust__> but when I run it as root everythings OK
    [19:46] <xzhayon> distro?
    [19:47] <dust__> Arch. I installed both mlt and kdenlive from community repos
    [19:49] <xzhayon> run melt -query consumers 2>&1 | grep sdl
    [19:49] <xzhayon> and show me the results
    [19:49] <dust__> - sdl_image
    [19:51] <dust__> when I run that as su I get this
    [19:51] <dust__> - sdl - sdl_audio - sdl_preview - sdl_still
    [19:53] <xzhayon> as su?
    [19:53] <xzhayon> but that's the output of query consumers
    [19:56] <dust__> just that Im getting different output as su than user
    [19:57] <xzhayon> what's the output of melt -query consumers 2>&1 | grep sdl not run as su?
    [19:57] <dust__> - sdl_image
    [19:58] <xzhayon> that's definitely wrong
    [19:58] <xzhayon> try reinstalling mlt
    [19:58] <dust__> did that at least twice
    [19:59] <dust__> 0.5.10
    [19:59] <dust__> kdenlive 0.7.8
    [20:01] <xzhayon> may i see the pkgbuild for this package?
    [20:03] <dust__> http://repos.archlinux.org/wsvn/community/mlt/repos/community-x86_64/PKGBUILD
    [20:12] <xzhayon> im' sorry but i have no clue on what's happening
    [20:15] <dust__> please tell me what the output above means briefly
    [20:17] <xzhayon> well, that shows the producers and consumers available to melt
    [20:17] <xzhayon> but that's not the expected output
    [20:17] <xzhayon> what you see with "su"
    [20:18] <xzhayon> i what should appear when run as normal user
    [20:18] <xzhayon> while what you see when run as normal user
    [20:18] <xzhayon> is what you should see when querying producers, not consumers
    [20:18] <xzhayon> try asking on [email protected]
    mlt-devel replied as follows:
    Perhaps ask the SDL packager; I doubt the MLT packager will be of much
    help. This appears to be some permission issue with SDL and its access
    to things. Maybe you need to add your account to some groups. Does
    ffplay at the command line work? It too uses SDL. If that does not
    work either, then perhaps 'strace melt -query consumers'. strace is a
    very verbose output, but it might show what it is failing to access.
    any thoughts?

    allan@mugen ~
    > melt -query consumers 2>&1 | grep sdl
    - sdl
    - sdl_audio
    - sdl_preview
    - sdl_still
    Maybe try creating a new user and see if it works for them.

  • Error adding a child form to more than one form

    When I try to add a child form to more than one form, I get the following error:
    Error Keyword: SDK.ADDFKCON
    Description: Error Adding Foreign Key/Constraint.
    Remedy:
    Action: F
    Severity: H
    Help URL:
    Detail:
    The following is the log trace:
    ERROR,23 nov 2011 17:22:42,050,[XELLERATE.ADAPTERS],Event: SDH Drop Foreign Constraint has encountered an error.
    ERROR,23 nov 2011 17:22:54,519,[XELLERATE.DATABASE],ALTER TABLE UD_TICKET3 ADD (UD_ADUSER_KEY NUMBER(19) CONSTRAINT NN_UD_TICKET3_UD_ADUSER_KEY NOT NULL, CONSTRAINT FK_UD_TICKET3_UD_ADUSER FOREIGN KEY(UD_ADUSER_KEY) REFERENCES UD_ADUSER(UD_ADUSER_KEY))
    java.sql.SQLException: ORA-01758: table must be empty to add mandatory (NOT NULL) column
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:961)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1285)
         at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1772)
         at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1741)
         at com.thortech.xl.util.JDBCUtils.executeUpdate(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.writeStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.writeStatement(Unknown Source)
         at com.thortech.xl.client.events.tcSDHAddForeignConstraint.createColumns(Unknown Source)
         at com.thortech.xl.client.events.tcSDHAddForeignConstraint.implementation(Unknown Source)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Source)
         at com.thortech.xl.ejb.databeansimpl.tcSDHBean.save(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:844)
         at tcSDH_RemoteProxy_6ocop18.save(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ERROR,23 nov 2011 17:22:54,519,[XELLERATE.DATABASE],Class/Method: tcDataBase/writeStatement encounter some problems: ORA-01758: table must be empty to add mandatory (NOT NULL) column
    java.sql.SQLException: ORA-01758: table must be empty to add mandatory (NOT NULL) column
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:961)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1285)
         at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1772)
         at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1741)
         at com.thortech.xl.util.JDBCUtils.executeUpdate(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.writeStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.writeStatement(Unknown Source)
         at com.thortech.xl.client.events.tcSDHAddForeignConstraint.createColumns(Unknown Source)
         at com.thortech.xl.client.events.tcSDHAddForeignConstraint.implementation(Unknown Source)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Source)
         at com.thortech.xl.ejb.databeansimpl.tcSDHBean.save(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:844)
         at tcSDH_RemoteProxy_6ocop18.save(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ERROR,23 nov 2011 17:22:54,519,[XELLERATE.ADAPTERS],Event: Adding Foreign Constraint has encountered an error.
    How to correct this?
    Thank you!

    899043 wrote:
    Thanks for your reply!
    I have a form named UD_TICKET3. This form contains information about the ticket number and a comment about any action taken on a resource of identity. We want to add this form as a child of all the resources forms. The problem occurs when I try to add the child form to the second form.You cannot add same detail table (child form) to more than one master table (resource form).

  • Compiling packages problem???

    Thanks for checking this out, noticed there hadn't been a similar compiling question for
    at least 40 pages, so figured I should contribute!!
    I am trying to compile a package class with six other classes added as part of the
    same package and instantiated withing tabbed panes within the first class.
    info
    JDK: j2sdk1.4.0-beta3
    path: path=c:\windows;c:\windows;c:\windows\command\j2sdk1.4.0-beta3\bin
    Folder/directory : c:\Divelog
    javac is accessed by: c:\j2sdk1.4.0-beta3\bin\javac
    package: divelog
    file: DiveLog.java
    -public class DiveLog extends JFrame
    six other files are Welcome.java, Diver.java, Dives.java, Statistics.java, Website.java,
    Resources.java
    -all are started with the package divelog; declaration
    - all are called within a populateTabbedPane() in the DiveLog file and class.
    all .java files can be seen when I enter c:\Divelog>dir
    problem:
    entering c:\j2sdk1.4.0-beta3\bin\javac DiveLog.java
    returns six errors of type : cannot resolve symbol
    symbol: class Welcome
    location: class divelog.Divelog
    new Welcome
    I understand that this is not the way to compile a package so tryed lots of different
    things as suggested by the troubleshooting tutorial, the most effective are
    c:\j2sdk1.4.0-beta3\bin\javac -classpath c:\Divelog.divelog.java
    " \javac -classpath c:\Divelog.divelog
    \javac -classpath c:\Divelog
    all of these pause for about 5 seconds then returns to the c:\Divelog> (as if there
    were no errors)
    enter dir to see if they have been compiled, and there is no .class versions of these
    files.
    entering
    c:\j2sdk1.4.0-beta3\bin\javac -classpath c:\Divelog\ DiveLog.java or \ Divelog or \
    Divelog.DiveLog
    (with the space after the \ ) returns the six error messages above.
    I am positive there is something very simple I am missing, could someone please help
    me out, It would be greatly appreciated, I really like this java programming, but when
    you run into a hurdle like this, It gets very frustrating. Thanks alot in advance!!!

    Thanks alot eric, I spent about 15 hours trying to work that out. Tthat helped alot I have a couple of quick follow up questions
    1. in the classpath \divelog/*.java what does the /*.java do is that the call for the entirity of the divelog
    package.
    2. all of the six sub classes (welcome, Resources, etc) all compiled and are now in the directory of the
    c:\Divelog>
    except that the main class/file DiveLog will not itself, and is not listed as a DiveLog.class,
    there is still only a DiveLog.java even thought the others in the package all have become .class.
    Is there any way I can compile this one file on it's own, or how do I get it to compile into a .class file??
    3. to run the application would I then enter
    c:\Divelog>c:\j2sdk1.4.0-beta3\bin\java -classpath \divelog.?
    Once again, I really appreciate your help, that was great!

  • Package problem when compiling

    Hi,
    I'm new to java. I'm using Win2000 and JDK1.3.1. I set the "c:\jdk1.3.1\bin" in the System's path. There are three java programs with their own package in the directory as follows:
    "pack.java" - under "c:\jdk1.3.1\bin\test", it will call pack1 & pack2.
    "pack1.java" - under "c:\jdk1.3.1\bin\test\sub1"
    "pack2.java" - under "c:\jdk1.3.1\bin\test\sub2"
    It's ok to compile "pack1.java" and "pack2.java" under their directory. But there is the compiling error for the "pack.java" under "c:\jdk1.3.1\bin\test", even though I've put the "import test.sub1.pack1;" and "import test.sub2.pack2;" in the code. The error were as follows:
    - cannot resolve symbol
    - symbol : class pack1
    - location: package sub1
    - import test.sub1.pack1;
    - cannot resolve symbol
    - symbol : class pack2
    - location: package sub2
    - import test.sub2.pack2;
    I'm not sure what the problem is with the package and/or the import statement. Can any experts help me?
    Thanks in advance.
    Hanna

    Hi all gurus,
    Thank you very much for the help!
    After adding the classpath "c:\jdk1.3.1\bin" to the System's setting, I can compile the "pack.java" under the "test" directory with the command "javac -classpath c:\jdk1.3.1\bin c:\jdk1.3.1\bin\test\pack.java". However, when I run "pack" with the command "java -classpath c:\jdk1.3.1\bin c:\jdk1.3.1\bin\test\pack", there is another error appears as follows, although the "pack.class" has been already there:
    - "Exception in thread "main" java.lang.NoClassDefFoundError: c:\jdk1/3/1\bin\test\pack"
    My "pack.java" code is below:
    package test;
    import test.sub1.pack1;
    import test.sub2.pack2;
    class pack{
    public static void main(String[] args){
    System.out.println("Starting pack");
    System.out.println("Instantiate obj of public classes in different packages");
    //Instantiate objects of pack1 and pack2 in different packages.
    new pack1();
    new pack2();
    System.out.println("Ending pack");
    What's wrong with them? Could you please help me on that?
    Thanks again!
    Hanna

  • JDom package problem !!!

    Hi, Friends
    I have some problem while using JDom v1.0 from www.jdom.org
    since while i have seen all the examples on the net, they
    using org.jdom.*; package structure.
    but when i am using latest libs from v1.0 there is no package
    like org.jdom
    what should i do ??
    Since it giving me error while running below code :
    public class JdomEx1
        public static void main(String[] args)
            Element root = new Element("myRootElement");
            Document doc = new Document(root);
            root.setText("This is a root element");
            System.out.println(doc);
    D:\netBeans Projects\appDom1\src\mydom\JdomEx1.java:21: org.w3c.dom.Element is abstract; cannot be instantiated
            Element root = new Element("myRootElement");
    D:\netBeans Projects\appDom1\src\mydom\JdomEx1.java:22: org.w3c.dom.Document is abstract; cannot be instantiated
            Document doc = new Document(root);
    D:\netBeans Projects\appDom1\src\mydom\JdomEx1.java:23: cannot find symbol
    symbol  : method setText(java.lang.String)HELP

    georgemc wrote:
    Ghanshyam wrote:
    BIJ001 wrote:
    There is a hint to org.w3c.dom.Element in the error mesasge in your post and we are talking about jdom.
    I am a happy user of jdom without a problem. Correct classpath setting is your friend.===========================================
    Hi Friend,
    Thanks for that,
    I want to ask , then how to run the sample code ??
    consider me as new java newbie.
    and there is no issue for classpath, Netbeans 5 will do that.And you, in your infinite Java newbie wisdom, can be 100% sure that there is no classpath issue, despite blatant evidence to the contrary?? :-)
    It is a classpath issue, and since you're using an IDE, and no doubt making use of code completion, you've gone stampeding down the DOM route and got yourself stuck! Try writing a bit of code outside of NetBeans, and sort your classpath out========================================
    Hi friend,
    Thanks for suggestion, but still there is no solution
    Can u tell me to run code in IDE ?
    i have added following libs to NetBeans Library area.
    1) ant.jar
    2) jaxen-jdom.jar
    3) xalan.jar
    4) saxpath.jar
    5) xerces.jar
    6) xml-apis.jar
    My Whole project is in Netbeans and you told me to write XML
    code outside IDE, don't u think it is strange !!!
    then what purpose of IDE ???
    Kindly provide me solution if any classpath issue....
    Thanks..

  • Parent Child Hiearchy - Expand/Collapse problems

    Hello,
    We are on 11.1.1.6 and have built a parent child hierarchy on one of our dimensions. Navigation of the hierarchy works just fine if no measures are included. When a measure is added, the hierarchy becomes nearly unnavigable. That is to say clicking on the plus/minus signs doesn't work. Clicking in various locations of the screen can sometimes get it to work but it is ridiculously hard to get anywhere. The fact table from which the measure is pulled is very small, approx. 100,000 rows so we don't see that as the problem.
    Has anybody else seen such a problem?
    Thanks.

    Can you provide more info on this, how have you modeled the hierarchy with the fact table, are you rolling up the measures for the child to the parent level (modeling as measures) or each employee is showing its own revenue only (modeled as attribute)? If it is modeled as measures where you join the employee table to the closure table and then that to fact table then are you applying any filters in your report ? If you are applying filters in your report and somehow only parent is filtered (and not its children) then you won't be able to drill down, though you will see the + sign against it.

  • Funny package problem

    I've created a package for a program I'm writing, MyApp. I have chosen as the package name ma, and all my .java files have at the beginning "package ma;".
    All my class files reside in the same directory: C:\Files\MA\ma\CLASS FILES HERE. I compile and run my program from C:\Files\MA.
    The problem I'm having is that when I run MyApp (java ma.MyApp) I get a notice that it can't find another class that's in the same directory, and part of the same package (MyAppData). Altering the CLASSPATH makes no difference.
    The exception is thrown while reading a data file that contains objects of type MyAppData, on the first read.
    Has anyone had this problem?

    This may help. Try adding this to C:\Files:public class StartMyApp
        public static void main(String[] args) {
            new MA.MyApp();
    }and use it to start your application.
    Mark

  • IMPORTING PACKAGE PROBLEMS

    Hi,
    I'm having problems with importing the following:
    import javax.swing.*;
    import javax.crypto.*
    I am currently using JDK1.3.1_01. I've looked in the main java folder there is no 'javax' folder, hence thats why the error message appears:
    package javax.swing.* does not exist
    What am i doing wrong? Is it contained in a Zip or Jar file or something, if so where? Do I need to make some Classpath setting?
    Please help giving me clear instructions as im no expert.
    thanx
    RIA

    Yes...I named the objects with capital letters e.g.
    JComboBox SexComboBox = new JComboBox();well, it would be a bit more readable to start object names with a lowercase letter
    (you might want to read about naming conventions one day: http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html)
    I added some comments to your code:
    SexComboBox.addActionListener(new
    java.awt.event.ActionListener() {
       /* This IS illegal syntax. The previous line starts a class definition.
           You should see at least one method declaration here:
            public void actionPerformed(ActionEvent e) {
            } // actionPerformed
          } // ActionListener
          I guess some lines have dropped out from your code here, because the
          following lines do not look like ActionListener code.
          You could try using the codelines above to fix your code
       SexComboBox.setEnabled(true);
       //Setup the sexComboBox item
       SexComboBox.addItem("Male");
       SexComboBox.addItem("Female");
       YearLabel.setText("Year");
       //setup the YearComboBox Item
       YearComboBox.addItem("1900");
       YearComboBox.addItem("1901");
       YearComboBox.addItem("1902");
       YearComboBox.addItem("1903");

Maybe you are looking for