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.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
> 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

Reply via email to