|Anonymous | Login | Signup for a new account||2018-12-18 06:40 PST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000266||Documentation, Examples, and Web Site||Writing with Inform||public||2010-08-25 18:55||2010-10-29 09:23|
|Priority||normal||Severity||serious||Reproducibility||have not tried|
|Platform||x86||OS||Mac OS X||OS Version||10.6|
|Target Version||Fixed in Version||6F95|
|Summary||0000266: 17.2 gives the wrong explanation for "handling the activity"|
|Description||Section 17.2, "How activities work", incorrect explains the phrases "if handling the X activity" and "if handling the X activity with Y" as alternatives to "if the X activity is going on" for use in elaborate situations.|
In fact, they do something completely different, as correctly explained in 17.7.
The sample code below illustrates that the phrases are not interchangeable.
|Minimal Source Text To Reproduce|
Test is a room. A red ball is in Test. A blue ball is in Test. When play begins: if handling the asking which do you mean activity: say "(We are now handling the asking which do you mean activity.)"; if the asking which do you mean activity is going on: say "(The asking which do you mean activity is now going on.)"; Before asking which do you mean: if handling the asking which do you mean activity: say "(We are now handling the asking which do you mean activity.)"; if the asking which do you mean activity is going on: say "(The asking which do you mean activity is now going on.)"; continue the action. Test me with "take ball"
|Tags||No tags attached.|
The "handling" phrase invokes the activity's "for" rulebook, and returns true if none of the rules there intervene. See 17.7 in the manual, "Beginning and ending activities manually".
The name of the phrase is confusing out of context, but in context it makes a little more sense:
begin the X activity;
if handling the X activity, [default behavior];
end the X activity;
That is, it tests whether the calling code is responsible for handling the meat of the activity (because there are no rules to handle it).
Thanks for the explanation. I guess I should have read the entire chapter in the manual before posting. If I had done so, though, I would have posted this as a documentation problem, because the main discussion of the handling phrase very clearly states that it is for testing whether an activity is ongoing. From Chapter 17.2, where the definition of the two handling phrases are called out in little boxes:
If we ever need to find out, we can always test:
if the printing the name activity is going on, ...
if the printing the name activity is not going on, ...
but as we shall see, it's usually simpler to attach "while printing the name" provisos to rules. For really elaborate situations, we may want to use these:
if handling (activity) activity:
This condition is true if the given activity is going on. The activity must be one which doesn't apply to any value.
if handling (activity on values) activity with (value):
This condition is true if the given activity is going on, and the given value is the one it is being applied to.
This really seems to be saying that "if handling" does something similar to, but somehow better than, "if...going on" (better in the sense that it can deal with "elaborate situations").
|OK, I've changed this to a documentation bug.|
|2010-08-25 18:55||ektemple||New Issue|
|2010-08-25 21:36||jmcgrew||Note Added: 0000436|
|2010-08-25 21:36||jmcgrew||Status||new => closed|
|2010-08-25 21:36||jmcgrew||Assigned To||=> jmcgrew|
|2010-08-25 21:36||jmcgrew||Resolution||open => no change required|
|2010-08-26 11:47||ektemple||Note Added: 0000438|
|2010-08-26 11:47||ektemple||Status||closed => feedback|
|2010-08-26 11:47||ektemple||Resolution||no change required => reopened|
|2010-08-26 11:52||jmcgrew||Project||Core Inform => Documentation, Examples, and Web Site|
|2010-08-26 11:57||jmcgrew||Note Added: 0000439|
|2010-08-26 11:57||jmcgrew||Severity||mild => serious|
|2010-08-26 11:57||jmcgrew||Status||feedback => confirmed|
|2010-08-26 11:57||jmcgrew||Resolution||reopened => open|
|2010-08-26 11:57||jmcgrew||Category||Activities => Writing with Inform|
|2010-08-26 11:57||jmcgrew||Summary||Test "handling the activity" always returns true => 17.2 gives the wrong explanation for "handling the activity"|
|2010-08-26 11:57||jmcgrew||Description Updated||View Revisions|
|2010-08-29 07:48||emshort||Assigned To||jmcgrew => emshort|
|2010-08-29 07:48||emshort||Status||confirmed => resolved|
|2010-08-29 07:48||emshort||Resolution||open => fixed|
|2010-10-29 09:23||jmcgrew||Fixed in Version||=> 6F95|
|2010-10-29 09:23||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|