5959def create_run_vuegen (is_dir , config_path , report_type , run_streamlit ):
6060 def inner ():
6161 args = ["vuegen" ]
62+ print (f"{ is_dir .get () = } " )
6263 if is_dir .get ():
6364 args .append ("--directory" )
6465 else :
6566 args .append ("--config" )
6667 args .append (config_path .get ())
6768 args .append ("--report_type" )
6869 args .append (report_type .get ())
70+ print (f"{ run_streamlit .get () = } " )
6971 if run_streamlit .get ():
7072 args .append ("--streamlit_autorun" )
7173 print ("args:" , args )
@@ -80,9 +82,9 @@ def optionmenu_callback(choice):
8082 print ("optionmenu dropdown clicked:" , choice )
8183
8284
83- def radiobutton_event (value ):
85+ def radiobutton_event (value , name = "radiobutton" ):
8486 def radio_button_callback ():
85- print ("radiobutton toggled, current value:" , value .get ())
87+ print (f" { name } toggled, current value:" , value .get ())
8688
8789 return radio_button_callback
8890
@@ -100,22 +102,22 @@ def radio_button_callback():
100102 text = "Add path to config file or directory. Select radio button accordingly" ,
101103)
102104ctk_label_config .grid (row = 0 , column = 0 , columnspan = 2 , padx = 20 , pady = 20 )
103- is_dir = tk .IntVar (value = 1 )
104- callback_radio_config = radiobutton_event (is_dir )
105+ is_dir = tk .BooleanVar (value = True )
106+ callback_radio_config = radiobutton_event (is_dir , name = "is_dir" )
105107ctk_radio_config_0 = customtkinter .CTkRadioButton (
106108 app ,
107109 text = "Use config" ,
108110 command = callback_radio_config ,
109111 variable = is_dir ,
110- value = 0 ,
112+ value = False ,
111113)
112114ctk_radio_config_0 .grid (row = 1 , column = 0 , padx = 20 , pady = 2 )
113115ctk_radio_config_1 = customtkinter .CTkRadioButton (
114116 app ,
115117 text = "Use dir" ,
116118 command = callback_radio_config ,
117119 variable = is_dir ,
118- value = 1 ,
120+ value = True ,
119121)
120122ctk_radio_config_1 .grid (row = 1 , column = 1 , padx = 20 , pady = 2 )
121123
@@ -150,20 +152,20 @@ def radio_button_callback():
150152
151153##########################################################################################
152154# Run Streamlit radio button
153- run_streamlit = tk .IntVar (value = 1 )
154- callback_radio_st_run = radiobutton_event (run_streamlit )
155+ run_streamlit = tk .BooleanVar (value = True )
156+ callback_radio_st_run = radiobutton_event (run_streamlit , name = "run_streamlit" )
155157ctk_radio_st_autorun_1 = customtkinter .CTkRadioButton (
156158 app ,
157159 text = "autorun streamlit" ,
158- value = 1 ,
160+ value = True ,
159161 variable = run_streamlit ,
160162 command = callback_radio_st_run ,
161163)
162164ctk_radio_st_autorun_1 .grid (row = 5 , column = 0 , padx = 20 , pady = 20 )
163165ctk_radio_st_autorun_0 = customtkinter .CTkRadioButton (
164166 app ,
165167 text = "skip starting streamlit" ,
166- value = 0 ,
168+ value = False ,
167169 variable = run_streamlit ,
168170 command = callback_radio_st_run ,
169171)
0 commit comments