You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1581 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Matt Gushee
Version: 3.06
OS: Linux (Debian 3.0)
Submission from: 216.241.35.41 (216.241.35.41)
LablTk specifies a type of float for the 'weight' argument to
Grid.column_configure
and Grid.row_configure, but Tk expects an integer. Therefore,
Grid.column_configure ... ~weight: 1.;
results in the following error:
Exception: Protocol.TkError "expected integer but got "1."".
Sample code is included at the bottom of this message.
This bug can be fixed by editing $OCAML_SRC/otherlibs/labltk/Widgets.src as
follows:
(* ==================================================== )
( Sample code *)
open Tk;;
let win = openTk () in
let f = Frame.create win in
let main = Text.create f in
let v = Scrollbar.create f ~orient: Vertical ~command: (Text.yview main) and h = Scrollbar.create f ~orient: Horizontal ~command: (Text.xview main)
in
Text.configure main ~yscrollcommand: (Scrollbar.set v)
~xscrollcommand: (Scrollbar.set h);
pack [ f ] ~expand: true ~fill: `Both;
grid [ main ] ~row: 0 ~column: 0 ~sticky: "nsew";
grid [ v ] ~row: 0 ~column: 1 ~sticky: "ns";
grid [ h ] ~row: 1 ~column: 0 ~sticky: "ew";
(* ================================================== )
( == Exception raised here ========================= )
Grid.column_configure f 0 ~weight: 1.;
Grid.row_configure f 0 ~weight: 1.;
( ================================================== *)
mainLoop ()
The text was updated successfully, but these errors were encountered:
Original bug ID: 1581
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Matt Gushee
Version: 3.06
OS: Linux (Debian 3.0)
Submission from: 216.241.35.41 (216.241.35.41)
LablTk specifies a type of float for the 'weight' argument to
Grid.column_configure
and Grid.row_configure, but Tk expects an integer. Therefore,
Grid.column_configure ... ~weight: 1.;
results in the following error:
Exception: Protocol.TkError "expected integer but got "1."".
Sample code is included at the bottom of this message.
This bug can be fixed by editing $OCAML_SRC/otherlibs/labltk/Widgets.src as
follows:
subtype option(rowcolumnconfigure) {
Minsize ["-minsize"; Units/int]
Weight ["-weight"; float] -> Weight ["-weight"; int] (* line 847 *)
Pad ["-pad"; Units/int]
}
(* ==================================================== )
( Sample code *)
open Tk;;
let win = openTk () in
let f = Frame.create win in
let main = Text.create f in
let v = Scrollbar.create f ~orient:
Vertical ~command: (Text.yview main) and h = Scrollbar.create f ~orient:
Horizontal ~command: (Text.xview main)in
Text.configure main ~yscrollcommand: (Scrollbar.set v)
~xscrollcommand: (Scrollbar.set h);
pack [ f ] ~expand: true ~fill: `Both;
grid [ main ] ~row: 0 ~column: 0 ~sticky: "nsew";
grid [ v ] ~row: 0 ~column: 1 ~sticky: "ns";
grid [ h ] ~row: 1 ~column: 0 ~sticky: "ew";
(* ================================================== )
( == Exception raised here ========================= )
Grid.column_configure f 0 ~weight: 1.;
Grid.row_configure f 0 ~weight: 1.;
( ================================================== *)
mainLoop ()
The text was updated successfully, but these errors were encountered: