X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fsamples%2Fsample-form_demo.adb;h=ed84526feae2c057dd96ac6357cb833f34d0e266;hp=df138139737621562314aa8a47826472d685f4d1;hb=fd52bfa49753d67673ba8d7aef9239f5b16c1ad0;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;ds=sidebyside diff --git a/Ada95/samples/sample-form_demo.adb b/Ada95/samples/sample-form_demo.adb index df138139..ed84526f 100644 --- a/Ada95/samples/sample-form_demo.adb +++ b/Ada95/samples/sample-form_demo.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998,2004 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -35,8 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control --- $Revision: 1.13 $ --- $Date: 2004/08/21 21:37:00 $ +-- $Revision: 1.16 $ +-- $Date: 2011/03/23 00:44:12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; @@ -78,7 +78,7 @@ package body Sample.Form_Demo is procedure Demo is - Mft : My_Data := (Ch => 'X'); + Mft : constant My_Data := (Ch => 'X'); FA : Field_Array_Access := new Field_Array' (Make (0, 14, "Sample Entry Form"), @@ -108,16 +108,16 @@ package body Sample.Form_Demo is Notepad ("FORM-PAD00"); Default_Labels; - Set_Field_Type (FA (6), Enum_Field); - Set_Field_Type (FA (7), I_F); - Set_Field_Type (FA (8), Mft); + Set_Field_Type (FA.all (6), Enum_Field); + Set_Field_Type (FA.all (7), I_F); + Set_Field_Type (FA.all (8), Mft); F1 := new User_Data'(Data => 4711); - Fld_U.Set_User_Data (FA (1), F1); + Fld_U.Set_User_Data (FA.all (1), F1); Fh.Drive_Me (Frm); - Fld_U.Get_User_Data (FA (1), F2); + Fld_U.Get_User_Data (FA.all (1), F2); pragma Assert (F1 = F2); pragma Assert (F1.Data = F2.Data);