From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id E47A9BDCB for ; Thu, 8 Sep 2005 20:12:31 +0200 (CEST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.89]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j88ICUR4027956 for ; Thu, 8 Sep 2005 20:12:31 +0200 Received: from mac.com (smtpin02-en2 [10.13.10.147]) by smtpout.mac.com (Xserve/8.12.11/smtpout02/MantshX 4.0) with ESMTP id j88ICTCn005107 for ; Thu, 8 Sep 2005 11:12:29 -0700 (PDT) Received: from [10.0.2.5] (dsl092-032-215.lax1.dsl.speakeasy.net [66.92.32.215]) (authenticated bits=0) by mac.com (Xserve/smtpin02/MantshX 4.0) with ESMTP id j88ICR2s021803 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Thu, 8 Sep 2005 11:12:28 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v734) Content-Transfer-Encoding: 7bit Message-Id: <70DC8B53-7958-4CC6-A979-2CDFE4E03386@mac.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: caml-list@yquem.inria.fr From: Paul Snively Subject: Trouble Defining an Object Date: Thu, 8 Sep 2005 11:12:14 -0700 X-Pgp-Agent: GPGMail 1.1.1 (Tiger) X-Gpgmail-State: signed X-Mailer: Apple Mail (2.734) X-Miltered: at concorde with ID 43207F0E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; hash:01 ocamlsdl:01 findlib:01 ocamlsdl:01 toplevel:01 usr:01 lib:01 ocaml:01 site-lib:01 usr:01 lib:01 ocaml:01 site-lib:01 foo:01 binary:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Folks, I'm trying to define a class that, given a string containing bytes from, e.g. an MP3, Ogg Vorbis, etc. music, contains that music. Later, of course, I'll make the class actually do something with the data, but for right now I can't even get the code to compile. I'm using the current ocamlsdl and findlib. Here's a copy of my session in the ocamlsdl toplevel: - ----------------------------snip snip---------------------------- Objective Caml version 3.08.4 # #require "sdl.sdlmixer";; /usr/local/lib/ocaml/site-lib/sdl: added to search path /usr/local/lib/ocaml/site-lib/sdl/sdlmixer.cma: loaded # open Sdlmixer;; # open Filename;; # class foo init_song = let name, chan = open_temp_file ~mode:[Open_binary] "foo" "bar" in output_string chan init_song; close_out chan; let the_song = load_music name in object val mutable song = the_song end;; Characters 123-124: output_string chan init_song; ^ Syntax error - ----------------------------snip snip---------------------------- I'm at a loss to understand where the error lies. Any advice would be greatly appreciated. Many thanks and best regards, Paul -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iEYEARECAAYFAkMgfwcACgkQO3fYpochAqKSnQCgtaAHbn6WNPyBf5dymt+E2l8n IzEAoIzGA4Xb5igB719KOf/msuEBG/wD =HlQ/ -----END PGP SIGNATURE-----