Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=1mJ3b3dqy6mBX4ZgfmWhG3pVlL4RD/idbtWkJ2RyG5E=; b=iA2xBl7VTjMT0wmqzlayg+0xy4SDNiEo/HLBVsMM4DCsuv9DWWOhgwpJ74SYqCT0UvMWJkcyfJ3ZXTUjzXzHPUNcQGp4zyTOGBm3i8W9hdXxQxiAVIzpvyecFWvK/UtaEMluTc1fDVo+XxxoU8mEvrXWwMBDNvESxMqw4x2c3RI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=F292VqWvS1XSpewzoIgzPH39oSYTq9Fou1YWxjA9RUO2AR6vaCDpzOFPrDirqI9AC+oKVRiHxIsQPrmlbCc5iXeBIpeByrX/sxFiR/HjYZMl2CYPy0YOkDuH6931PFjOiqbWDKERKKo8GuhuL+44PbqIt5GDBdDZBTmIDRugmak= Message-ID: Date: Fri, 22 Feb 2008 12:47:26 -0600 From: "Angela Zhu" To: lablgtk at yquem.inria.fr In-Reply-To: MIME-Version: 1.0 References: Subject: [Lablgtk] Re: How to use GSourceView.source_view_signals Mime-version: 1.0 Content-Type: multipart/mixed; boundary="===============0552674073==" Content-Length: 3925 --===============0552674073== Content-Type: multipart/alternative; boundary="----=_Part_2790_24856655.1203706047527" ------=_Part_2790_24856655.1203706047527 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sorry for the confusions I made, I have resolved my problem. Thanks, Angela On Fri, Feb 22, 2008 at 11:59 AM, Angela Zhu wrote: > Hi, > > Can anyone help me with how to use gSourceView.source_view_signal > > According to > > http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk/html/GSourceView.source_view_signals.html > > If I want to use the undo method, what should I have in the following > ~callback function? > > ------------------------------------------ > > let sview = GSourceView.source_view () in > ... > and edit_entries1 = > [...; > `I ("Copy", > (fun () -> > program1#buffer#copy_clipboard GMain.clipboard);); > `I ("Undo", > (fun () -> > ignore(sview#connect#undo ~callback:(fun () -> ()))))] > (* NOW IT DOES NOTHING, what should I change here? *) > ------------------------------------------ > > > Thanks, > Angela > > -- Regards, Angela Zhu ------------------------------------------ Dept. of CS, Rice University http://www.cs.rice.edu/~yz2/ ------------------------------------------ ------=_Part_2790_24856655.1203706047527 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sorry for the confusions I made, I have resolved my problem.

Thanks,
Angela


On Fri, Feb 22, 2008 at 11:59 AM, Angela Zhu <angela22.zhu@gmail.com> wrote:
Hi,

Can anyone help me with how to use gSourceView.source_view_signal

According to
http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk/html/GSourceView.source_view_signals.html

If I want to use the undo method, what should I have in the following ~callback function?

------------------------------------------

let sview = GSourceView.source_view () in
 ...
 and edit_entries1 =
       [...;
        `I ("Copy",
           (fun () ->
              program1#buffer#copy_clipboard GMain.clipboard););
        `I ("Undo",
           (fun () ->
              ignore(sview#connect#undo ~callback:(fun () -> ()))))] 
        (* NOW IT DOES NOTHING, what should I change here? *)
------------------------------------------


Thanks,
Angela




--
Regards,
Angela Zhu
------------------------------------------
Dept. of CS, Rice University
http://www.cs.rice.edu/~yz2/
------------------------------------------ ------=_Part_2790_24856655.1203706047527-- --===============0552674073== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk --===============0552674073==--