cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Problems with window_create on XUI doc

jbaklayan
1-Newbie

Problems with window_create on XUI doc

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 3

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
>

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.

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.

Top Tags