Skip to content

Commit 3979bbd

Browse files
committed
Merge branch 'develop' into bugfix-14893
Conflicts: tests/lcb/stdlib/math.lcb
2 parents de10130 + fdb9e97 commit 3979bbd

55 files changed

Lines changed: 2010 additions & 1939 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

builder/commercial.png

-18 KB
Loading

builder/community.png

-17.1 KB
Loading
-17.1 KB
Binary file not shown.

contrib/TextWrangler/LiveCodeBuilder.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ or equivalent.
358358
<array>
359359
<dict>
360360
<key>BBLMLanguageSuffix</key>
361-
<string>.mlc</string>
361+
<string>.lcb</string>
362362
</dict>
363363
</array>
364364
<key>Language Features</key>
@@ -408,4 +408,4 @@ or equivalent.
408408
)]]></string>
409409
</dict>
410410
</dict>
411-
</plist>
411+
</plist>

docs/lcb/notes/14678.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# LiveCode Builder Standard Library
2+
## Mathematical functions
3+
4+
* Several mathematical functions now throw "domain errors" when
5+
applied to values that the function is not defined for, including
6+
`log10()`, `ln()`, `asin()` and `acos()`, and `x ^ y`.
7+
8+
# [14678] Throw error on domain error in log10() and ln()
9+
# [14679] Throw error on domain error in pow()
10+
# [14681] Throw error on domain error in asin() and acos()

docs/lcb/notes/14846.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# LiveCode Builder Standard Library
2+
## Sequence operations
3+
4+
* New syntax has been added for searching partial contents of sequence types (`List`, `String` and `Data`) based on the `offset` operation.
5+
* `the offset of <Needle> before <Position> in <Haystack>`
6+
* `the offset of <Needle> after <Position> in <Haystack>`
7+
* Equivalent syntax has been added for the `index` operation.
8+
9+
# [14846] Fixed and reinstated "offset before" and "offset after"

docs/lcb/notes/14889.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# LiveCode Builder Standard Library
2+
## Mathematical functions
3+
4+
# [14889] Throw error when "converted from base _" fails

engine/src/modules.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,15 @@ extern "C"
134134
}
135135

136136
extern bool MCForeignModuleInitialize(void);
137+
extern bool MCMathModuleInitialize(void);
137138
extern bool MCCanvasModuleInitialize(void);
138139
extern bool MCEngineModuleInitialize(void);
139140
bool MCModulesInitialize(void)
140141
{
141142
if (!MCForeignModuleInitialize())
142143
return false;
144+
if (!MCMathModuleInitialize())
145+
return false;
143146
if (!MCCanvasModuleInitialize())
144147
return false;
145148
if (!MCEngineModuleInitialize())
@@ -148,11 +151,13 @@ bool MCModulesInitialize(void)
148151
}
149152

150153
extern void MCForeignModuleFinalize(void);
154+
extern void MCMathModuleFinalize(void);
151155
extern void MCCanvasModuleFinalize(void);
152156
extern void MCEngineModuleFinalize(void);
153157
void MCModulesFinalize(void)
154158
{
155159
MCEngineModuleFinalize();
156160
MCCanvasModuleFinalize();
161+
MCMathModuleFinalize();
157162
MCForeignModuleFinalize();
158163
}

