Windows inside window

Hello,
I am a beginner in development at Renesas, I hope you understand!
I have a window and inside it I have two other windows that will not be displayed initially, but when I click on the button1, window1 will be displayed, if I click on button2, window 2 will be displayed! How to make?

SSP 1.2.0

GUIX Studio 5.3.0.1


Thank you!

  • Hello Dalton,

    Upon displaying top-level widget, all of its children will also be visible. You can prevent that by calling gx_widget_detach for each of these sub-windows inside window event handler for GX_EVENT_SHOW event. To show the window, you should call gx_widget_attach. Alternatively you can use gx_widget_hide/show API's, which do not deactivate widget, but prevent it from being rendered on the screen.

    I recommend that you implement an event handler for the top-level window and create event cases for button clicks (i.e. GX_SIGNAL(BUTTON_ID, GX_EVENT_CLICKED) to manipulate status of the pop-up windows.

    Regards

  • In reply to Renesas Karol:

    Thanks for the help Karol!

    I did as you suggested, but it still did not work!

    When I use the gx_widget_desatach option, the software hangs and in Debug, it goes to the bsp_init_internal function! Apparently, it's resetting.

    Now, when I use gx_widget_hide, it just does not happen ...

    What am I doing wrong? How do I get more screenshots to see if I can help with anything?

    Thank you again!
  • In reply to Dalton:

    Hello Dalton,

    Did you call gx_studio_named_widget_create for all top-level widgets? If the widget is uninitialized, any call to GUIX API can potentially trigger hard fault.

    Regards
  • In reply to Renesas Karol:

    Hi,

    Yes, I made it for all top-level widgets on initialization.

    Regards
  • In reply to Dalton:

    Hello Dalton,

    I looked into this issue last week but I was unable to reproduce it. Can you provide a stack frame (top left-hand corner in "Debug" perspective) once the "crash" occurs?

    Regards
  • In reply to Renesas Karol:

    Hello Karol,

    Sorry for the delay! I had other problems to solve! Karol, how do I submit a new image here in reply? It's not possible? Because it would be clearer to show you where the program goes ...

    But apparently it is resetting because the program goes to the bsp_init function!

    Regards
  • In reply to Dalton:

    Hello Dalton,

    a screenshot of the call stack could be helpful in finding a solution.

    To add an image to your reply you have to select "Use rich formatting" option below the reply window:

    Then you will be able to drag-and-drop an image file from your file manager. You can alternatively choose Insert > Insert image/video/file from the top-side menu bar:

    Select "File upload" and browse your file system for the desired file. Hit ok and the file will be placed in the text field.

    It may be shown as an replacement icon. To preview your post choose Tools > Preview:

    Best regards,
    anper

  • In reply to anper:

    Hello amper,
    
    Thanks for the instructions! Really, I have to use this forum more!
    
     Here's the image ... I put a breakpoint when calling the function to detach the window and it showed the error using a very strange path! "C:\iotsoftware\Kallithea/ssp\src\framework\el\gx\gx_src\gxe_widget_detach.c". Obviously, this path was not found! But why does this occur?
    Best regards,

    Dalton
  • In reply to Dalton:

    Hi Dalton,

    By default the application uses prebuilt GUIX library, which was compiled on different machine, that's why you observe a path to an inexisting file. You may use GUIX Source component, GUIX will be then compiled on your machine.

    Could you check all pointers used in TelaMenuEventHandlers() (line 1338) and in show_window (line 2981) in guiapp_event_handlers.c? Moreover you can check Fault Status tab (Renesas View > Debug > Fault Status) and see if there are any flags checked.

    Regards,
    adboc
  • In reply to adboc:

    Hello adboc,
    
    I used the GUIX Source component, cleaned all the code and generated it again, look at the error message it gave ... What can it be?
    

    Thank you, Dalton
  • In reply to Dalton:

    Hi Dalton,

    The value of widget pointer (as you see in the Variables tab) is invalid, i.e. it doesn't point to correct GX_WIDGET structure. Could you check the value of the argument given to gx_widget_detach in your close_window function?

    Regards,
    adboc
  • In reply to adboc:

    Moreover, if you would like to see Express Logic source code, you should apply for a production/development license. This can be done in Synergy Gallery: synergygallery.renesas.com/ssp (large button near "Download").