From c24bcd6f879ecc6ff437ac25d288a6f682c47206 Mon Sep 17 00:00:00 2001 From: Daniel Gonzalez Date: Thu, 11 Oct 2012 13:22:00 +0000 Subject: [PATCH] GUIPlugPackage Script Fix --- .../toolsbbtk/bbs/appli/GUIPlugPackage.bbg | 89 +++++++++++++++++-- .../toolsbbtk/bbs/appli/GUIPlugPackage.bbs | 35 +++++++- 2 files changed, 112 insertions(+), 12 deletions(-) diff --git a/packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbg b/packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbg index 922524f..8637286 100644 --- a/packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbg +++ b/packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbg @@ -5,10 +5,10 @@ APP_START CATEGORY:Core Script -DESCRIPTION:Plug Package script -AUTHOR:Daniel F Gonzalez +DESCRIPTION:Plug Package Script +AUTHOR:Daniel Gonzalez COMPLEXBOX:FALSE -BOXES:7 +BOXES:10 BOX wx:DirectorySelector:directorySelect ISEXEC:TRUE @@ -25,7 +25,11 @@ ISEXEC:TRUE -86.305460:-39.244838:-900.000000 -28.745460:-49.244838:-900.000000 PORT +WinHeight:"200" +PORT WinTitle:"Plug Package" +PORT +WinWidth:"500" FIN_BOX BOX wx:OutputText:title @@ -38,8 +42,8 @@ FIN_BOX BOX std:ExecSystemCommand:execution ISEXEC:FALSE --7.017895:-53.162212:-900.000000 -64.157105:-63.162212:-900.000000 +7.470713:-54.422091:-900.000000 +78.645713:-64.422091:-900.000000 FIN_BOX BOX wx:CommandButton:plugButton @@ -47,15 +51,15 @@ ISEXEC:FALSE -15.909874:12.084440:-900.000000 55.265126:2.084440:-900.000000 PORT -In:"print $lineToExecute.Out$; exec execution;" +In:"print $lineToExecute.Out$;" PORT Label:"Plug it!" FIN_BOX BOX std:ConcatStrings:lineToExecute ISEXEC:FALSE --4.345134:-26.348428:-900.000000 -66.829866:-36.348428:-900.000000 +15.812930:-18.789154:-900.000000 +86.987930:-28.789154:-900.000000 PORT In1:"bbPlugPackage " FIN_BOX @@ -65,7 +69,53 @@ ISEXEC:FALSE -64.000751:12.249860:-900.000000 -18.425751:2.249860:-900.000000 FIN_BOX -CONNECTIONS:6 +BOX +std:StringSelect:resultString +ISEXEC:FALSE +-2.976464:-81.624410:-900.000000 +42.598536:-91.624410:-900.000000 +PORT +In0:"Packaged Successfully Plugged" +PORT +In1:"An error occurred while plugging the package. Please check the command line." +PORT +In2:"An error 2 occurred while plugging the package. Please check the command line." +PORT +In3:"An error 3 occurred while plugging the package. Please check the command line." +PORT +In4:"An error 4 occurred while plugging the package. Please check the command line." +PORT +In5:"An error 5 occurred while plugging the package. Please check the command line." +PORT +In6:"An error 6 occurred while plugging the package. Please check the command line." +PORT +In7:"An error 7 occurred while plugging the package. Please check the command line." +PORT +In8:"An error 8 occurred while plugging the package. Please check the command line." +PORT +In9:"An error 9 occurred while plugging the package. Please check the command line." +FIN_BOX +BOX +wx:LayoutLine:resultDialog +ISEXEC:FALSE +-45.213908:-131.484121:-900.000000 +12.346092:-141.484121:-900.000000 +PORT +WinDialog:"true" +PORT +WinHeight:"100" +PORT +WinTitle:"Result" +PORT +WinWidth:"400" +FIN_BOX +BOX +wx:OutputText:textLabel +ISEXEC:FALSE +-21.213212:-107.294445:-900.000000 +24.361788:-117.294445:-900.000000 +FIN_BOX +CONNECTIONS:13 CONNECTION title:Widget:Layout:Widget1 NumberOfControlPoints:0 @@ -84,4 +134,25 @@ NumberOfControlPoints:0 CONNECTION pathText:Widget:Layout:Widget2 NumberOfControlPoints:0 +CONNECTION +plugButton:BoxChange:execution:BoxExecute +NumberOfControlPoints:0 +CONNECTION +textLabel:Widget:resultDialog:Widget1 +NumberOfControlPoints:0 +CONNECTION +plugButton:BoxChange:resultDialog:BoxExecute +NumberOfControlPoints:0 +CONNECTION +plugButton:BoxChange:textLabel:BoxExecute +NumberOfControlPoints:0 +CONNECTION +execution:Return:resultString:In +NumberOfControlPoints:0 +CONNECTION +resultString:Out:textLabel:In +NumberOfControlPoints:0 +CONNECTION +plugButton:BoxChange:resultString:BoxExecute +NumberOfControlPoints:0 APP_END diff --git a/packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbs b/packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbs index 4fb5a19..a6a7777 100644 --- a/packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbs +++ b/packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbs @@ -11,8 +11,8 @@ include itkvtk include wx include std -author "Daniel F Gonzalez" -description "Plug Package script" +author "Daniel Gonzalez" +description "Plug Package Script" category "Core Script" new DirectorySelector directorySelect @@ -20,7 +20,9 @@ new DirectorySelector directorySelect set directorySelect.Title "Select Package" new LayoutLine Layout + set Layout.WinHeight "200" set Layout.WinTitle "Plug Package" + set Layout.WinWidth "500" new OutputText title set title.In "Plug package directory: " @@ -28,7 +30,7 @@ new OutputText title new ExecSystemCommand execution new CommandButton plugButton - set plugButton.In "print $lineToExecute.Out$; exec execution;" + set plugButton.In "print $lineToExecute.Out$;" set plugButton.Label "Plug it!" new ConcatStrings lineToExecute @@ -36,6 +38,26 @@ new ConcatStrings lineToExecute new OutputText pathText +new StringSelect resultString + set resultString.In0 "Packaged Successfully Plugged" + set resultString.In1 "An error occurred while plugging the package. Please check the command line." + set resultString.In2 "An error 2 occurred while plugging the package. Please check the command line." + set resultString.In3 "An error 3 occurred while plugging the package. Please check the command line." + set resultString.In4 "An error 4 occurred while plugging the package. Please check the command line." + set resultString.In5 "An error 5 occurred while plugging the package. Please check the command line." + set resultString.In6 "An error 6 occurred while plugging the package. Please check the command line." + set resultString.In7 "An error 7 occurred while plugging the package. Please check the command line." + set resultString.In8 "An error 8 occurred while plugging the package. Please check the command line." + set resultString.In9 "An error 9 occurred while plugging the package. Please check the command line." + +new LayoutLine resultDialog + set resultDialog.WinDialog "true" + set resultDialog.WinHeight "100" + set resultDialog.WinTitle "Result" + set resultDialog.WinWidth "400" + +new OutputText textLabel + connect title.Widget Layout.Widget1 connect lineToExecute.Out execution.In @@ -43,6 +65,13 @@ connect plugButton.Widget Layout.Widget3 connect directorySelect.Out lineToExecute.In2 connect directorySelect.Out pathText.In connect pathText.Widget Layout.Widget2 +connect plugButton.BoxChange execution.BoxExecute +connect textLabel.Widget resultDialog.Widget1 +connect plugButton.BoxChange resultDialog.BoxExecute +connect plugButton.BoxChange textLabel.BoxExecute +connect execution.Return resultString.In +connect resultString.Out textLabel.In +connect plugButton.BoxChange resultString.BoxExecute exec directorySelect exec Layout -- 2.45.1