Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Starting with FlapJax
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
André Matos  
View profile  
 More options Sep 18, 8:39 am
From: André Matos <apdma...@gmail.com>
Date: Fri, 18 Sep 2009 13:39:55 +0100
Local: Fri, Sep 18 2009 8:39 am
Subject: Starting with FlapJax

Hi everyone,

I am starting with flapjax, and for a first contact I am using the paper in
your web site. That has some interesting concepts, but I think for the first
time it is very hard to understand.

I have tried the first example on the paper:

<html>

      <head>

            <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">

            <title>FlapJax - Elapsed time</title>

            <script type="text/javascript" src
http://www.flapjax-lang.org/download/flapjax-2.0.1.js"></script>

            <script type="text/javascript">

                  function loader(){

                        var nowB = timerB(1000);

                        var startTm = nowB.valueNow();

                        var clickTmsB = $E("reset",
"click").snapshotE(nowB).startsWith(startTm);

                        var elapsedB = nowB - clickTmsB;

                        insertValueB(elapsedB, "curTime", "innerHTML");

                  }

            </script>

      </head>

      <body onload="loader();">

            <h1>FlapJax - Elapsed time</h1>

            <input id="reset" type="button" value="Reset"/>

            <div id="curTime"></div>

      </body>

</html>

But it doesn’t work…

nowB and clickTmsB are objects, instances of Beavior object, and there are
no – operator (I think the only way to subtract objects in javascript is
defining valueOf method).

Anyway, is that a bug on your paper? Am I doing anything wrong?

Thanks in advise,

Best Regards

André Matos


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arjun Guha  
View profile  
 More options Sep 18, 1:35 pm
From: Arjun Guha <arjun.g...@gmail.com>
Date: Fri, 18 Sep 2009 13:35:40 -0400
Local: Fri, Sep 18 2009 1:35 pm
Subject: Re: [Flapjax: 519] Starting with FlapJax
Hi André,

The examples in the paper are meant to work with the compiler:

http://www.flapjax-lang.org/try/

You'll need to make a few changes to your code.  The language in the  
script tag should say "flapjax" and not "javascript."  Once you do  
that, you no longer need a loader:

<html>

<head>

<script type="text/flapjax">

var nowB = timerB(1000);
var startTm = nowB.valueNow();
var clickTmsB = $E("reset","click").snapshotE(nowB).startsWith(startTm);

var elapsedB = nowB - clickTmsB;
insertValueB(elapsedB, "curTime", "innerHTML");

</script>

</head>

       <body>
             <h1>FlapJax - Elapsed time</h1>
             <input id="reset" type="button" value="Reset"/>
             <div id="curTime"></div>
       </body>
</html>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google