Animation: i must be missing something obvious...

... but what is it?
In the following code, why does button1 work; button2 work; but button3 doesn't work?
i really want button3 to work !!
var button1 = Button {
            text: "test1"
            action: function() {
                series.data[0].yValue = 8;
var button2 = Button {
            text: "test2"
            action: function() {
                animation1.evaluateKeyValues();
                animation1.playFromStart();
var button3 = Button {
            text: "test3"
            action: function() {
                animation2.evaluateKeyValues();
                animation2.playFromStart();
var animation1 = Timeline {
            repeatCount: 1
            keyFrames: [
                KeyFrame {
                    time: 2s
                    action: function(): Void {
                        series.data[1].yValue = 8
var animation2 = Timeline {
            repeatCount: 1
            keyFrames: [
                at (2s) {series.data[2].yValue => 8 tween Interpolator.LINEAR}
var series = LineChart.Series {
            name: "Line 1"
            data: [
                LineChart.Data { xValue: 0 yValue: 4 }
                LineChart.Data { xValue: 5 yValue: 4 }
                LineChart.Data { xValue: 10 yValue: 4 }
var theChart = LineChart {
            title: "Line Chart"
            xAxis: NumberAxis {
                lowerBound: 0
                upperBound: 10
            yAxis: NumberAxis {
                lowerBound: 0
                upperBound: 10
            data: [series]
Stage {
    scene: Scene {
        width: 500
        height: 500
        content: [
            VBox {
                content: [
                    HBox { content: [button1, button2, button3] }
                    theChart
}

well this is a bit complex to understand,
compiler throws a saying that
In animation target series.data[ 2].yValue, series.data[ 2] is not a constant, but will be treated as such. You may want to rewrite as:
def temp = series.data[ 2]
temp.yValue =x which means that at the time the KeyFrame object is created, it reads the current value of series.data[2] and stores somewhere in memory, which means your series data should be populated before creating the timeline.
so moving the location of the Timeline below the stage declaration will work as expected
here is the modified code that works !
var button1 = Button {
            text: "test1"
            action: function() {
                series.data[0].yValue = 8;
var button2 = Button {
            text: "test2"
            action: function() {
                animation1.evaluateKeyValues();
                animation1.playFromStart();
var button3 = Button {
            text: "test3"
            action: function() {
                animation2.evaluateKeyValues();
                animation2.playFromStart();
var animation1 = Timeline {
            repeatCount: 1
            keyFrames: [
                KeyFrame {
                    time: 2s
                    action: function(): Void {
                        series.data[1].yValue = 8
var series = LineChart.Series {
            name: "Line 1"
            data: [
                LineChart.Data { xValue: 0 yValue: 4 }
                LineChart.Data { xValue: 5 yValue: 4 }
                LineChart.Data { xValue: 10 yValue: 4 }
var theChart = LineChart {
            title: "Line Chart"
            xAxis: NumberAxis {
                lowerBound: 0
                upperBound: 10
            yAxis: NumberAxis {
                lowerBound: 0
                upperBound: 10
            data: [series]
Stage {
    scene: Scene {
        width: 500
        height: 500
        content: [
            VBox {
                content: [
                    HBox { content: [button1, button2, button3] }
                    theChart
var animation2 = Timeline {
            repeatCount: 1
            keyFrames: [
                at (2s) {series.data[2].yValue => 8 tween Interpolator.LINEAR}
        } Cheers !
Abhilshit

Similar Messages

  • Odd page flow error I must be missing something obvious

    Ok in another .jpf file I have this working fine but for some reason in this one it is not. I get the following error.
    Caught exception when evaluating expression "{actionForm.unitPrice}" with available binding contexts [actionForm, pageFlow, globalApp, request, session, appication, pageContext, bundle, container, url, pageInput]. Root cause: com.bea.wlw.netui.script.xscript.IllegalContextStateException: The action form for the expression "actionForm["unitPrice"]" could not be found.
    My follwoing setup is as follows.
    page1.jsp -> action1.do ->page2.jsp
    action1 method below:
    * @jpf:action
    * @jpf:forward name="success" path="page2.jsp"
    protected Forward assignLicense()
    CustomForm form = new CustomForm();
    form.setUnitPrice("32");
    return new Forward( "success", form);
    My page2.jsp is as follows:
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
    <netui-template:template templatePage="/resources/jsp/scmla_template.jsp">
    <netui-template:section name="bodySection">
    <netui:form tagId="assingLicenseForm" action="begin.do" >
    <netui:textBox dataSource="{actionForm.unitPrice}"/>
    </netui:form>
    </netui-template:section>
    </netui-template:template>
    ActionForm definition in jpf file:
    public static class CreateLicenseForm extends FormData
    private String unitPrice;
    public void setUnitPrice(String unitPrice)
    this.unitPrice = unitPrice;
    public String getUnitPrice()
    return this.unitPrice;
    }

    Kyle,
    I can't be sure without more code but you could see this behavior if the
    action associated with the form does not take a form bean. I'm referring
    to this line
    <netui:form tagId="assingLicenseForm" action="begin.do" >
    does the begin action take a form bean?
    If that isn't the problem I'll take another look for you.
    - john
    Kyle Gruskin wrote:
    Ok in another .jpf file I have this working fine but for some reason in this one it is not. I get the following error.
    Caught exception when evaluating expression "{actionForm.unitPrice}" with available binding contexts [actionForm, pageFlow, globalApp, request, session, appication, pageContext, bundle, container, url, pageInput]. Root cause: com.bea.wlw.netui.script.xscript.IllegalContextStateException: The action form for the expression "actionForm["unitPrice"]" could not be found.
    My follwoing setup is as follows.
    page1.jsp -> action1.do ->page2.jsp
    action1 method below:
    * @jpf:action
    * @jpf:forward name="success" path="page2.jsp"
    protected Forward assignLicense()
    CustomForm form = new CustomForm();
    form.setUnitPrice("32");
    return new Forward( "success", form);
    My page2.jsp is as follows:
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
    <netui-template:template templatePage="/resources/jsp/scmla_template.jsp">
    <netui-template:section name="bodySection">
    <netui:form tagId="assingLicenseForm" action="begin.do" >
    <netui:textBox dataSource="{actionForm.unitPrice}"/>
    </netui:form>
    </netui-template:section>
    </netui-template:template>
    ActionForm definition in jpf file:
    public static class CreateLicenseForm extends FormData
    private String unitPrice;
    public void setUnitPrice(String unitPrice)
    this.unitPrice = unitPrice;
    public String getUnitPrice()
    return this.unitPrice;

  • Error in XML parsing. Im i missing something obvious.

    I am new to XML and i cant seem to be able to iterate through the xml response.
    Here is the relevant code
         QName qName = new QName( "http://www.ros.ie/schemas/customs/collectresponse/v1", "MailboxCollectResponse" );
                              //create the parser
                              XMLStreamReader parser = response.getPullParser(qName);                 
                              StAXOMBuilder builder = new StAXOMBuilder(parser);
                              OMElement documentElement = builder.getDocumentElement();
                              //dump the out put to console with caching
                              System.out.println(documentElement.toStringWithConsume());                             
                              //QName elementQName = new QName("http://www.ros.ie/schemas/customs/collectresponse/v1","MailboxItem");
                              QName elementQName = new QName("http://www.ros.ie/schemas/customs/collectresponse/v1","MailboxItemList");
                              Iterator infoIter =
                                  documentElement.getChildrenWithName(elementQName);
                                  while (infoIter.hasNext()) {
                                      OMElement element = (OMElement) infoIter.next();
                                      System.out.println("Matching Element Name = " +
                                          element.getFirstElement().getText());
                                      }  The println statement is producing this output which i think is correct.
    <MailboxItemList xmlns="http://www.ros.ie/schemas/customs/collectresponse/v1" moremessages="false" messagecount="2"><MailboxItem xmlns="http://www.ros.ie/schemas/customs/collectresponse/v1"><ns2:IEMailboxId xmlns:ns2="http://www.ros.ie/schemas/customs/customstypes/v1">Mailboxid123</ns2:IEMailboxId><ns2:IETransactionId xmlns:ns2="http://www.ros.ie/schemas/customs/customstypes/v1">Transaction123</ns2:IETransactionId><Message xmlns="http://www.ros.ie/schemas/customs/collectresponse/v1"><x:root xmlns:x="bar" xmlns:y="bar1"><x:foo xmlns:x="bar"><y:yuck xmlns:y="bar1">blah</y:yuck></x:foo></x:root></Message>But when it gets to the Iterator an exception is raised.
    org.apache.axiom.om.OMException: Parser has already reached end of the document. No siblings found
         at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:267)
         at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java:69)
         at com.alp.ccs21.soapwg.msgcollect.FrDHLCli.collectMsgs(FrDHLCli.java:281)
         at com.alp.ccs21.soapwg.msgcollect.FrDHLCli.run(FrDHLCli.java:203)Im i missing something obvious here?
    Thanks in advance.

    Edited by: ziggy on Jul 31, 2010 4:48 PM

  • I updated to lion and now don't have a minimize button in the new emails i am writing.  Do i really have to save it as a draft to be able to have multiple emails in progress?  Or am I missing something obvious?!

    I updated to lion and now don't have a minimize button in the new emails i am writing.  Do i really have to save it as a draft to be able to have multiple emails in progress?  Or am I missing something obvious?!

    Photoshop Elements is not part of the Cloud, I will move this to that forum
    Photoshop Elements Forum http://forums.adobe.com/community/photoshop_elements
    Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html
    -and https://forums.adobe.com/thread/1572504
    Lost serial # http://helpx.adobe.com/x-productkb/global/find-serial-number.html
    Select a topic, then click I STILL NEED HELP to activate Photoshop Elements Online chat
    -http://helpx.adobe.com/contact.html?product=photoshop-elements or
    http://helpx.adobe.com/photoshop-elements/kb/troubleshoot-installation-photoshop-elements- premiere.html

  • I synched iPhone and PC but can't locate any of library on iPhone - am i missing something obvious ?

    i synched iPhone and Pc but can't locate any of library on IPhone - am I missing something obvious ?

    What did you select to sync?
    It will only sync what you tell it to sync.
    iPhone User Guide (For iOS 4.2 and 4.3 Software)

  • Upsert of xmltype from given xpath - missing something obvious?

    Version: 10.2.0.*2* EE
    I am trying to do an upsert (update/ insert ) of an xmltype for a given xpath.
    The xml data is being passed as an xmltype, the xpath is a string (varchar2), the new value is a string, varchar2.
    If the node specified by the xpath exists this is trivial using updatexml; of course if the node doesn't exist nothing happens. I can check for the nodes existence using exists node, but I'm coming unstuck trying to figure out how to insert the node.
    All the APIS I can find that insert XML (APPENDCHILDXML,INSERTXMLBEFORE, INSERTCHILDXML) do not take an xpath but require an xmltype. Which means if I am reading this right I have no choice but to parse the xpath varchar2 string to try and construct an xmltype (ugh!).
    I can't find any API that just takes an xpath as a varchar2 and a value and gives me an xmltype. Ideally I don't even want that, would just like an API that returns the updated XML which has either had the xpath updated (or inserted if it didn't exist) with the new value.
    I am not an XML expert but I am pretty handy with SQL and PL/SQL. To me this just seems incredibly cumbersome just to do something as trivial as an upsert, so I am hoping I am missing something obvious!
    Can soemone please set me straight with a pointer or example?
    To top it all off the XML uses namespaces, but they aren't registered, there is no schema registration going on.

    Marco Gralike wrote:
    Couldn't it be done via XQuery, although the database version doesn't really help...That would be possible with a dynamic XQuery expression, but "painful" with a static expression as it would require parsing the XPath, and rebuilding the entire input document with the required modifications.
    I think XSLT would be more efficient in this case.
    Maybe, one day, when the database has XQuery Update Facility, we will be able to do this :
    copy $a := $doc/Address
    modify (
      if ($a/zip)
        then replace value of node $a/zip with "12345"
        else insert node element zip {"12345"} into $a
    return $a
    user12083137 wrote:To me, from a SQL background, I can't believe this simple case is simply not covered.Maybe not as simple as it seems. :)
    The functionality can be simulated via an IF/THEN/ELSE logic, or a DELETE/INSERT sequence.
    For example :
    case when existsNode(doc, xpath) = 1
      then updateXML(
             doc
           , xpath || '/text()'
           , somevalue
      else appendchildxml(
             doc
           , substr(xpath, 1, instr(xpath, '/', -1)-1)
           , xmlelement(
               evalname(substr(xpath, instr(xpath, '/', -1)+1))
             , somevalue
    endor,
    appendChildXML(
      deleteXML(doc, xpath)
    , substr(xpath, 1, instr(xpath, '/', -1)-1)
    , xmlelement(
        evalname(substr(xpath, instr(xpath, '/', -1)+1))
      , somevalue
    )

  • RMIC & Netbeans - am I missing something obvious?

    I finally managed to get rmic to compile something without errors, but I can't find any additional files I thought it would create. I added the following to build.xml in my server application:
    <target name="-post-compile">
    <!-- Empty placeholder for easier customization. -->
    <!-- You can override this target in the ../build.xml file. -->
    <echo message="Running rmic ..."/>
    <rmic base="${build.classes.dir}" includes="**/*Impl.java;${build.classes.dir}"/>
    </target>
    And I see this in the compiler output:
    Running rmic ...
    But nothing. Did I miss something obvious? I'm using Netbeans Beta 6.
    Thanks

    Ok, so I read some more recent tutorials (teaches me for reading an old book!) and I have some success. Except:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: StudioWorks.security.SecurityResponder
    at sun.rmi.server.UnicastServerRef.oldDispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    Obviously there are two issues;
    1) Can't find the remote object's class
    2) The remove object isn't serializable? Odd, as it extends Remote. I thought that was enough based on what I'm reading
    Maybe it's a simple mistake of not providing the right parameters/classpath to the rmiregistry, which I'm running from the command line and not through Netbeans (don't know how to do that).
    Back to the reading! :)
    Edited by: BobCrivens on Oct 14, 2007 8:32 PM

  • Adding an application component - missing something obvious

    Hi,
    We just upgraded to portal (running server and portal on windows nt) and I am developing. We have reports already completed in reports 6i. However, I am having trouble adding them to the pages or even in the "other providers" listed in portlet repository. The report is connected, as when I click on "edit" and then "run," it runs. I just don't know what I need to do so that the report shows in the "application component" when I click on "add item."
    I am sure that I am missing something obvious. Any help would be greatly appreciated.
    Thanks,
    Lindsay

    Thanks anyway, I figured it out. :-)

  • Am I missing something OBVIOUS

    Is it just me or am I missing something OBVIOUS
    I simply find it ALMOST IMPOSSIBLE to report a BROADBAND fault using E_MAIL
    I seem to be going round in circles .....................and the HELP SOLUTIONS ..... DON'T
    Yours   ING D M Logan
    Ing D M Logan Retired ACADEMIC Structural Engineer

    Hi Westerwood_Community and welcome
    If you select 'Broadband' at the top of any forum page, then click on 'Contact us about Broadband' , select 'BT Broadband', select the section you need (in your case 'I have problems connecting to broadband'), you can then email BT from there.
    The direct link to contact BT is - http://bt.custhelp.com/app/contact/c/346,401,1847
    Hope this helps
    edit. Or simply use the link Keith provided
    -+-No longer a forum member-+-

  • Zooming, I must be missing something....

    I'm wanting to zoom in on an area more than the "Zoom to actual size" command does, to get a more detailed look while using the retouch tool. (tried retouching within the frame of the loop, doesn't work) This seems so basic I must be missing something.

    Tom --
    You're absolutely right -- Aperture needs an iPhoto-like zoom slider for the entire Viewer window, especially for the reason you describe. There are situations where either the Z-key 100% toggle or the Loupe magnification simply aren't the best tools for the job at hand.
    It's one of the MANY (as in several dozen) "enhancement requests" I've sent to Aperture Feedback, many of which (like this one) just strike me as Don't-Even-Release-the-Beta-Until-You've-Got-This-One-Enabled kind of feature.
    John Bertram
    Toronto

  • I must be missing something! I do not see Adobe Encore listed to download...

    I must be missing something! I do not see Adobe Encore listed to download...need help soon....

    Actually, it was already on my computer. Must have come with Premiere. Silly me...

  • I must be missing something simple

    about a month ago I signed up Creative cloud monthly plan.  I downloaded bridge and photoshop.  When I click on window to see what has been downloaded it says photoshopCC and bridge CC is up to date.   I can open bridge but not photoshop.  I have tried and tried to figure it out and must be missing something simple.  NowI am frustrated and need help.

    Douglashoffman007 which operating system are you using?  Where have you tried to open Photoshop CC from?

  • I must be missing something somewhere. I added a dozen songs to my laptop. how/when would I expect to see those songs uploaded into match?

    I must be missing something somewhere. I added a dozen songs to my laptop. how/when would I expect to see those songs uploaded into match?
    Thanks for any help.

    What is the iCloud Status of the tracks that are not showing on the iOS device?
    Switch to Song view and pull down View > View Options then select "iCloud Status" then close the small window.

  • Must e Missing Something

    Surely there is another way to delete existing info. from a keyboard field so that new info can be entered. Can we highlight info to delete it quickly? If so this is proving very difficult. For now I have to press the Delete key repeatedly and it's getting wearisome.
    TY!

    "Must e Missing Something"? Yes, it's the letter 'B'
    Instead of repeatedly pressing the delete key if you just keep it pressed it will keep deleting characters and eventually speed up and start deleting whole words.

  • Missing something obvious

    I am using nigpib version 6 with RedHat Linux 6.2. I am having problems talking to my instruments. Two devices a Keithley Multimeter 2001 and an IO TECH dac488hr refuse to communicate. Their remote lights go on but I get an EBUS error when doing ibwrt to either. Two other devices an SRS850 lockin amplifier, and an ESI model 73 precision transformer respond to commands well enough but I get an EAB0 error returned. I recognize the problems have to do with timeout. I have changed ibtmo to various settings but continue to get errors. I have tried to be careful setting the EOS and EOI attributes for each device but clearly I am missing something. Any suggestions?
    In the past I used the LLP gpib driver and don't recall gett
    ing these kinds of problems. I was going to port over my old code to talk with the instruments but I see that there is some rather sigificant differences in the way you do business. For one under LLP Clausi set up a /dev/gpib0/master device through which commands were passed. In addition he had a /etc/gpib.conf file and loaded his module via insmod in rc.d. You, on the other hand, set up /dev/gpib, /dev/gpib0, /dev/gpib1/, /dev/gpib2, /dev/gpib3, /dev/gpibdebug and /dev/dev0 /dev/dev1 etc (where dev# is a device configured with ibconf). What are the relationships between your strategies? What must I do to port my old software to my newer linux OS and use your drivers rather than those from LLP?
    I could really use some insights. Any comments (sans flaming ;-) would be welcome.

    I tried this but with no success. I called the help line and spoke with Ben P. and Armando V. they walked me through the ibic and ibconf tools, again, with no success.
    I spoke with the vendors of the instruments which are giving the EBUS error. They walked me through the setups (especially wrt to EOS and EOI). They were confused as to why the instruments failed to respond.
    With my last call to NI (SR#345883) the engineers suggested that I respond to this email and ask for further support. They requested/suggested I supply the following 3 pieces of information:
    1) revision of boards and part nos.
    2 ATGPIB-TNT boards vintage 1993
    assy 181830-01 REV. D
    1 ATGPIB-TNT PNP vintage 1995
    assy 182885E-01
    The implication was that NI might be able to provide an upgrade to the firmware if that was at fault.
    2) Capture of errors in ibic
    basically following your webpage for ibic works upto communicating with devices. Sample output follows:
    : ibfind gpib0
    id = 0
    gpib0: ibpad 0
    [0100] ( cmpl )
    previous value: 0
    gpib0: ibfind keithley
    id = 1002
    keithley: ibwrt "*IDN?\xA"
    [8100] ( err cmpl )
    <>
    error: EBUS
    count: 0
    keithley: ibrd 100
    [8100] ( err cmpl )
    error: EBUS
    count: 0
    <>
    keithley: ibfind ratio
    id = 1003
    ratio: ibwrt "Ratio 0.1234567\xA"
    [c100] ( err timo cmpl )
    error: EAB0
    count: 16
    <
    the ratio, as verified by the display >>
    ratio: ibrd 100
    [e100] (err timo end cmpl )
    error: EAB0
    count: 17
    52 61 74 69 6f 20 30 2e Ratio 0.
    31 32 33 34 35 36 37 30 12345670
    0a .
    using the SRS850 Lockin Amplifier has an added advantage. It will show the input and output queues on the screen. When I command this instrument I can watch as it receives its instructions. The commands are going through correctly (NOTE: this device also gives an EAB0 error).
    I have tried different cables, different machines, different DMA settings, different interrupts, different instruments, different ibtmo values, different cards, single devices on short cables, but keep getting errors.
    I have used the ibic webpage (setting ibsre 1, etc) and these work fine but the devices still complain.
    3) Give the version of Linux I am using...
    We are running Redhat 6.2, kernel version 2.2. We have older versions of the Linux OS which are running the LLP gpib driver for the SAME devices and it works fine. I would rather not go back to older versions if possible, besides since NI has done the Linux gpib driver, it appears that LLP has dropped support. In particular, I cannot get their drivers to compile in Redhat 6.2 and get no response from my emails. I would be willing to move to newer versions of Linux if that would solve the problem.
    I have confirmed the following:
    The ibtsta program says the driver is installed correctly (run without the gpib cable attached.)
    Interrupts, dma, iports are unique and without contention.
    The gpib card responds to commands (eg using ibic.)
    Some devices respond in a fashion, others fail. But all seem to receive signals from the computer.
    The instruments and cables attached to the system are sound.
    The gpib card, cables, and devices respond correctly from a dual boot machine running WinNT and Linux (i.e. no movement of cables, devices, or cards). On the WinNT side the recently downloaded NI drivers work and I can communicate (with the Keithley 2001) flawlessly.
    I am must now ask whether the driver is at fault. I understand the drivers are beta, but these appear to be the only workable drivers out there. ANY HELP WOULD BE APPRECIATED!
    >>

Maybe you are looking for