From f9e453e3d456514066e8ecbed9fbac93a588a0d0 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Tue, 21 Jan 2025 00:53:56 +1300 Subject: Using the type method is now more consistent --- src/fltk-file_choosers.adb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/fltk-file_choosers.adb') diff --git a/src/fltk-file_choosers.adb b/src/fltk-file_choosers.adb index 3eee496..5662f8a 100644 --- a/src/fltk-file_choosers.adb +++ b/src/fltk-file_choosers.adb @@ -1118,7 +1118,7 @@ package body FLTK.File_Choosers is end Set_Text_Size; - function Get_Chooser_Kind + function Get_Kind (This : in File_Chooser) return Chooser_Kind is @@ -1127,16 +1127,18 @@ package body FLTK.File_Choosers is pragma Assert (Ret in 0 .. Chooser_Kind'Pos (Chooser_Kind'Last)); return Chooser_Kind'Val (Ret); exception - when Chk.Assertion_Error => raise Internal_FLTK_Error; - end Get_Chooser_Kind; + when Chk.Assertion_Error => raise Internal_FLTK_Error with + "Fl_File_Chooser::type returned unexpected int value of " & + Interfaces.C.int'Image (Ret); + end Get_Kind; - procedure Set_Chooser_Kind + procedure Set_Kind (This : in out File_Chooser; Kind : in Chooser_Kind) is begin fl_file_chooser_set_type (This.Void_Ptr, Chooser_Kind'Pos (Kind)); - end Set_Chooser_Kind; + end Set_Kind; -- cgit