11# FCMString
22
33Summary of modifications:
4- - Added ` GetMeasurementInteger ` and ` SetMeasurementInteger ` methods for parity with ` FCCtrlEdit `
54- Fixed rounding bugs in ` GetMeasurement ` and adjusted override handling behaviour to match ` FCCtrlEdit.GetMeasurement ` on Windows
5+ - Fixed bug in ` SetMeasurement ` where all displayed numbers were truncated at 2 decimal places.
6+ - Added ` GetMeasurementInteger ` , ` GetRangeMeasurementInteger ` and ` SetMeasurementInteger ` methods for parity with ` FCCtrlEdit `
7+ - Added ` GetMeasurementEfix ` , ` GetRangeMeasurementEfix ` and ` SetMeasurementEfix methods for parity with ` FCCtrlEdit`
68- Added ` *Measurement10000th ` methods for setting and retrieving values in 10,000ths of an EVPU (eg for piano brace settings, slur tip width, etc)
79
810## Functions
911
1012- [ GetMeasurement(self, measurementunit)] ( #getmeasurement )
1113- [ GetRangeMeasurement(self, measurementunit, minimum, maximum)] ( #getrangemeasurement )
14+ - [ SetMeasurement(self, value, measurementunit)] ( #setmeasurement )
1215- [ GetMeasurementInteger(self, measurementunit)] ( #getmeasurementinteger )
1316- [ GetRangeMeasurementInteger(self, measurementunit, minimum, maximum)] ( #getrangemeasurementinteger )
1417- [ SetMeasurementInteger(self, value, measurementunit)] ( #setmeasurementinteger )
@@ -25,7 +28,7 @@ Summary of modifications:
2528fcmstring .GetMeasurement (self , measurementunit )
2629```
2730
28- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L53 )
31+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L55 )
2932
3033** [ Override] **
3134Fixes issue with incorrect rounding of returned value.
@@ -46,7 +49,7 @@ Also changes handling of overrides to match the behaviour of `FCCtrlEdit` on Win
4649fcmstring .GetRangeMeasurement (self , measurementunit , minimum , maximum )
4750```
4851
49- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L126 )
52+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L128 )
5053
5154** [ Override] **
5255See ` FCMString.GetMeasurement ` .
@@ -62,13 +65,31 @@ See `FCMString.GetMeasurement`.
6265| ----------- | ----------- |
6366| ` number ` | |
6467
68+ ### SetMeasurement
69+
70+ ``` lua
71+ fcmstring .SetMeasurement (self , value , measurementunit )
72+ ```
73+
74+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L147 )
75+
76+ ** [ Override] [ Fluid] **
77+ Fixes issue with displayed numbers being truncated at 2 decimal places.
78+ Emulates the behaviour of ` FCCtrlEdit.SetMeasurement ` on Windows while the window is showing.
79+
80+ | Input | Type | Description |
81+ | ----- | ---- | ----------- |
82+ | ` self ` | ` FCMString ` | |
83+ | ` value ` | ` number ` | The value to set in EVPUs. |
84+ | ` measurementunit ` | ` number ` | One of the ` finale.MEASUREMENTUNIT_* ` constants. |
85+
6586### GetMeasurementInteger
6687
6788``` lua
6889fcmstring .GetMeasurementInteger (self , measurementunit )
6990```
7091
71- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L143 )
92+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L184 )
7293
7394Returns the measurement in whole EVPUs.
7495
@@ -87,7 +108,7 @@ Returns the measurement in whole EVPUs.
87108fcmstring .GetRangeMeasurementInteger (self , measurementunit , minimum , maximum )
88109```
89110
90- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L161 )
111+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L202 )
91112
92113Returns the measurement in whole EVPUs, clamped between two values.
93114Also ensures that any decimal places in ` minimum ` are correctly taken into account instead of being discarded.
@@ -109,7 +130,7 @@ Also ensures that any decimal places in `minimum` are correctly taken into accou
109130fcmstring .SetMeasurementInteger (self , value , measurementunit )
110131```
111132
112- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L179 )
133+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L220 )
113134
114135** [ Fluid] **
115136Sets a measurement in whole EVPUs.
@@ -126,7 +147,7 @@ Sets a measurement in whole EVPUs.
126147fcmstring .GetMeasurementEfix (self , measurementunit )
127148```
128149
129- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L195 )
150+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L236 )
130151
131152Returns the measurement in whole EFIXes (1/64th of an EVPU)
132153
@@ -145,7 +166,7 @@ Returns the measurement in whole EFIXes (1/64th of an EVPU)
145166fcmstring .GetRangeMeasurementEfix (self , measurementunit , minimum , maximum )
146167```
147168
148- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L212 )
169+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L253 )
149170
150171Returns the measurement in whole EFIXes (1/64th of an EVPU), clamped between two values.
151172
@@ -166,7 +187,7 @@ Returns the measurement in whole EFIXes (1/64th of an EVPU), clamped between two
166187fcmstring .SetMeasurementEfix (self , value , measurementunit )
167188```
168189
169- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L230 )
190+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L271 )
170191
171192** [ Fluid] **
172193Sets a measurement in whole EFIXes.
@@ -183,7 +204,7 @@ Sets a measurement in whole EFIXes.
183204fcmstring .GetMeasurement10000th (self , measurementunit )
184205```
185206
186- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L246 )
207+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L287 )
187208
188209Returns the measurement in 10,000ths of an EVPU.
189210
@@ -202,7 +223,7 @@ Returns the measurement in 10,000ths of an EVPU.
202223fcmstring .GetRangeMeasurement10000th (self , measurementunit , minimum , maximum )
203224```
204225
205- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L264 )
226+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L305 )
206227
207228Returns the measurement in 10,000ths of an EVPU, clamped between two values.
208229Also ensures that any decimal places in ` minimum ` are handled correctly instead of being discarded.
@@ -224,7 +245,7 @@ Also ensures that any decimal places in `minimum` are handled correctly instead
224245fcmstring .SetMeasurement10000th (self , value , measurementunit )
225246```
226247
227- [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L282 )
248+ [ View source] ( https://github.com/finale-lua/lua-scripts/tree/master/src/mixin/FCMString.lua#L323 )
228249
229250** [ Fluid] **
230251Sets a measurement in 10,000ths of an EVPU.
0 commit comments