Error in a simple example

Hi
I'm trying to make a simple example working.
The example was taken from director 11.5 scripting reference pdf.
The code is in the function called BuildPolygons whithin a Movie Script.
I also added a 3D window to the cast (menu Window/Shockwave 3D) and named it Shapes (Property Inspector/Member/Name:)
I get an error message:
       Script Error: TypeError: nm.face[1] has no properties nm.face[1].vertices = [1,2,3];
If I run it again, without Save & Compact,
I get a different message:
    Script Error: Object with duplicate name already exists
        nm = member("Shapes").newMesh("Plane",1,3,0,3,0);
As if the second run created another member called Shapes. (Shouldn't clear globals take care of it?)
// The Movie script -
function startMovie()
  clearGlobals();
  BuildPolygons();
function stopMovie()
  clearGlobals();
function BuildPolygons()
  nm = member("Shapes").newMesh("Plane",1,3,0,3,0);
  nm.vertexList = [vector(0,0,0), vector(20,0,0), vector(20, 20, 0)];
  nm.face[1].vertices = [1,2,3];
  nm.colorList = [rgb(255,255,0), rgb(0, 255, 0), rgb(0,0,255)];
  nm.face[1].colors = [3,2,1];
  nm.generateNormals("smooth");
  nm.build();
  nm = member("Shapes").newModel("TriModel", nm);
What am I doing wrong?
Please help.

I got the answer -
    http://www.directorforum.com/showthread.php?t=5150

Similar Messages

  • Can't get "Simple Example Doclet" to run -- Cannot find

    I am trying to run the "Simple Example Doclet" at http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/overview.html.
    It appears to compile ok, but when I go to run it I get the message "javadoc: Cannot find doclet class ListClass".
    Listed below is:
         1. The execution command and error message
         2. The version (output of javadoc -J-version)
         3. The javac compile command and input and output files
    All directories have been kept the same as in the example.
    Any help would be appreciated.
    Thanks
    1. C:\jdk1.3>javadoc -doclet ListClass -classpath C:\jdk1.3\lib\tools.jar MyClass.java
    javadoc: Cannot find doclet class ListClass
    1 error
    2. javadoc -J-version
         gives
              java version "1.3.1_01"
              Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
              Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode).
    3. javac -classpath C:\jdk1.3\lib\tools.jar ListClass.java
         appears to give good compile ....
              e. g. Input source file ListClass.java is as follows:
                   import com.sun.javadoc.*;
                   public class ListClass {
                   public static boolean start(RootDoc root) {
                   ClassDoc[] classes = root.classes();
                   for (int i = 0; i < classes.length; ++i) {
                   System.out.println(classes);
                   return true;
              and.....
              decompiled ListClass.class file is as follows:
                   // Decompiled by DJ v2.8.8.54 Copyright 2000 Atanas Neshkov Date: 10/11/2001 4:09:46 PM
                   // Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
                   // Decompiler options: packimports(3)
                   // Source File Name: ListClass.java
                   import com.sun.javadoc.RootDoc;
                   import java.io.PrintStream;
                   public class ListClass
                   public ListClass()
                   public static boolean start(RootDoc rootdoc)
                   com.sun.javadoc.ClassDoc aclassdoc[] = rootdoc.classes();
                   for(int i = 0; i < aclassdoc.length; i++)
                   System.out.println(aclassdoc[i]);
                   return true;

    Sorry to be so late in getting back to you .. I was on vacation.
    ListClass is in the current directory. I did get it to work however... In order to get it to work I had to do two things:
    1. use -docletpath (even thought it was in the current path) e. g. -docletpath C:\jdk1.3\ListClass.jar
    AND
    2. Make the class file a jar file -- I could not get it to work otherwise.
    p.s. the typo was a decompiler error.

  • An simple Example for beginer ...

    Hi:
    I want to generate a pdf-file from somefile.xml and somefile.xsl using fop. And it doesn't work. Could somebody provide a simple example, how to do it? It would be very nice.
    Thanks a lot.

    Here is my code-example:
    import java.io.*;
    import org.apache.fop.apps.*;
    import org.xml.sax.*;
    import java.util.logging.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class TestClass extends HttpServlet
         public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException
              PrintWriter pw = new PrintWriter(new FileOutputStream("C:/Temp/logFile.log"));
              String xmlFileName = "C:/xml/xmlfile.xml";
              String xslFileName = "C:/xsl/xslfile.xsl";
              ServletOutputStream outStream = response.getOutputStream();
              ByteArrayOutputStream arr = new ByteArrayOutputStream(); 
              try
                   XSLTInputHandler in = new XSLTInputHandler(new File(xmlFileName), new File(xslFileName));         
                   Driver driver = new Driver();           
                   driver.setRenderer(Driver.RENDER_PDF);           
                   driver.setOutputStream(arr);                                   
                   InputSource inputSource = in.getInputSource();           
                   XMLReader xmlReader = in.getParser();   // Error! Unknown Source !!!                                            
                   driver.render(xmlReader, inputSource);       
              catch (Exception ex)
                   ex.printStackTrace(pw);
                   pw.close();
              response.setContentType("application/pdf");
              response.setContentLength(arr.size());
              arr.writeTo(outStream);
              outStream.flush();
    }Any idea? Thanks.

  • Overwriting framework error messages of simple types

    Hi
    Is it possible to overwrite the framework error messages of simple types? For example: Instead of "Enter the value in the format -2,733.34" we prefer something like "Enter the percent value in the format 0.00 to 100." or "Enter a correct percent value.".
    Use case: We use for the most input fields for any numbers (telefon, amount, age, ...) the simple type "decimal", this offers following advantages:
    - optional use (and framework validation) of fraction digits
    - the input field has no default value (integer/long/short writes as default "0" to the input field, that is in most cases - for example post/zip code - not useful)
    Otherwise decimal simple types has the disadvantage, that if the user write any letters in the (decimal) input field, the error message is as described above and so not very helpful too.
    Thanks in advance
    Stefan

    Hi Stefan
    Unfortunately seems no way to customize the error messages.
    1. If the standard numeric simple type does not suit your needs, theoretically you can try to override the Java class of the standard type and add your custom messages/logic. For example, for Integer this is DdTypeInteger & DdTypeInt. Methods you need to override is format(...) and parse(...). After this in controller's code you should create a new attribute and provide your own custom type as input parameter.
    I never tried this way
    2. You can make the attribute as Calculated. Then in getter/setter you should put your custom formatting/parsing logic.
    BR, Siarhei

  • Parser cannot handle leap years? simpler example

    Here is a simpler example. If you change the <aDate> to 2001-02-29 the instance document still validates. However 2001-02-30 fails, as it should and 2001-02-28 validates, as it should.
    The schema, d.xsd:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
    targetNamespace="http://localhost/d"
    elementFormDefault="qualified">
    <element name="example">
    <complexType>
    <sequence>
    <element name="aDate" type="xsd:date"></element>
    </sequence>
    </complexType>
    </element>
    </xsd:schema>
    and the instance document d.xml with an incorrect date:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <example xmlns="http://localhost/d"
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema-instance"
    xsd:schemaLocation="http://localhost/d
    http://localhost.emv2.com/1914/d.xsd">
    <aDate> 2001-02-29</aDate>
    </example>
    I used the XSDSample.java file provided with the xdk9 for validation.
    Any ideas?
    Thanks,
    -Stephen

    I've tried 9.0.2 beta and I get the same behaviour.
    I can also reproduce the same behaviour by taking the catalogue.xml and cat.xsd example in the xdk/demo/java/schema directory.
    I changed the Date element type from "year" to "date" and modified the <Date> elements in catalogue.xml appropriately (e.g. 1954-02-28 instead of just 1954).
    I get the same behaviour, Feb. 29 always passes validation no matter what year, Feb. 30 always fails:
    Here's what it says when it fails on Feb. 30
    file:/tmp/xdk92/xdk/demo/java/schema/catalogue.xml<Line 14, Column 40>: XSD-2025: (Error) Invalid text '1977-02-30' in element: 'Date'
    Parser Exception: Invalid text '1977-02-30' in element: 'Date'
    I'm using the Linux versions, if that makes a difference.
    Also, I've tried referencing the xml instance two ways, via a file reference /home/ssimm...
    and via a URL http://localhost/.... The behaviour is consistent. (I don't think this should make a difference, I'm just trying to get the behaviour to change)
    Any ideas?
    Thanks,
    -Stephen

  • Where is a simple example of using a service callout?

    I am using the oracle service bus and am need to obtain the result string from a webservice.
    1)
    I am using a service callout in one of the stages:
    Service Callout to D2L Webservices invoking getOrgRole
    Configure Payload Document is checked
    Request Document Variable:      $body
    Response Document Variable: $body
    SOAP Request Header:      
    SOAP Response Header:
    Request Action Assign $body/enterprise/person/sourcedid/id/text() to variable inData
    Response Action:
    2) I need to configure the payload so $body/enterprise/person/sourcedid/id/text() is passed to the Request Document Variable. How do I do that?
    3) what do I use to get the retrun string from the webservice?
    4) I am getting a BEA-382500 error.
    <con:reason>
         OSB Service Callout action received SOAP Fault response
         </con:reason>
         <con:details>
         <con1:ReceivedFaultDetail      xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
         <con1:faultcode      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">soapenv:Client</con1:faultcode>
         <con1:faultstring>Cannot find dispatch method for {}</con1:faultstring>
    5) where is a simple example of calling a webservice from a message flow in oracle service bus?

    3) what do I use to get the retrun string from the webservice?If the web service call is successful, the response is stored in the context variable *$body*
    4) I am getting a BEA-382500 error.
    <con:reason>
         OSB Service Callout action received SOAP Fault response
         </con:reason>
         <con:details>
         <con1:ReceivedFaultDetail      xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
         <con1:faultcode      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">soapenv:Client</con1:faultcode>
         <con1:faultstring> Cannot find dispatch method for {} </con1:faultstring>Looks like there is a problem in the operation you are trying to invoke via the business service. Also please verify the exact message going out of the wire to the Backend Webservice.
    Are yo able to invoke the backend service directly from soapUI or similar tool? If yes, you can enable tracing on the Business service and capture the request sent out from OSB and compare the same with the one that works in soapUI. This should lead you to the exact issue.
    5) where is a simple example of calling a webservice from a message flow in oracle service bus?Please refer to http://www.oracle.com/technetwork/middleware/service-bus/osbsamples-085201.html for the samples.
    Hope this helps.
    Thanks,
    Patrick

  • Can't Run Simple Example

    Just installed jDev 3.2 on Win2K. When I try to run any java class I get the error "Cannot Determine Runnable Node". for a simple example I copied the "Clock" example to "MyProjects" folder, opened it in jDev, made/compiled the class (checked that clock.class was in MyClasses folder), but then run button does not work. I've checked the IDE default path settings and think they are OK.
    Could not find anything in the documentation about this error message. What don't I have set up right?

    Don... thanks. It does run when executed from the html. I was thinking applets could be run directly from within the IDE even without a main.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by don:
    make sure yu are highlighting and running a program with a "main" in it.
    if it's an applet,then execute it's related html.<HR></BLOCKQUOTE>
    null

  • Simple example web services SAAJ

    Hi!
    I'm new to web services and SAAJ. I'm trying to run a simple example that I got on the web:
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPConstants;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPMessage;
    public class SaajExample_1 {
      public static void main(String [] args)throws SOAPException{
           try{
        MessageFactory msgFactory = MessageFactory.newInstance();
        SOAPMessage message = msgFactory.createMessage();
        message.getSOAPHeader().detachNode();
        SOAPBody body = message.getSOAPBody();
        SOAPElement getBookPrice = body.addChildElement(
                                "getBookPrice",
                                "mh",
                                "http://www.Monson-Haefel.com/jwsbook/BookQuote");
        getBookPrice.setEncodingStyle(SOAPConstants.URI_NS_SOAP_ENCODING);
        SOAPElement isbn = getBookPrice.addChildElement("isbn");
        isbn.addTextNode("0321146182");
        System.out.println(message);
           catch(NoClassDefFoundError se){
                System.out.println("cause: "+se.getCause());
    }Of course it doesn't work( would be too easy! ;-) )
    I have the following error message when I run the program( it compiles perfectly):
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/soap/MessageFactory
    ...can someone help me please??
    Thanx
    Philippe

    I have all the libraries I need. If something is missing, then there would be a compilation error. I don't. It's when I try to run the program that I have the problem....
    Actually, it's not the MessageFactory that it doesn't find... It's the first object written in the code.
    And if I catch a SOAPException, this is the class it doesn't find.....????
    Wird....

  • Simple example of connecting SAP and VB

    Hi Experts
    Can anyone help me providing material or simple example program of connecting SAP and VB for data transfer.
         Its being a tough task for me, pls help me out.
    Thanks in advance.
    Regards
    Rajaram

    Form VB.NET appliaction you have two ways to connect to SAP system and execute BAPI. Either through webservices or by using NCo. Choice depends upon you appliaction requirement.
    For starting with NCo go through
    http://help.sap.com/saphelp_nw04s/helpdata/en/a9/4a57c1bac80e4e977d8cd9b3ecab89/frameset.htm
    OR
    THIS IS ANOTHER WAY TO LOGIN TO SAP THROUGH VB TRY THIS.
    Logon with the SAPLogon control, Use an RFC call from the SAP Function
    Control, and get the results with the SAP Table Factory Control. . .
    You must have SAPGui's FULL install on your machine for this to work (Or at
    least SAPLogon and the RFC toolkit)
    This VBScript example might help, it calls RFC_READ_TABLE in sap, and emails
    the results back to a user from a selected query (In this case uses that are
    locked out.
    This should show you how this could work in practice.
    Thanks,
    Will
    ' Email Locked out SAP users details to user in a .csv file through MS
    Exchange / CDO
    Dim ctlTableFactory, RFC_READ_TABLE, eQUERY_TAB, tblOptions, tblData,
    tblFields, funcControl, objConnection, ctlLogon
    Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
    Set ctlLogon = CreateObject("SAP.LogonControl.1")
    Set funcControl = CreateObject("SAP.Functions")
    Set ctlTableFactory = CreateObject("SAP.TableFactory.1")
    Set objWindowsScriptShell = CreateObject("WScript.Shell")
    Set objConnection = ctlLogon.NewConnection
    Set filOutputobjFileSystemObject.CreateTextFile("E:\SAP Scripts\LockedUsers.CSV", True)
    objConnection.ApplicationServerobjWindowsScriptShel l.RegRead("HKLM\Software\AccantiaEDI\SAPServer")
    objConnection.SystemobjWindowsScriptShell.RegRead(" HKLM\Software\AccantiaEDI\SID")
    objConnection.SystemNumber = "00"
    objConnection.ClientobjWindowsScriptShell.RegRead(" HKLM\Software\AccantiaEDI\SAPClient")
    objConnection.Language = "EN"
    objConnection.UserobjWindowsScriptShell.RegRead("HK LM\Software\AccantiaEDI\SAPSAPUser")
    objConnection.PasswordobjWindowsScriptShell.RegRead ("HKLM\Software\AccantiaEDI\SAPSAPPassword")
    booReturn = objConnection.Logon(0, True)
    If booReturn True Then
    'MsgBox " Cannot log on! "
    'MsgBox booReturn
    filOutput.WriteLine "ERROR CALLING LOGGING INTO SAP - FAILED LOGINS
    UNKNOWN"
    Stop
    Else
    'MsgBox " Logon OK."
    funcControl.Connection = objConnection
    Set RFC_READ_TABLE = funcControl.Add("RFC_READ_TABLE")
    Set strExport1 = RFC_READ_TABLE.Exports("QUERY_TABLE")
    Set strExport2 = RFC_READ_TABLE.Exports("DELIMITER")
    Set tblOptions = RFC_READ_TABLE.Tables("OPTIONS") '
    Set tblData = RFC_READ_TABLE.Tables("DATA") '
    Set tblFields = RFC_READ_TABLE.Tables("FIELDS") '
    strExport1.Value = "USR02"
    strExport2.Value = ","
    tblOptions.AppendRow
    tblOptions(1, "TEXT") = "LOCNT > 0 OR UFLAG = 128"
    tblFields.AppendRow
    tblFields(1, "FIELDNAME") = "BNAME"
    tblFields.AppendRow
    tblFields(2, "FIELDNAME") = "LOCNT"
    tblFields.AppendRow
    tblFields(3, "FIELDNAME") = "UFLAG"
    If RFC_READ_TABLE.Call = True Then
    If tblData.RowCount > 0 Then
    filOutput.WriteLine "UserName,FailedLogins,LockedFlag"
    ' MsgBox tblData.RowCount
    For intRow = 1 To tblData.RowCount
    filOutput.WriteLine tblData(intRow, "WA")
    Next
    Else
    filOutput.WriteLine "NO FAILED LOGINS OR LOCKED USERS"
    End If
    Else
    filOutput.WriteLine "ERROR CALLING SAP REMOTE FUNCTION CALL -
    FAILED LOGINS UNKNOWN"
    End If
    End If
    Set filOutput = Nothing
    MailProfile = "MS Exchange Settings"
    Set objSession = CreateObject("MAPI.Session")
    LogonOK = objSession.Logon(MailProfile)
    Set objMessage = objSession.Outbox.Messages.Add
    objMessage.Subject = "SAP Users Report - Locked Users + Failed Logins"
    strSetMessage = "There are " & tblData.RowCount & " users that are
    either locked due to failed logins, or have at least 1 failed login attempt
    on system " & objWindowsScriptShell.RegRead("HKLM\Software\Accant iaEDI\SID")
    & vbcrlf &
    reward if useful

  • Trying to create a simple example. Need Help!

    I'm trying to create a very simlpe examlpe using Swing components to illustrate a MVC architecture.
    I have a JFrame containing a JTree and a JButton.
    What I'd like to happen is when I click the JButton the JTree model is changed in some fashion and the the view is refreshed due to the models change.
    If anyone out there has a simple example of any MVC architecture involving Swing components I'd love to see it.
    Thx

    Sure, look at any of the Sun tutorials. For example, look in your API documentation for JTree; it has a link to a tutorial about how to use JTree.

  • Is there a simple example, I can see how to connect to a db using Flash 8 and actionscript? (not with components)

    I have been looking all over for a simple "hello world"
    example, on how to connect to a database, and pass a param, and
    return a dataset. I would like one that does not use components.
    (Actionscript only). That uses ColdFusion 7.x and Flash 8. Can
    anyone point me to one?

    Thanks Craig, I saw that example, but it was meant for Flash
    MX, and according to the Flash 8 documentation, the NetServices is
    now deprecated. Anyway, I posted my question on another site and
    some supplied me with a simple example. Here is the url if anyone
    is interested...
    sample

  • Looking for a simple example of the Minimax algorithm in java

    Hey everyone,
    I'm currently working on a Gameboy emulator program as a pet project, and for one of the game's I'd like for the enemy AI to use the Minimax algorithm, but I don't have any experience with it (or recursion in general, for that matter). Could anyone maybe post a simple example of how this algorithm works?

    WTF? I'm sure you can find plenty of examples on google. It's on you to take the time to go through them, study them, and, if you still don't understand something, post a clear, concrete question that indicates what you read and what you didn't understand about it.
    As is, you're essentially treating folks here as your research flunkies and saying, "Give me an example that's better than all the ones already easily available to me. Read my mind to know why I didn't like them."

  • I need for a simple example of  reading a xml file using jdom

    Hello
    I have been looking for a simple example that uses Jdom to read am xml file and use the information for anything( ), and I just can't find one.since I'm just beggining to understand how things work, I need a good example.thanks
    here is just a simple cod for example:
    <xmlMy>
         <table>
              <item name="first" value="123" createdDate="1/1/90"/>
              <item name="second" value="456" createdDate="1/4/96"/>
         </table>
         <server>
              <property name="port" value="12345"/>
              <property name="maxClients" value="3"/>
         </server>
    </xmlMy>Dave

    Hi,
            FileInputStream fileInputStream = null;
            try {
                fileInputStream = new FileInputStream("my_xml_file.xml");
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } finally{
                if (fileInputStream == null) return;
            SAXBuilder saxBuilder = new SAXBuilder();
            saxBuilder.setEntityResolver(new EntityResolver() {
                public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
                    return new InputSource(new StringReader(""));
            Document document = null;
            try {
                document = saxBuilder.build(fileInputStream);
            } catch (JDOMException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                if (document == null) return;
            Element element = document.getRootElement();
            System.out.println(element.getName());
            System.out.println(element.getChild("table").getName());

  • Error when opening Find Examples under the Help menu

    Today when I tried opening the Find Examples under the Help menu in LabVIEW 6.1, it would not open correctly. The Find Examples window appears and then an error window appears on top of it with the following description -
    "Error 1 occurred at open or create file (function 1)."
    Then ther is a list of possible reasons.
    I have had this version of LabVIEW installed for over 6 months and had no problems until today. I tried running the installation program for LabVIEW and repairing LabVIEW but had no success.
    What should I do next? Is there a file/s I can delete and then install manually?
    Thanks,
    Rodney

    I've never actually heard of this error ocurring with the Examples Finder before. If it continues, I would probably just reinstall LabVIEW. That should clear up the problem.
    J.R. Allen

  • Seeking simple example pl/sql to create text file from table data

    hello,
    I am hoping someone can provide very simple example of creating a file on my local harddrive using a pl/sql program. The basic steps are as follows:
    First, I store some text in a varchar2 variable like this:
    1. select sometext into otextvar from mytable where recordid = 1;
    Second, I want this text to become a file in my data directory:
    2. c:\data\sometext.txt
    The second step is where I need help.
    Any suggestions are greatly appreciated.

    Use this function
    It will create for you a file in your /home/oracle directory with sysdate name and will insert all table names in it
    CREATE OR REPLACE PROCEDURE my_proc AS
    CURSOR cursor1 IS
    SELECT table_name from all_tables;
    CURSOR cursor2 IS
    SELECT sysdate from dual;
    rec1 cursor1%ROWTYPE;
    rec2 cursor2%ROWTYPE;
    created_file_name VARCHAR2(100);
    file_name utl_file.file_type;
    BEGIN
    OPEN cursor2;
    LOOP
    FETCH cursor2 INTO rec2;
    EXIT WHEN cursor2%NOTFOUND;
    created_file_name:=rec2.sysdate;
    file_name := utl_file.fopen('/home/oracle', created_file_name,'W');
    OPEN cursor1;
    LOOP
    FETCH cursor1 INTO rec1;
    EXIT WHEN cursor1%NOTFOUND;
    utl_file.putf(file_name, '%s\n',rec1.TABLE_NAME);
    END LOOP;
    utl_file.fclose(file_name);
    END LOOP;
    END my_proc;
    SQL>exec my_proc;

Maybe you are looking for