ScrollGroup crash [SOLVED]



  • On 04/08/2016 at 05:03, xxxxxxxx wrote:

    I'm currently using R17.048.
    Someone can confirm create a ScrollGroupBegin and call a LayoutFlushGroup into this group make C4D crash.
    If I only do LayoutFLushGroup no crash
    If I only do LayoutChanged no crash
    If I do LayoutFLushGroup  + LayoutChanged = crash

    import c4d
    class Dialog(c4d.gui.GeDialog) :
      
        def CreateLayout(self) :
      
            flags = c4d.SCROLLGROUP_HORIZ | c4d.SCROLLGROUP_VERT
            if self.ScrollGroupBegin(1001, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, flags, 100, 100) :
                self.AddButton(1000, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT,100,50 , "Make it crash")
                self.GroupEnd()  
      
            return True
      
        def Command(self, id, msg) :
            if id == 1000:
                self.LayoutFlushGroup(1001)
                self.LayoutChanged(1001)
            return True
      
    dlg = Dialog()
    dlg.Open(c4d.DLG_TYPE_ASYNC)
    


  • On 05/08/2016 at 08:01, xxxxxxxx wrote:

    Hello,

    it looks like the issue is related to the fact that the scroll group does not include a sub-group. Typically a scroll group includes another group. And this sub-group then hosts the actual elements (see this C++ example).

    So it will work if you include a sub-group and flush only this sub-group (instead of flushing the scroll group itself)

    Best wishes,
    Sebastian



  • On 12/08/2016 at 13:49, xxxxxxxx wrote:

    Sorry for the late reply. 
    Thanks you for your message :)

    All is working as you described (but maybe it can be good to have something similar written in the sdk for other peoples ^^)


Log in to reply