Skip to content

Commit

Permalink
ACI0104993
Browse files Browse the repository at this point in the history
  • Loading branch information
vdelachaux committed Aug 20, 2024
1 parent 82d07c7 commit a55f392
Show file tree
Hide file tree
Showing 10 changed files with 580 additions and 1,076 deletions.
Original file line number Diff line number Diff line change
@@ -1,81 +1 @@
// ----------------------------------------------------
// Object method : BALLOON_COMMON.font.alternate.back.color - (4D Report)
// ID[7AFEBB5AB5F5444AA83F728E4842B6A9]
// Created #27-10-2014 by Vincent de Lachaux
// ----------------------------------------------------
// Declarations
C_BOOLEAN:C305($Boo_croosReport)
C_LONGINT:C283($Lon_area; $Lon_color; $Lon_column; $Lon_formEvent; $Lon_row)
C_POINTER:C301($Ptr_caller; $Ptr_me)
C_TEXT:C284($kTxt_key)
C_OBJECT:C1216($Obj_caller)

// ----------------------------------------------------
// Initialisations
$Lon_formEvent:=Form event code:C388

//$Txt_me:=OBJECT Get name(Object current)
$Ptr_me:=OBJECT Get pointer:C1124(Object current:K67:2)
$Ptr_caller:=OBJECT Get pointer:C1124(Object named:K67:5; "caller")

$kTxt_key:="backColor"

$Obj_caller:=JSON Parse:C1218($Ptr_caller->)

If (OB Is defined:C1231($Obj_caller))

If (OB Is defined:C1231($Obj_caller; "area"))

//#ACI0095813
$Boo_croosReport:=(OB Get:C1224($Obj_caller; "reportType"; Is longint:K8:6)=qr cross report:K14902:2)
$Lon_area:=report_Get_target($Obj_caller; ->$Lon_column; ->$Lon_row; $Boo_croosReport)

// ----------------------------------------------------
Case of

//______________________________________________________
: ($Lon_formEvent=On Data Change:K2:15)

$Lon_color:=$Ptr_me->

