Index: src/natools-cron.adb ================================================================== --- src/natools-cron.adb +++ src/natools-cron.adb @@ -211,11 +211,11 @@ Append (Event_List (Previous.Update.Data.all), Callback); end if; elsif Callback.Query.Data.all in Event_List then - Append (Event_List (Callback.Update.Data.all), Previous); + Prepend (Event_List (Callback.Update.Data.all), Previous); Map.Replace_Element (Position, Callback); else Map.Replace_Element (Position, Create_Event_List (Previous, Callback)); @@ -390,10 +390,18 @@ Ref : in Callback_Refs.Reference) is begin Self.List.Append (Ref); end Append; + + procedure Prepend + (Self : in out Event_List; + Ref : in Callback_Refs.Reference) is + begin + Self.List.Prepend (Ref); + end Prepend; + procedure Remove (Self : in out Event_List; Ref : in Callback_Refs.Reference; Removed : out Boolean) Index: src/natools-cron.ads ================================================================== --- src/natools-cron.ads +++ src/natools-cron.ads @@ -118,10 +118,15 @@ procedure Append (Self : in out Event_List; Ref : in Callback_Refs.Reference); -- Append Ref at the end of Self.List + procedure Prepend + (Self : in out Event_List; + Ref : in Callback_Refs.Reference); + -- Prepend Ref at the beginning of Self.List + procedure Remove (Self : in out Event_List; Ref : in Callback_Refs.Reference; Removed : out Boolean); -- Remove Ref from Self.List, through a linear search