extensions/extensions.xcodeproj/project.pbxproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@
3333
fileType = pattern.proxy;
3434
isEditable = 1;
3535
outputFiles = (
36-
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_NAME).c",
36+
"$(DERIVED_FILE_DIR)/com.livecode.extensions.livecode.$(INPUT_FILE_NAME)",
37+
"$(BUILT_PRODUCTS_DIR)/packaged_extensions/com.livecode.extensions.livecode.$(INPUT_FILE_NAME)",
3738
);
38-
script = "\nBUILD_FOLDER=\"${BUILT_PRODUCTS_DIR}\"\n\n\"${BUILT_PRODUCTS_DIR}/lc-compile\" --modulepath \"${BUILD_FOLDER}/modules\" --outputc \"${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}.c\" \"${INPUT_FILE_PATH}\"\n\n\"${BUILT_PRODUCTS_DIR}/lc-compile\" --modulepath \"${BUILT_PRODUCTS_DIR}/modules\" --manifest \"${INPUT_FILE_DIR}/manifest.xml\" --output \"${INPUT_FILE_DIR}/module.lcm\" \"${INPUT_FILE_PATH}\"\n\nTARGET_DIR=\"com.livecode.extensions.livecode.${INPUT_FILE_NAME}\"\n\ncd \"${INPUT_FILE_DIR}\"\nzip -r \"${TARGET_DIR}.lce\" *\nmv \"${TARGET_DIR}.lce\" \"${DERIVED_FILE_DIR}\"\nmkdir -p \"${BUILT_PRODUCTS_DIR}/packaged_extensions/${TARGET_DIR}\"\n\n# Unzip to the packaged extensions folder\nunzip -o \"${DERIVED_FILE_DIR}/${TARGET_DIR}.lce\" -d \"${BUILT_PRODUCTS_DIR}/packaged_extensions/${TARGET_DIR}\"\n";
39+
script = "\nBUILD_FOLDER=\"${BUILT_PRODUCTS_DIR}\"\n\n\"${BUILT_PRODUCTS_DIR}/lc-compile\" --modulepath \"${BUILT_PRODUCTS_DIR}/modules\" --manifest \"${INPUT_FILE_DIR}/manifest.xml\" --output \"${INPUT_FILE_DIR}/module.lcm\" \"${INPUT_FILE_PATH}\"\n\nTARGET_DIR=\"com.livecode.extensions.livecode.${INPUT_FILE_NAME}\"\n\ncd \"${INPUT_FILE_DIR}\"\nzip -r \"${TARGET_DIR}.lce\" *\nmkdir -p \"${DERIVED_FILE_DIR}\"\nmv \"${TARGET_DIR}.lce\" \"${DERIVED_FILE_DIR}/${TARGET_DIR}.lce\"\nmkdir -p \"${BUILT_PRODUCTS_DIR}/packaged_extensions/${TARGET_DIR}\"\n\n# Unzip to the packaged extensions folder\nunzip -o \"${DERIVED_FILE_DIR}/${TARGET_DIR}.lce\" -d \"${BUILT_PRODUCTS_DIR}/packaged_extensions/${TARGET_DIR}\"\n";
3940
};
4041
/* End PBXBuildRule section */
4142

extensions/libraries/canvas/canvas.lcb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Description:
5656
Creates a canvas of the given size for the other handlers to use.
5757
*/
5858

59-
public handler canvasCreate(in pWidth as integer, in pHeight as integer) as undefined
59+
public handler canvasCreate(in pWidth as Integer, in pHeight as Integer) as undefined
6060
-- Create a new canvas, this will release any previous canvas.
6161
put a new canvas with size [ pWidth, pHeight ] into sCanvas
6262
-- Set the paint to opaque black and fill the whole area.
@@ -85,7 +85,7 @@ pAlpha: The alpha value of the color to set.
8585
Description:
8686
Sets the current color of the canvas to the given RGBA value.
8787
*/
88-
public handler canvasSetColor(in pRed as real, in pGreen as real, in pBlue as real, in pAlpha as real) as undefined
88+
public handler canvasSetColor(in pRed as Real, in pGreen as Real, in pBlue as Real, in pAlpha as Real) as undefined
8989
set the paint of sCanvas to solid paint with color [pRed, pGreen, pBlue, pRed]
9090
end handler
9191

@@ -97,7 +97,7 @@ pRadius: The radius of the circle.
9797
Description:
9898
Fills a circle of the given radius at the given position in the canvas.
9999
*/
100-
public handler canvasFillCircle(in pX as real, in pY as real, in pRadius as real) as undefined
100+
public handler canvasFillCircle(in pX as Real, in pY as Real, in pRadius as Real) as undefined
101101
fill circle path centered at point [pX, pY] with radius pRadius on sCanvas
102102
end handler
103103

@@ -108,7 +108,7 @@ pObjectId: A string which is an object chunk referring to an image.
108108
Description:
109109
This handler copies the current contents of the canvas to the specified image object.
110110
*/
111-
public handler canvasApplyToImage(in pObjectId as string) as undefined
111+
public handler canvasApplyToImage(in pObjectId as String) as undefined
112112
variable tObject as ScriptObject
113113

114114
-- Resolving the script object gets a weak reference to the specified

0 commit comments

Comments
 (0)