Opened 4 years ago

Closed 3 years ago

Last modified 21 months ago

#468 closed defect (fixed)

Read of setting from windows registry

Reported by: Maxim Reznik Owned by: Maxim Reznik
Priority: major Milestone: 18.0
Component: Matreshka - League Version: 0.7.0
Keywords: Cc:


This code doesn't work under windows:

with Ada.Wide_Wide_Text_IO;

with League.Application;
with League.Settings;
with League.Strings;
with League.String_Vectors;
with League.Holders;

procedure Main is

   Args : League.String_Vectors.Universal_String_Vector :=
   function "+"
    (Item : Wide_Wide_String) return League.Strings.Universal_String
       renames League.Strings.To_Universal_String;

   --  Set organization name and domain, application name.

   League.Application.Set_Organization_Name (+"Ada Forge");
   League.Application.Set_Organization_Domain (+"");
   League.Application.Set_Application_Name (+"Ada Servlet Server");

      S : League.Settings.Settings;
      V : League.Holders.Holder;

      --  Setting value

      V := League.Holders.To_Holder (Args.Element (2));
      S.Set_Value (Args.Element (1), V);

      --  Getting value

         (S.Value (Args.Element (1))).To_Wide_Wide_String);
end Main;
raised CONSTRAINT_ERROR : invalid type of value

I tried with such arguments:

  • '/detabase/name' 'value'
  • 'name' 'value'

Change History (3)

comment:1 by Maxim Reznik, 3 years ago

Owner: set to Maxim Reznik
Resolution: fixed
Status: newclosed

In 5769:

Replace whole Holder to avoid raising

CONSTRAINT_ERROR : invalid type of value

Fixes #468 - reading from windows registry

comment:2 by Maxim Reznik, 3 years ago

In 5770:

Avoid convertion unsigned int to address

That's incorrect on windows 64. Refs #468

comment:3 by vadim.godunko, 21 months ago


Milestone renamed

Note: See TracTickets for help on using tickets.