Skip to main content
1-Visitor
April 16, 2013
Question

Problems with window_create on XUI doc

  • April 16, 2013
  • 3 replies
  • 1038 views

For some reason, when I open an XUI XML window, it doesn't always work. I have code that does the following:


Create XML file


local xuidoc = doc_open(xmlfile)


xuiwin = window_create('xui', 0x10, xuidoc)


The window_create will sometimes return -1 and not create the window. Do I need to set focus or something. Not sure what I am doing wrong. The XML file is one I create on the fly and save before I try and open it. It is a docked XML dialog. Any suggestions would be greatly appreciated.


BTW this is version 5.3 I am using.


Thanks.


John

    3 replies

    1-Visitor
    April 17, 2013
    Test xuidoc < 0 before window_create(). Possibly it's the doc_open()
    failing, not the window_create.


    On Tue, Apr 16, 2013 at 3:55 PM, John Baklayan
    <john.p.baklayan@boeing.com>wrote:

    > For some reason, when I open an XUI XML window, it doesn't always work. I
    > have code that does the following:
    >
    > Create XML file
    >
    > local xuidoc = doc_open(xmlfile)
    >
    > xuiwin = window_create('xui', 0x10, xuidoc)
    >
    > The window_create will sometimes return -1 and not create the window. Do
    > I need to set focus or something. Not sure what I am doing wrong. The XML
    > file is one I create on the fly and save before I try and open it. It is a
    > docked XML dialog. Any suggestions would be greatly appreciated. Thanks.
    >
    > John
    >
    jbaklayan1-VisitorAuthor
    1-Visitor
    April 17, 2013

    I tried that. The doc_open was ok. It was returning 41 in both cases when it would open normally or when it would fail and window_create would return -1.

    jbaklayan1-VisitorAuthor
    1-Visitor
    April 19, 2013

    The problem seems to be with dockable dialogs. If I open up more than one dockable dialog in a row, it seems to have issues. Anyone else experience problems opening up multiple dockable dialogs. It seems to be kind of flakey. Thx in advance for comments.