Author | Topic: events and definition of parents in objects | |
---|---|---|
Jorge L. Borlando | events and definition of parents in objects on Fri, 12 Oct 2018 09:08:29 -0300 Hi to all Could you help me solve this problem? As I have set the code, the loop-event processes all the events and I end up having undesired results as I show in the image to avoid the xbpDialog () executed in MySearch () and only the XbpSle () events are executed: - Should I start a new loop-event in MySearch() and filter the events that interest me? - how should I define the father in the XbpDialog () in MySearch () to avoid what I show in the image? Best reagrds oDlg := XbpDialog():new( AppDesktop(),, { 50, 50 }, { 750, 550 },, .F. ) oB := XbpBrowse():new( oDlg:drawingArea ) oXbp := XbpPushButton():New( oDlg:drawingArea ) oXbp:activate := { | m1 , m2, o | MySearch( m1, m2, o ) } oXbp := XbpPushButton():New( oDlg:drawingArea ) ......... Procedure MySearch( m1, m2, o ) oDla := obj:SetParent() drawingarea oDlg := XbpDialog():New( oDla, obj, { 100, 100 }, { 500, 80 } ) oSle := XbpSle():New( oDlg:drawingArea ) Return p1.png | |
Jorge L. Borlando | Re: events and definition of parents in objects on Fri, 12 Oct 2018 11:34:06 -0300 Hi to all I resolve with this code For i := 1 To Len( oDla:ChildList() ) oDla:ChildList()[i]:disable() Next i thanks to all Regards "Jorge L. Borlando" <jlborlando@yahoo.com.ar> wrote in message news:51743bb7$341b30df$65df5@news.alaska-software.com... > Hi to all > Could you help me solve this problem? > > As I have set the code, the loop-event processes all the events and I end > up > having undesired results as I show in the image > > to avoid the xbpDialog () executed in MySearch () and only the XbpSle () > events are executed: > - Should I start a new loop-event in MySearch() and filter the events that > interest me? > - how should I define the father in the XbpDialog () in MySearch () to > avoid > what I show in the image? > > Best reagrds > > oDlg := XbpDialog():new( AppDesktop(),, { 50, 50 }, > { 750, 550 },, .F. ) > oB := XbpBrowse():new( oDlg:drawingArea ) > oXbp := XbpPushButton():New( oDlg:drawingArea ) > oXbp:activate := { | m1 , m2, o | MySearch( m1, m2, o ) } > oXbp := XbpPushButton():New( oDlg:drawingArea ) > ......... > > Procedure MySearch( m1, m2, o ) > oDla := obj:SetParent() drawingarea > oDlg := XbpDialog():New( oDla, obj, { 100, 100 }, { > 500, 80 } ) > oSle := XbpSle():New( oDlg:drawingArea ) > Return > > | |
James Loughner | Re: events and definition of parents in objects on Fri, 19 Oct 2018 17:23:07 -0400 On 10/12/18 8:08 AM, Jorge L. Borlando wrote: > MySearch( m1, m2, o ) should be MySearch( m1, m2, obj ) where obj is the odlg Note also I see no create() methods here I assume you have some someplace????? | |
Jorge L. Borlando | Re: events and definition of parents in objects on Sat, 20 Oct 2018 18:10:50 -0300 Hi James yes! the corresponding :Create() are made I think I understood that I was wrongly establishing the father and the owner this is my code original Procedure MySearch( m1, m2, oXbpPushButton ) oDla := obj:SetParent() drawingarea of xbppushbutton oDlg := XbpDialog():New( oDla, oXbpPushButton, ...... this is my new code Procedure MySearch( m1, m2, oXbpPushButton ) oDla := obj:SetParent() drawingarea of xbppushbutton oDlg := oDla:SetParent() xbpdialog oDlg := XbpDialog():New( oDla, oDlg With this change, what has been shown in the image of the initial consultation has ceased to happen. Thank you very much for your input Best Regards "James Loughner" wrote in message news:547ac85$151a2e74$7d6c7@news.alaska-software.com... > On 10/12/18 8:08 AM, Jorge L. Borlando wrote: >> MySearch( m1, m2, o ) > should be MySearch( m1, m2, obj ) where obj is the odlg > > Note also I see no create() methods here I assume you have some > someplace????? |