If ($Lon_color#-1) //disparate

//#ACI0093540
//$Lon_color:=Choose($Lon_color=0;Background color none;$Lon_color)
$Lon_color:=Choose:C955($Lon_color=0; 0x00FFFFFF; $Lon_color)

If ($Lon_color#OB Get:C1224($Obj_caller; $kTxt_key; Is longint:K8:6))

//keep value
OB SET:C1220($Obj_caller; \
$kTxt_key; $Lon_color)

$Ptr_caller->:=JSON Stringify:C1217($Obj_caller)

//update selection
QR_SET_TEXT_PROPERTY($Lon_area; qr alternate background color:K14904:9; String:C10($Lon_color); $Lon_column; $Lon_row)

If ($Boo_croosReport)

If ($Lon_column=2)\
| ($Lon_column=3) //apply to line

$Lon_column:=$Lon_column+(3-$Lon_column)+(2-$Lon_column)
QR_SET_TEXT_PROPERTY($Lon_area; qr alternate background color:K14904:9; String:C10($Lon_color); $Lon_column; $Lon_row)

End if
End if
End if
End if

ob_area.modified:=True:C214

//______________________________________________________
Else

ASSERT:C1129(False:C215; "Form event activated unnecessary ("+String:C10($Lon_formEvent)+")")

//______________________________________________________
End case
End if
End if
nqr_SET_BACK_COLOR(qr alternate background color:K14904:9)
Original file line number Diff line number Diff line change
@@ -1,82 +1 @@
// ----------------------------------------------------
// Object method : BALLOON_COMMON.font.back.color - (4D Report)
// ID[7AFEBB5AB5F5444AA83F728E4842B6A9]
// Created #27-10-2014 by Vincent de Lachaux
// ----------------------------------------------------
// Declarations
C_BOOLEAN:C305($Boo_croosReport)
C_LONGINT:C283($Lon_area; $Lon_color; $Lon_column; $Lon_formEvent; $Lon_row)
C_POINTER:C301($Ptr_caller; $Ptr_me)
C_TEXT:C284($kTxt_key)
C_OBJECT:C1216($Obj_caller)

// ----------------------------------------------------
// Initialisations
$Lon_formEvent:=Form event code:C388

//$Txt_me:=OBJECT Get name(Object current)
$Ptr_me:=OBJECT Get pointer:C1124(Object current:K67:2)
$Ptr_caller:=OBJECT Get pointer:C1124(Object named:K67:5; "caller")

$kTxt_key:="backColor"

$Obj_caller:=JSON Parse:C1218($Ptr_caller->)

If (OB Is defined:C1231($Obj_caller))

If (OB Is defined:C1231($Obj_caller; "area"))

//#ACI0095813
//$Lon_area:=report_Get_target ($Obj_caller;->$Lon_column;->$Lon_row)
$Boo_croosReport:=(OB Get:C1224($Obj_caller; "reportType"; Is longint:K8:6)=qr cross report:K14902:2)
$Lon_area:=report_Get_target($Obj_caller; ->$Lon_column; ->$Lon_row; $Boo_croosReport)

// ----------------------------------------------------
Case of

//______________________________________________________
: ($Lon_formEvent=On Data Change:K2:15)

$Lon_color:=$Ptr_me->

If ($Lon_color#-1) //disparate

//#ACI0093540
//$Lon_color:=Choose($Lon_color=0;Background color none;$Lon_color)
$Lon_color:=Choose:C955($Lon_color=0; 0x00FFFFFF; $Lon_color)

If ($Lon_color#OB Get:C1224($Obj_caller; $kTxt_key; Is longint:K8:6))

//keep value
OB SET:C1220($Obj_caller; \
$kTxt_key; $Lon_color)

$Ptr_caller->:=JSON Stringify:C1217($Obj_caller)

//update selection
QR_SET_TEXT_PROPERTY($Lon_area; qr background color:K14904:8; String:C10($Lon_color); $Lon_column; $Lon_row)

If ($Boo_croosReport)

If ($Lon_column=2)\
| ($Lon_column=3) //apply to line

$Lon_column:=$Lon_column+(3-$Lon_column)+(2-$Lon_column)
QR_SET_TEXT_PROPERTY($Lon_area; qr background color:K14904:8; String:C10($Lon_color); $Lon_column; $Lon_row)

End if
End if
End if
End if

ob_area.modified:=True:C214

//______________________________________________________
Else

ASSERT:C1129(False:C215; "Form event activated unnecessary ("+String:C10($Lon_formEvent)+")")

//______________________________________________________
End case
End if
End if
nqr_SET_BACK_COLOR(qr background color:K14904:8)
13 changes: 2 additions & 11 deletions Project/Sources/Forms/BALLOON_COMMON/form.4DForm
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@
"left": 17,
"width": 120,
"height": 22,
"fontFamily": ".Lucida Grande UI",
"fontSize": 11,
"stroke": "automatic",
"popupPlacement": "linked",
"textPlacement": "left",
Expand All @@ -384,8 +382,6 @@
"left": 142,
"width": 44,
"height": 22,
"fontFamily": ".Lucida Grande UI",
"fontSize": 11,
"stroke": "automatic",
"popupPlacement": "linked",
"textPlacement": "left",
Expand Down Expand Up @@ -443,11 +439,11 @@
"enterableInList": false,
"deletableInList": false,
"printFrame": "variable",
"method": "ObjectMethods/font.alternate.back.color.4dm",
"events": [
"onDataChange"
],
"class": ""
"class": "",
"method": "ObjectMethods/font.alternate.back.color.4dm"
},
"borders.controls": {
"type": "subform",
Expand Down Expand Up @@ -502,8 +498,6 @@
"left": 132,
"width": 130,
"height": 22,
"fontFamily": ".Lucida Grande UI",
"fontSize": 11,
"stroke": "automatic",
"popupPlacement": "linked",
"textPlacement": "left",
Expand Down Expand Up @@ -549,8 +543,6 @@
"width": 171,
"height": 22,
"sizingX": "grow",
"fontFamily": ".Lucida Grande UI",
"fontSize": 11,
"stroke": "#AAAAAA",
"popupPlacement": "linked",
"textPlacement": "left",
Expand Down Expand Up @@ -605,7 +597,6 @@
"version": "1",
"kind": "form"
},
"method": "method.4dm",
"geometryStamp": 96,
"editor": {
"activeView": "View 1",
Expand Down
Empty file.
Loading

0 comments on commit a55f392

Please sign in to comment.