From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Gtkada, Gtkada_Builder.Add_From_String problem.
Date: Mon, 8 Aug 2016 16:34:29 +0200
Date: 2016-08-08T16:34:29+02:00 [thread overview]
Message-ID: <noa59k$k6a$1@gioia.aioe.org> (raw)
In-Reply-To: 317c7c35-7260-4b0a-9615-b8616c87dfdc@googlegroups.com
On 2016-08-08 15:24, George J wrote:
> Hi all! Today i've got a problem with Add_From_String method of
> Gtkada_Builder. I have an xml (GLADE) file, which loading fine with
> Add_From_File. So i've copied text in String var, and Add_From_String
> doesn't work. May be I don't know some feature of this method?
>
> there are to examples i've made
> 1.
> use ASCII;
> UI_Str : String :=
> "<?xml version=""1.0"" encoding=""UTF-8""?>" &
> "<interface>" &
> "<!-- interface-requires gtk+ 3.0 -->" &
> "<object class=""GtkListStore"" id=""List_Store_Drives"">" &
> "<columns>" &
> "<!-- column-name nm -->" &
> "<column type=""gchararray""/>" &
> "<!-- column-name sz -->" &............
>
> 2.
> use ASCII;
>
> UI_Str : String :=
> "<?xml version=""1.0"" encoding=""UTF-8""?>" & LF & CR &
> "<interface>" & LF & CR &
> "<!-- interface-requires gtk+ 3.0 -->" & LF & CR &
> "<object class=""GtkListStore"" id=""List_Store_Drives"">" & LF & CR &
> "<columns>" & LF & CR &
> "<!-- column-name nm -->" & LF & CR &
> "<column type=""gchararray""/>" & LF & CR &
> "<!-- column-name sz -->" & LF & CR &...........
>
> Result:
> ..............
> if 0=Builder.Add_From_String(Buffer => UI.UI_Str,
> Error => Error'Access) then
> return;-- <--Comes here!!!!
> end if;
Error should contain some info, though I presume that the interpreter
does not understand LF-CR line terminator. Try LF instead, or none.
Better though, never ever use either GLADE or XML.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2016-08-08 14:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 13:24 Gtkada, Gtkada_Builder.Add_From_String problem George J
2016-08-08 14:34 ` Dmitry A. Kazakov [this message]
2016-08-08 14:54 ` George J
2016-08-08 16:01 ` Dmitry A. Kazakov
2016-08-08 16:42 ` George J
2016-08-08 19:08 ` Dmitry A. Kazakov
2016-08-08 22:41 ` olivermkellogg
2016-08-09 3:08 ` George J
2016-08-09 8:06 ` Dmitry A. Kazakov
2016-08-09 3:00 ` George J
2016-08-09 3:10 ` George J
2016-08-09 3:40 ` George J
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox