User Tools

Site Tools


twine_1.4_bugs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

twine_1.4_bugs [2013/12/16 19:44]
l [<<textentry>>]
twine_1.4_bugs [2017/10/09 20:39]
Line 1: Line 1:
-The following are possible bugs or unintended backwards-compatibility breaks that have been reported for **Twine 1.4.0**. 
  
-====Sugarcane sidebar==== 
- 
-The Sugarcane sidebar'​s CSS is missing "​left:​7.5em",​ thus placing it too far to the left of the screen. 
- 
-== Makeshift patch== 
- 
-Put this CSS code in a stylesheet passage: ''#​sidebar { left:7.5em; }''​ 
- 
-====External link syntax highlighting ==== 
-The syntax highlighting for external links is broken - all external links are displayed as bad links even if they begin with "​http:​%%//​%%"​. 
- 
-==== Variable array indexes ==== 
- 
-You currently can't use variables as array indexes (such as $weapons[$hand]) unless you include extra padding whitespace. 
- 
-== Makeshift patch == 
- 
-Put a space between the array variable and the first square bracket: $weapons [$hand] 
- 
-==== <<​choice>>​ ==== 
- 
-<<​choice>>​ ought to disable both itself and every other <<​choice>>​ macro in the passage - but in 1.4.0 it only disables itself. 
- 
-==== <<​nobr>>​ errors ==== 
- 
-Due to a bug, <<​nobr>>​ produces an error message if any text at all follows the closing <<​endnobr>>​ tag, including whitespace. It also doesn'​t allow nesting <<​nobr>>​ tags (but admittedly, that's not really useful at all). 
- 
-== Makeshift patch == 
- 
-Use the ''​\''​ line-continuation symbol in place of <<​nobr>>​ in situations where this would be an issue. 
- 
-==== <<​textentry>>​ ==== 
- 
-This macro'​s absence is not actually a bug. <<​textentry>>,​ a macro that was added in the Twine 1.3.6 alpha, was removed from the Twine codebase by its author, as it was intended primarily for testing and was never meant for actual end-use. (In Twine 1.4.1, it may be possible to use raw HTML <​input>​ tags to replicate the original functionality of <<​textinput>>,​ with the advantage of allowing more input types than just text boxes.) 
- 
-== Makeshift patch == 
- 
-You can re-insert <<​textentry>>​ by including this script: 
-<​code>​macros.textinput={handler:​function(a,​b,​c){if(c[1]){var d=c[0].replace(/​\$/​g,""​);​el=document.createElement("​span"​);​var e="<​input id='"​+d+"'​ type='​text'​ onkeypress=\"​var charCode; if(event && event.which){charCode = event.which;​}else if(window.event){event = window.event;​charCode = event.keyCode;​}if(charCode == 13) {state.history[0].variables."​+d+"​ = this.value; state.display('"​+c[1]+"'​)}\"/>";​if(c[2]){e+="<​input type='​button'​ value='"​+c[2]+"'​ onclick=\"​state.history[0].variables."​+d+"​ = getElementById('"​+d+"'​).value;​ state.display('"​+c[1]+"'​);​\"/>"​}el.innerHTML=e;​a.appendChild(el)}else{throwError(a,'"​[PassageName]"​ parameter missing'​)}}};</​code>​ 
- 
-==== <<​return>>​ and bookmarks ==== 
- 
-Just as in 1.3.5, the <<​back>>​ macro may not function correctly for game states loaded from a bookmark. If you bookmark a passage that contains a <<​back>>​ macro, then reload from the bookmark, the <<​back>>​ macro won't work because the loaded page is the only page in the browser history. However, the <<​return>>​ macro also suffers from this deficiency, for reasons 
- 
-== Makeshift patch == 
- 
-Use ''​%%[[Return|previous()]]%%''​ instead of <<​return>>​. 
- 
- 
-==== Scripts ==== 
- 
-Some old scripts, such as Leon Arnott'​s [[http://​www.glorioustrainwrecks.com/​node/​5084|Tag CSS]], contain a shim to get them to work with the Start passage in Twine 1.3.5, by using the state.history object. Unfortunately,​ the script (and presumably others like it) does not correctly check for the existence of state.history[0].passage,​ so it will crash in Twine 1.4. (If you are getting the error message ''​state.history[0].passage is null''​ or something similar, this is likely the reason.) Due to the popularity of this and other scripts, a counter-shim may be installed in Twine 1.4.1 to counteract this. 
- 
-Strictly speaking, none of the '​monkey patch' Twine 1.3.5 scripts (which can be taken to mean "those that don't add new macros"​) are officially supported by Twine 1.4 - since they directly replace key engine functions like History.prototype.display,​ they will likely eliminate new 1.4 engine features and replace them with inferior 1.3.5 features. 
- 
-== Recommendation == 
- 
-If you're using [[http://​www.glorioustrainwrecks.com/​taxonomy/​term/​7944|any of these scripts]] (which includes Tag CSS), you should delete them from your projects, as their functionality is present in Twine 1.4 out-of-the-box. 
twine_1.4_bugs.txt ยท Last modified: 2017/10/09 20:39 (external edit)