Skip to content

Commit cb0a79c

Browse files
committed
Add AIKit component check for AI button visibility
1 parent e9f6749 commit cb0a79c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Project/Sources/Methods/UI_ManageAIbutton.4dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Else
1414
End if
1515

1616

17-
$visible:=(oForm.aiKey#"")
17+
$visible:=(oForm.aiKey#"") && (Bool:C1537(Storage:C1525.aiKey.componentExists))
1818
OBJECT SET VISIBLE:C603(*; "btnAI"; $visible) // toolbar & sidebar
1919

2020
OBJECT SET VISIBLE:C603(*; "Separator_AI"; $visible) // sidebar

Project/Sources/Methods/WP SetAIKey.4dm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ If ($key#"")
99
End use
1010
End if
1111

12+
ARRAY TEXT:C222($components; 0x0000)
13+
COMPONENT LIST:C1001($components)
14+
Use ($aiKey)
15+
$aiKey.componentExists:=(Find in array:C230($components; "4D AIKit")>0)
16+
End use
17+
1218
Use (Storage:C1525)
1319
If ($key#"")
1420
Storage:C1525.aiKey:=$aiKey

0 commit comments

Comments
 (0)