caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: "Çagdas Bozman" <cagdas.bozman@ocamlpro.com>
Cc: caml-list@inria.fr, Hongbo Zhang <bobzhang1988@gmail.com>,
	 Pierre-Etienne Meunier <pierreetienne.meunier@gmail.com>
Subject: Re: [Caml-list] An easy tutorial to js_of_ocaml?
Date: Fri, 21 Dec 2012 18:05:22 +0100	[thread overview]
Message-ID: <CAPFanBHC1Y2cXw5=QTJQrGtzk+=aAMdomCkzkVG6mu3-S5R9TA@mail.gmail.com> (raw)
In-Reply-To: <50D42FD3.5080401@ocamlpro.com>

When I click "Reset" in the toplevel, the changes that were made to
the webpage are not reverted (I still see the moving square). This is
not what I would expect; I understand reverting this perfectly is
probably not easy or even possible, but some form of rollbacks that
allows to revert to a clean state if we didn't do anything really
crazy would be appreciated.

On Fri, Dec 21, 2012 at 10:45 AM, Çagdas Bozman
<cagdas.bozman@ocamlpro.com> wrote:
> Hi !
>
> On 12/21/2012 04:58 AM, Hongbo Zhang wrote:
>
> On 12/20/12 3:31 PM, Pierre-Etienne Meunier wrote:
>
> Hi,
>
> Personally, I learnt js_of_ocaml by first learning javascript using firebug
> in firefox. They have something called the console, similar to a toplevel,
> where you can directly manipulate the DOM to see what you are supposed to do
> with javascript, and immediately see the results on the webpage. Make a
> simple webpage, the most important point is that your elements all have a
> property called "id", and try to play with this toplevel before
> understanding it. A typical example is :
>
> Thanks for your message, it's really helpful ;-)
>
> <html>
> <body>
> <div id="example">
> Blabla
> </div>
> <p id="aparagraph">
> Blibli
> <p>
> </body>
> </html>
>
> Then, in order :
>
> - try to make a table programmatically (using the Mozilla Developper
> Library).
> - use httprequests.
> - animate svg pictures
> - use canvas.
>
> Then if you learn about what javascript calls "prototypes", you're done
> learning javascript, and you can do all this in ocaml.
>
> Good luck
> Pierre
>
>
> Em 20/12/2012, às 17:41, bob zhang escreveu:
>
> Dear List,
>     I tried several times using js_of_ocaml, but did not get a working
> example yet, it  always gives me some error message like missing some
> primitives.
>     I am absolutely a newbie in javascript, is there some simple working
> examples online?
>
>     I followed this thread, http://toss.sourceforge.net/ocaml.html, but the
> output JsClient.js does not work as I expected
>     Thanks in advance!
>
> --
> Regards
> -- Bob
>
>
>
> Are you aware of this page : http://try.ocamlpro.com/js_of_ocaml/
> We put some examples and you can try them online.
>
> You can also look at the source of TryOCaml, it can be a start :-)
>
> -- Çagdas

  parent reply	other threads:[~2012-12-21 17:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20 16:41 bob zhang
2012-12-20 20:31 ` Pierre-Etienne Meunier
2012-12-21  3:58   ` Hongbo Zhang
2012-12-21  9:45     ` Çagdas Bozman
2012-12-21 16:56       ` Ashish Agarwal
2012-12-21 17:05       ` Gabriel Scherer [this message]
2012-12-21 20:55       ` bob zhang
     [not found] <fa.FJUwiHb9MCpx1s04UJaSR5DeNOI@ifi.uio.no>
2012-12-20 17:56 ` Barbara Lepage (db0)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPFanBHC1Y2cXw5=QTJQrGtzk+=aAMdomCkzkVG6mu3-S5R9TA@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=bobzhang1988@gmail.com \
    --cc=cagdas.bozman@ocamlpro.com \
    --cc=caml-list@inria.fr \
    --cc=pierreetienne.meunier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).