comp.lang.ada
 help / color / mirror / Atom feed
From: George J <ivanov_george@list.ru>
Subject: Re: Gtkada, Gtkada_Builder.Add_From_String problem.
Date: Mon, 8 Aug 2016 07:54:46 -0700 (PDT)
Date: 2016-08-08T07:54:46-07:00	[thread overview]
Message-ID: <995dcf3b-cc66-4179-8922-1a0b0d71d68a@googlegroups.com> (raw)
In-Reply-To: <noa59k$k6a$1@gioia.aioe.org>

понедельник, 8 августа 2016 г., 17:34:31 UTC+3 пользователь Dmitry A. Kazakov написал:
> 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

Yes,Dmitry!Thanks for reply!Error returned 0x440. I'm coming home now, so didn't look for what it means yet. And for " never use GLADE or XML " : i don't know how to make beautiful and understandeable GUI with Ada in other way. Could you suggest something?
Ok. I'll try with LF.
Thanks!


  reply	other threads:[~2016-08-08 14:54 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
2016-08-08 14:54   ` George J [this message]
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