diff --git a/examples/src/main/scala/scala/swing/examples/tutorials/components/IconDemoApp.scala b/examples/src/main/scala/scala/swing/examples/tutorials/components/IconDemoApp.scala index 47ca7803..191d6a36 100644 --- a/examples/src/main/scala/scala/swing/examples/tutorials/components/IconDemoApp.scala +++ b/examples/src/main/scala/scala/swing/examples/tutorials/components/IconDemoApp.scala @@ -123,8 +123,8 @@ class IconDemoApp extends MainFrame { }.toList } - f.onSuccess{ - case thumbs:List[Option[ThumbnailAction]] => + f.foreach { + thumbs:List[Option[ThumbnailAction]] => buttonBar.contents.dropRight(1) thumbs.foreach{ thumbAction => { thumbAction.foreach { ta => @@ -132,7 +132,6 @@ class IconDemoApp extends MainFrame { } }} buttonBar.contents += Swing.Glue - }