Re: [Factor-talk] Radio-buttons not working
You probably want to use unparent to remove the current children from the viewport instead of just changing the children slot (it does a few bookkeeping things). Also, viewports seem to require the children slot to have at least one child in it or they throw an exception in layout. It's maybe not as nice as you'd like, but this will work: a scroller dup gadget. : replace-children ( viewport newchild -- ) add-gadget children but-last [ unparent ] each ; dup viewport foo label replace-children dup viewport a replace-children We should fix the bug to make viewports allow zero children so you don't have to add then remove others, but this works fine I think. Best, John. On Thu, Dec 27, 2012 at 9:37 AM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I just made the following scroller containing two radio-buttons: SYMBOL: model f model model set : a ( -- test ) model get { True False } enum radio-buttons { 4 4 } border ; a scroller dup gadget. It works fine when I click on the buttons. Although, If I try to change the viewport of the scroller (even to the exact same thing), the buttons suddently stop working: dup viewport a 1vector children relayout What did I do wrong ? Thanks in advance, Samuel -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Parallel-copy branch
Nice bug report, love to have your help on these corner cases, thanks! Doug should talk to Slava about this one I think and see what suggestions he has. On Wed, Dec 26, 2012 at 4:37 PM, Alex Vondrak ajvond...@gmail.com wrote: Just forwarding this along to the list, because it probably gets better visibility than an ancient github issue: https://github.com/slavapestov/factor/issues/22#commit-ref-fdc2c16 Happy holidays, --Alex Vondrak -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Radio-buttons not working
I see. Thank you! Le jeudi 27 décembre 2012, Jon Harper a écrit : As stated in the documentation of gadget, you can't use the children slot directly: children - a vector of child gadgets. Do not modify this vector directly, instead use add-gadget, add-gadgets, unparent or clear-gadget. In your case, replacing a 1vector children relayout with [ clear-gadget ] [ a add-gadget ] bi solves the problem. In your particular case, the parent of the child gadget was not correctly set to the viewport, which breaks clicks on buttons. Also, the initialization code (see graft*) of the child gadget was not run, so models were not properly activated and linked Cheers, Jon Jon On Thu, Dec 27, 2012 at 6:37 PM, Samuel Proulx proulxsam...@gmail.comjavascript:_e({}, 'cvml', 'proulxsam...@gmail.com'); wrote: Hi, I just made the following scroller containing two radio-buttons: SYMBOL: model f model model set : a ( -- test ) model get { True False } enum radio-buttons { 4 4 } border ; a scroller dup gadget. It works fine when I click on the buttons. Although, If I try to change the viewport of the scroller (even to the exact same thing), the buttons suddently stop working: dup viewport a 1vector children relayout What did I do wrong ? Thanks in advance, Samuel -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net javascript:_e({}, 'cvml', 'Factor-talk@lists.sourceforge.net'); https://lists.sourceforge.net/lists/listinfo/factor-talk -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk