Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images in Labltk Text Widget #8048

Closed
vicuna opened this issue Mar 7, 2003 · 4 comments
Closed

Images in Labltk Text Widget #8048

vicuna opened this issue Mar 7, 2003 · 4 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 7, 2003

Original bug ID: 1577
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Kun Gao
Version: 3.06
OS: Linux
Submission from: adsl-66-127-57-108.dsl.snfc21.pacbell.net (66.127.57.108)

Calling Text.image_create ~image:some_filename will always report filename as
bad

@vicuna
Copy link
Author

vicuna commented Mar 7, 2003

Comment author: administrator

Hi,
Yes, I used ImagePhoto to open the a file, then using the Tk.image value
returned in image_create. This always seems to give error. However, the
exact same Tk.image works fine with Canvas.create_image. Sorry if my bug
report was misleading.


Kun

-----Original Message-----
From: Jun P. FURUSE [mailto:Jun.Furuse@inria.fr]
Sent: Friday, March 07, 2003 3:39
To: kgao@uclink.berkeley.edu
Cc: caml@pauillac.inria.fr; caml-bugs@pauillac.inria.fr
Subject: Re: Images in Labltk Text Widget (#8048)

From: kgao@uclink.berkeley.edu
Subject: Images in Labltk Text Widget (#8048)
Date: Fri, 7 Mar 2003 10:40:30 +0100 (MET)
Message-ID: 200303070940.KAA31316@pauillac.inria.fr

Full_Name: Kun Gao
Version: 3.06
OS: Linux
Submission from: adsl-66-127-57-108.dsl.snfc21.pacbell.net
(66.127.57.108)

Calling Text.image_create ~image:some_filename will always report
filename as
bad

NO.

The ~image argument takes Tk.image, which does NOT specify image file
name,
but image identifiers in Tk interpreter. Read Tk manual page carefully!

--
Jun

@vicuna
Copy link
Author

vicuna commented Mar 7, 2003

Comment author: administrator

From: kgao@uclink.berkeley.edu
Subject: Images in Labltk Text Widget (#8048)
Date: Fri, 7 Mar 2003 10:40:30 +0100 (MET)
Message-ID: 200303070940.KAA31316@pauillac.inria.fr

Full_Name: Kun Gao
Version: 3.06
OS: Linux
Submission from: adsl-66-127-57-108.dsl.snfc21.pacbell.net (66.127.57.108)

Calling Text.image_create ~image:some_filename will always report filename as
bad

NO.

The ~image argument takes Tk.image, which does NOT specify image file name,
but image identifiers in Tk interpreter. Read Tk manual page carefully!

--
Jun

@vicuna
Copy link
Author

vicuna commented Mar 7, 2003

Comment author: administrator

Yes, I used ImagePhoto to open the a file, then using the Tk.image value
returned in image_create. This always seems to give error. However, the
exact same Tk.image works fine with Canvas.create_image. Sorry if my bug
report was misleading.

Text.image_create misses an argument of index. Because of this lack,
image name is considered as a text index. It will be fixed in the next
release of O'Caml. If you cannot wait, you can use the CVS version of
O'Caml, or try to use the following the following patch to your
source. Thanks your report. (It is curious that you are the first
person who reported this, though this function exists for years...)

--
Jun

Index: Widgets.src

RCS file: /net/pauillac/caml/repository/csl/otherlibs/labltk/Widgets.src,v
retrieving revision 1.18
retrieving revision 1.19
diff -c -r1.18 -r1.19
*** Widgets.src 2002/07/23 16:08:08 1.18
--- Widgets.src 2003/03/07 14:19:39 1.19


*** 1848,1854 ****
function (string) image_configure_get
[widget(text); "image"; "cgets"; name: string]
function (string) image_create
! [widget(text); "image"; "create"; option(embeddedi) list]
function (string list) image_names [widget(text); "image"; "names"]
function (Index(text) as "[>Linechar of int * int]") index [widget(text); "index"; index: TextIndex] ##ifdef CAMLTK --- 1848,1854 ---- function (string) image_configure_get [widget(text); "image"; "cgets"; name: string] function (string) image_create ! [widget(text); "image"; "create"; index: TextIndex; option(embeddedi) list] function (string list) image_names [widget(text); "image"; "names"] function (Index(text) as "[>Linechar of int * int]") index [widget(text); "index"; index: TextIndex]
##ifdef CAMLTK

@vicuna
Copy link
Author

vicuna commented Mar 10, 2003

Comment author: administrator

Fixed by Jun 2003-03-07

@vicuna vicuna closed this as completed Mar 10, 2003
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant