How do I load a dialog "resource" in Python?

ChrisEykamp
edited October 28 in GX Developer
Hi,

I want to run the following snippet of Python code:


    window = gxapi.GXDGW.create("my_dialog")
    window.run_dialogue()


gxapi.GXDGW.create() creates a dialog object, and run_dialog() displays it.

The docs for create say:

        This method creates a Dialog window from a specified
        resource. The Resource is loaded into memory but not displayed.

The function takes a single parameter, name, which is a string, and is the "Name of the Window Resource to use".  I know this name could refer to a definition in a .grh file.
       
My question is where does the "resource" come from?  

I know one way to define a dialog, by compiling a .grh file, and it looks like if I were writing in GX, I could compile that resource into my program code, but I can find no mention of how to do this with Python.

Alternately, is there a better way to create a customized dialog using Python?

Thanks,

Chris
Tagged: