Skip to content

Commit dd86381

Browse files
ACI0105031
1 parent bc70d2d commit dd86381

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

Project/Sources/Methods/UI_PaletteInfos.4dm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// modifiée le 10/oct 2018 par RL
33
// ACI0098592
44

5-
C_LONGINT:C283($grey)
6-
C_LONGINT:C283($typeSelection)
5+
var $grey : Integer
6+
var $typeSelection : Integer
77

88
If (UI_isProtected(False:C215)) // false means don't take focus into account
99

@@ -57,6 +57,6 @@ Else
5757
//OBJECT SET ENTERABLE(*;"Expression";False) // RL 2019/12/02
5858
OBJECT SET ENTERABLE:C238(*; "VirtualExpression"; False:C215) // RL 2019/12/02
5959

60-
OBJECT SET HELP TIP:C1181(*; "btn_displayAsSymbol"; Get action info:C1442("displayFormulaAsSymbol").title)
60+
OBJECT SET HELP TIP:C1181(*; "btn_displayAsSymbol"; Action info:C1442("displayFormulaAsSymbol").title)
6161

6262
End if

Project/Sources/Methods/WP_SetURL.4dm

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,24 @@ var $ptrLabel; $ptrURL : Pointer
44
var $_URLs : Collection
55
var $range1; $range2 : Object
66
var $start; $end : Integer
7+
var $label; $URL : Text // ACI0105031
78

89
$ptrLabel:=OBJECT Get pointer:C1124(Object named:K67:5; "URLlabel")
910
$ptrURL:=OBJECT Get pointer:C1124(Object named:K67:5; "URLurl")
1011

1112
If (Not:C34((Is nil pointer:C315($ptrLabel)) | (Is nil pointer:C315($ptrURL))))
1213

14+
$label:=$ptrLabel-> // ACI0105031
15+
$URL:=$ptrURL-> // ACI0105031
16+
1317
$_URLs:=WP Get links:C1643(Form:C1466.selection)
1418
If ($_URLs.length>0)
1519

1620

1721
// text currenttly selected in the area
1822
$range1:=Form:C1466.selection
1923

20-
If (($ptrURL->)#"")
24+
If ($URL#"") // ACI0105031
2125

2226
// range of the first URL
2327
$range2:=WP Text range:C1341(Form:C1466.selection.owner; $_URLs[0].range.start; $_URLs[0].range.end)
@@ -43,7 +47,16 @@ If (Not:C34((Is nil pointer:C315($ptrLabel)) | (Is nil pointer:C315($ptrURL))))
4347

4448
End if
4549

46-
WP SET ATTRIBUTES:C1342($range1; wk link url:K81:202; $ptrURL->)
47-
WP SET TEXT:C1574($range1; $ptrLabel->; wk replace:K81:177)
50+
// user friendly help // ACI0105031
51+
If ($URL="www@")
52+
$URL:="http://"+$URL
53+
End if
54+
55+
Try // ACI0105031
56+
WP SET TEXT:C1574($range1; $label; wk replace:K81:177) // ACI0105031 (two lines of code switched… the label must be set FIRST)
57+
WP SET ATTRIBUTES:C1342($range1; wk link url:K81:202; $URL) // ACI0105031 (two lines of code switched… the label must be set FIRST)
58+
//Catch
59+
//ALERT("An error occured while setting the URL") // to be translated
60+
End try
4861

4962
End if

0 commit comments

Comments
 (0)