Results 1 to 2 of 2

Thread: About using xml files to build windows

  1. #1

    Default About using xml files to build windows

    Hi,

    I tried to build windows from an xml file, as the example provided. But there is some "strange things" happening :

    -If you miss some attributes, clanlib crash instead of throwing an exception. Is it a "normal" behavior ?

    -Required attributes are : id, anchor_tl anchor_br dist_tl_x dist_tl_y dist_br_x dist_br_y and geom. But the geom attribute introduce redundancy. I mean, if you do not use a layout, clanlib crash. If you use a layout, as soon as the window is updated, your components move at the right place (should need a "click" to the window in practice). It would be good to do one of those things : remove geom / enable not using layout.
    As i can remember, if you do not set a layout, clanlib crash.

    -Could you add something like
    Code:
    			if (e.has_attribute("password_mode"))
    				co->set_password_mode(e.get_attribute_bool("password_mode", false));
    in the (tag == "lineedit") test in CL_GUIXMLLoaderVersion_1_0::load(CL_DomElement &element, CL_GUIComponent *parent) to enable updating the "set_password_mode" from the gui file [It would be good to be able to put a password field as a password field directly in the gui file instead of setting such things in the app src] ?
    (I can make a patch if you want...)

    -Could you add a field "dialog_title" in the XMLLoader to update window's title from the xml file? (Because use a resource file which is located far away from the gui definition isn't really a 'good' way to do it [although it works].
    (I can make the update and give you a patch, if you wan't)


    (Please excuse my poor english :/ )

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    585

    Default

    "If you miss some attributes, clanlib crash instead of throwing an exception. Is it a "normal" behavior ?"

    Sounds like a bug.

    "-Required attributes are : id, anchor_tl anchor_br dist_tl_x dist_tl_y dist_br_x dist_br_y and geom. But the geom attribute introduce redundancy. I mean, if you do not use a layout, clanlib crash. If you use a layout, as soon as the window is updated, your components move at the right place (should need a "click" to the window in practice). It would be good to do one of those things : remove geom / enable not using layout.
    As i can remember, if you do not set a layout, clanlib crash."

    Feel free to enhance this.

    "Could you add a..."

    Sounds like two good additions. If you send a patch, I'm sure it will be applied.

    To be honest, I don't think XML defintions of components in clanGUI is widely used, and therefore probably contains bugs. I think Digital Artist (http://www.da-gfx.com/) is the application that drove the development of this feature. Note that the GUIEditor tool in Utilities folder is closely related to all this, so if you do any major changes, it would be wise to test to see if it still works with the editor.

Similar Threads

  1. Windows app crashing on Maximize (Windows XP)
    By BigBMan in forum Proton SDK
    Replies: 8
    Last Post: 03-17-2011, 01:38 AM
  2. creating exe files
    By attle in forum Novashell Game Creation System
    Replies: 2
    Last Post: 02-04-2008, 09:36 AM
  3. Replies: 2
    Last Post: 10-31-2007, 02:38 PM
  4. Latest windows build corrupted?
    By whisperstorm in forum Novashell Game Creation System
    Replies: 1
    Last Post: 03-03-2007, 12:22 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •