13
13
from FreeSimpleGUI import Element
14
14
from FreeSimpleGUI import LOOK_AND_FEEL_TABLE
15
15
from FreeSimpleGUI import PackFormIntoFrame
16
+ from FreeSimpleGUI import popup_error
16
17
from FreeSimpleGUI import popup_error_with_traceback
17
- from FreeSimpleGUI import PopupError
18
18
from FreeSimpleGUI import ToolTip
19
19
from FreeSimpleGUI ._utils import _error_popup_with_traceback
20
20
from FreeSimpleGUI .window import Window
@@ -217,7 +217,7 @@ def layout(self, rows):
217
217
try :
218
218
iter (row )
219
219
except TypeError :
220
- PopupError (
220
+ popup_error (
221
221
'Error creating Tab layout' ,
222
222
'Your row is not an iterable (e.g. a list)' ,
223
223
f'Instead of a list, the type found was { type (row )} ' ,
@@ -453,7 +453,7 @@ def add_row(self, *args):
453
453
# ------------------------- Add the elements to a row ------------------------- #
454
454
for i , element in enumerate (args ): # Loop through list of elements and add them to the row
455
455
if type (element ) is list :
456
- PopupError (
456
+ popup_error (
457
457
'Error creating Tab layout' ,
458
458
'Layout has a LIST instead of an ELEMENT' ,
459
459
'This sometimes means you have a badly placed ]' ,
@@ -465,7 +465,7 @@ def add_row(self, *args):
465
465
)
466
466
continue
467
467
elif callable (element ) and not isinstance (element , Element ):
468
- PopupError (
468
+ popup_error (
469
469
'Error creating Tab layout' ,
470
470
'Layout has a FUNCTION instead of an ELEMENT' ,
471
471
'This likely means you are missing () from your layout' ,
@@ -481,7 +481,7 @@ def add_row(self, *args):
481
481
'*** YOU ARE ATTEMPTING TO REUSE AN ELEMENT IN YOUR LAYOUT! Once placed in a layout, an element cannot be used in another layout. ***' ,
482
482
UserWarning ,
483
483
)
484
- PopupError (
484
+ popup_error (
485
485
'Error creating Tab layout' ,
486
486
'The layout specified has already been used' ,
487
487
'You MUST start witha "clean", unused layout every time you create a window' ,
@@ -516,7 +516,7 @@ def layout(self, rows):
516
516
try :
517
517
iter (row )
518
518
except TypeError :
519
- PopupError (
519
+ popup_error (
520
520
'Error creating Tab layout' ,
521
521
'Your row is not an iterable (e.g. a list)' ,
522
522
f'Instead of a list, the type found was { type (row )} ' ,
0 commit comments