Skip to content

Commit 41a859d

Browse files
committed
Merge remote-tracking branch 'upstream/develop-8.1' into merge-develop-8.1_17.05.17
2 parents 1c5ef0e + 0f74118 commit 41a859d

File tree

14 files changed

+84
-15
lines changed

14 files changed

+84
-15
lines changed

docs/development/testing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Before running each test command, the test framework inserts a test library stac
6161
* `TestSkip pDescription, pReasonSkipped`: Record a test as having been skipped. *pReasonSkipped* should be a short explanation of why the test was skipped (e.g. "not supported on Windows").
6262
* `TestAssertBroken pDescription, pExpectTrue, pReasonBroken`: The same as `TestAssert`, but marking the test as "expected to fail". *pReasonBroken* should be a short explanation of why the test is currently expected to fail; it should almost always be a reference to a bug report, e.g. "bug 54321".
6363
* `TestAssertThrow pDescription, pHandlerName, pTarget, pExpectedError, pParam`: Assert that a given handler triggers the expected error message. *pHandlerName* is the name of the handler containing the script expected to cause an error; it is dispatched to *pTarget* with *pParam* as a parameter within a try/catch structure. *pExpectedError* is the expected script execution error code.
64+
* `TestAssertDoesNotThrow pDescription, pHandlerName, pTarget, pParam`: Assert that a given handler does not trigger any exceptions. *pHandlerName* is the name of the handler containing the script expected to cause an error; it is dispatched to *pTarget* with *pParam* as a parameter within a try/catch structure.
6465
* `TestGetEngineRepositoryPath`: A function that returns the path to the main LiveCode engine repository.
6566
* `TestGetIDERepositoryPath`: A function that returns the path to the LiveCode IDE repository.
6667
* `TestLoadExtension pName`: Attempt to load the extension with name `pName`, eg `TestLoadExtension "json"` will load the JSON library extension.

docs/dictionary/command/get.lcdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ OS: mac, windows, linux, ios, android
1414
Platforms: desktop, server, mobile
1515

1616
Example:
17-
get the colors
17+
get the colors of button 1
1818

1919
Example:
2020
get 2 * 25 * pi -- gets area of circle with radius 25

docs/dictionary/command/revSpeak.lcdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ settings are used.
4545
> speaking, use the <revIsSpeaking> <function>, as in the following
4646
> example:
4747

48-
if revIsSpeaking then answer "Just a moment..."
48+
if revIsSpeaking() then answer "Just a moment..."
4949
else revSpeak it
5050

5151

docs/notes/bugfix-19361.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Added missing parantheses for revIsSpeaking()

docs/notes/bugfix-19687.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Preserve error from chunk-of-code send form

docs/notes/bugfix-19688.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure 'put the objProp' causes a parse error

engine/src/exec-engine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,8 +1437,8 @@ static void MCEngineSendOrCall(MCExecContext& ctxt, MCStringRef p_script, MCObje
14371437
else
14381438
tptr = MCNameGetString(*t_message);
14391439

1440-
if ((stat = optr->domess(*tptr)) == ES_ERROR)
1441-
ctxt . LegacyThrow(EE_STATEMENT_BADCOMMAND, *t_message);
1440+
if (optr->domess(*tptr, nil, false) == ES_ERROR)
1441+
ctxt . Throw();
14421442
}
14431443
else if (stat == ES_PASS)
14441444
stat = ES_NORMAL;

engine/src/object.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,7 +2920,7 @@ void MCObject::drawdirectionaltext(MCDC *dc, int2 sx, int2 sy, MCStringRef p_str
29202920
#endif
29212921
}
29222922

2923-
Exec_stat MCObject::domess(MCStringRef sptr, MCParameter* p_args)
2923+
Exec_stat MCObject::domess(MCStringRef sptr, MCParameter* p_args, bool p_ignore_errors)
29242924
{
29252925
MCAutoStringRef t_temp_script;
29262926
/* UNCHECKED */ MCStringFormat(&t_temp_script, "on message\n%@\nend message\n", sptr);
@@ -2952,11 +2952,12 @@ Exec_stat MCObject::domess(MCStringRef sptr, MCParameter* p_args)
29522952
swap(MCtargetptr, oldtargetptr);
29532953
if (stat == ES_NORMAL)
29542954
return ES_NORMAL;
2955-
else
2956-
{
2957-
MCeerror->clear(); // clear out bogus error messages
2958-
return ES_ERROR;
2959-
}
2955+
else
2956+
{
2957+
if (p_ignore_errors)
2958+
MCeerror->clear(); // clear out bogus error messages
2959+
return ES_ERROR;
2960+
}
29602961
}
29612962

29622963
void MCObject::eval(MCExecContext &ctxt, MCStringRef p_script, MCValueRef &r_value)

engine/src/object.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,8 @@ class MCObject :
10331033
// SN-2014-04-16 [[ Bug 12078 ]] Buttons and tooltip label are not drawn in the text direction
10341034
void drawdirectionaltext(MCDC *dc, int2 sx, int2 sy, MCStringRef p_string, MCFontRef font);
10351035

1036-
Exec_stat domess(MCStringRef sptr, MCParameter *args = nil);
1036+
Exec_stat domess(MCStringRef sptr, MCParameter *args = nil, bool p_ignore_errors = true);
1037+
10371038
void eval(MCExecContext& ctxt, MCStringRef p_script, MCValueRef& r_value);
10381039
// MERG 2013-9-13: [[ EditScriptChunk ]] Added at expression that's passed through as a second parameter to editScript
10391040
void editscript(MCStringRef p_at = nil);

engine/src/scriptpt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,10 +1744,10 @@ Parse_stat MCScriptPoint::parseexp(Boolean single, Boolean items,
17441744
{
17451745
delete newfact;
17461746
*this = thesp;
1747-
if (MCexplicitvariables)
1747+
if (doingthe || MCexplicitvariables)
17481748
{
17491749
MCerrorlock--;
1750-
MCperror->add(PE_EXPRESSION_NOTLITERAL, *this);
1750+
MCperror->add(PE_PROPERTY_NOTOF, *this);
17511751
return PS_ERROR;
17521752
}
17531753
newfact = new (nothrow) MCLiteral(gettoken_nameref());

0 commit comments

Comments
 (0)