diff options
Diffstat (limited to 'doc/JSON/Editor/EditMenu.html')
-rw-r--r-- | doc/JSON/Editor/EditMenu.html | 572 |
1 files changed, 0 insertions, 572 deletions
diff --git a/doc/JSON/Editor/EditMenu.html b/doc/JSON/Editor/EditMenu.html deleted file mode 100644 index a3c16bc..0000000 --- a/doc/JSON/Editor/EditMenu.html +++ /dev/null @@ -1,572 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> - - <title>Class: JSON::Editor::EditMenu</title> - - <link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" /> - - <script src="../../js/jquery.js" type="text/javascript" - charset="utf-8"></script> - <script src="../../js/thickbox-compressed.js" type="text/javascript" - charset="utf-8"></script> - <script src="../../js/quicksearch.js" type="text/javascript" - charset="utf-8"></script> - <script src="../../js/darkfish.js" type="text/javascript" - charset="utf-8"></script> - -</head> -<body class="class"> - - <div id="metadata"> - <div id="file-metadata"> - <div id="file-list-section" class="section"> - <h3 class="section-header">In Files</h3> - <div class="section-body"> - <ul> - - <li><a href="../../lib/json/editor_rb.html?TB_iframe=true&height=550&width=785" - class="thickbox" title="lib/json/editor.rb">lib/json/editor.rb</a></li> - - </ul> - </div> - </div> - - - </div> - - <div id="class-metadata"> - - <!-- Parent Class --> - - <div id="parent-class-section" class="section"> - <h3 class="section-header">Parent</h3> - - <p class="link"><a href="../../Object.html">Object</a></p> - - </div> - - - <!-- Namespace Contents --> - - - <!-- Method Quickref --> - - <div id="method-list-section" class="section"> - <h3 class="section-header">Methods</h3> - <ul class="link-list"> - - <li><a href="#M000147">#copy</a></li> - - <li><a href="#M000152">#create</a></li> - - <li><a href="#M000149">#find</a></li> - - <li><a href="#M000150">#find_again</a></li> - - <li><a href="#M000148">#paste</a></li> - - <li><a href="#M000151">#sort</a></li> - - </ul> - </div> - - - <!-- Included Modules --> - - <div id="includes-section" class="section"> - <h3 class="section-header">Included Modules</h3> - <ul class="link-list"> - - - <li><a class="include" href="../Editor.html">JSON::Editor</a></li> - - - </ul> - </div> - - </div> - - <div id="project-metadata"> - - - <div id="fileindex-section" class="section project-section"> - <h3 class="section-header">Files</h3> - <ul> - - <li class="file"><a href="../../README.html">README</a></li> - - </ul> - </div> - - - <div id="classindex-section" class="section project-section"> - <h3 class="section-header">Class Index - <span class="search-toggle"><img src="../../images/find.png" - height="16" width="16" alt="[+]" - title="show/hide quicksearch" /></span></h3> - <form action="#" method="get" accept-charset="utf-8" class="initially-hidden"> - <fieldset> - <legend>Quicksearch</legend> - <input type="text" name="quicksearch" value="" - class="quicksearch-field" /> - </fieldset> - </form> - - <ul class="link-list"> - - <li><a href="../../JSON.html">JSON</a></li> - - <li><a href="../../JSON/Editor.html">JSON::Editor</a></li> - - <li><a href="../../JSON/Editor/EditMenu.html">JSON::Editor::EditMenu</a></li> - - <li><a href="../../JSON/Editor/FileMenu.html">JSON::Editor::FileMenu</a></li> - - <li><a href="../../JSON/Editor/Gtk.html">JSON::Editor::Gtk</a></li> - - <li><a href="../../JSON/Editor/Gtk/TreeIter.html">JSON::Editor::Gtk::TreeIter</a></li> - - <li><a href="../../JSON/Editor/JSONTreeView.html">JSON::Editor::JSONTreeView</a></li> - - <li><a href="../../JSON/Editor/MainWindow.html">JSON::Editor::MainWindow</a></li> - - <li><a href="../../JSON/Editor/MenuExtension.html">JSON::Editor::MenuExtension</a></li> - - <li><a href="../../JSON/Editor/OptionsMenu.html">JSON::Editor::OptionsMenu</a></li> - - <li><a href="../../JSON/Editor/PopUpMenu.html">JSON::Editor::PopUpMenu</a></li> - - <li><a href="../../JSON/Ext.html">JSON::Ext</a></li> - - <li><a href="../../JSON/Ext/Generator.html">JSON::Ext::Generator</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods.html">JSON::Ext::Generator::GeneratorMethods</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/Array.html">JSON::Ext::Generator::GeneratorMethods::Array</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/FalseClass.html">JSON::Ext::Generator::GeneratorMethods::FalseClass</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/Float.html">JSON::Ext::Generator::GeneratorMethods::Float</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/Hash.html">JSON::Ext::Generator::GeneratorMethods::Hash</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/Integer.html">JSON::Ext::Generator::GeneratorMethods::Integer</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/NilClass.html">JSON::Ext::Generator::GeneratorMethods::NilClass</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/Object.html">JSON::Ext::Generator::GeneratorMethods::Object</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/String.html">JSON::Ext::Generator::GeneratorMethods::String</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/String/Extend.html">JSON::Ext::Generator::GeneratorMethods::String::Extend</a></li> - - <li><a href="../../JSON/Ext/Generator/GeneratorMethods/TrueClass.html">JSON::Ext::Generator::GeneratorMethods::TrueClass</a></li> - - <li><a href="../../JSON/Ext/Generator/State.html">JSON::Ext::Generator::State</a></li> - - <li><a href="../../JSON/Ext/Parser.html">JSON::Ext::Parser</a></li> - - <li><a href="../../JSON/GeneratorError.html">JSON::GeneratorError</a></li> - - <li><a href="../../JSON/JSONError.html">JSON::JSONError</a></li> - - <li><a href="../../JSON/MissingUnicodeSupport.html">JSON::MissingUnicodeSupport</a></li> - - <li><a href="../../JSON/NestingError.html">JSON::NestingError</a></li> - - <li><a href="../../JSON/ParserError.html">JSON::ParserError</a></li> - - <li><a href="../../JSON/Pure.html">JSON::Pure</a></li> - - <li><a href="../../JSON/Pure/Generator.html">JSON::Pure::Generator</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods.html">JSON::Pure::Generator::GeneratorMethods</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/Array.html">JSON::Pure::Generator::GeneratorMethods::Array</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/FalseClass.html">JSON::Pure::Generator::GeneratorMethods::FalseClass</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/Float.html">JSON::Pure::Generator::GeneratorMethods::Float</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/Hash.html">JSON::Pure::Generator::GeneratorMethods::Hash</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/Integer.html">JSON::Pure::Generator::GeneratorMethods::Integer</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/NilClass.html">JSON::Pure::Generator::GeneratorMethods::NilClass</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/Object.html">JSON::Pure::Generator::GeneratorMethods::Object</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/String.html">JSON::Pure::Generator::GeneratorMethods::String</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/String/Extend.html">JSON::Pure::Generator::GeneratorMethods::String::Extend</a></li> - - <li><a href="../../JSON/Pure/Generator/GeneratorMethods/TrueClass.html">JSON::Pure::Generator::GeneratorMethods::TrueClass</a></li> - - <li><a href="../../JSON/Pure/Generator/State.html">JSON::Pure::Generator::State</a></li> - - <li><a href="../../JSON/Pure/Parser.html">JSON::Pure::Parser</a></li> - - <li><a href="../../Class.html">Class</a></li> - - <li><a href="../../Date.html">Date</a></li> - - <li><a href="../../DateTime.html">DateTime</a></li> - - <li><a href="../../Enumerable.html">Enumerable</a></li> - - <li><a href="../../Exception.html">Exception</a></li> - - <li><a href="../../Kernel.html">Kernel</a></li> - - <li><a href="../../Object.html">Object</a></li> - - <li><a href="../../Range.html">Range</a></li> - - <li><a href="../../Regexp.html">Regexp</a></li> - - <li><a href="../../Struct.html">Struct</a></li> - - <li><a href="../../Symbol.html">Symbol</a></li> - - <li><a href="../../Time.html">Time</a></li> - - </ul> - <div id="no-class-search-results" style="display: none;">No matching classes.</div> - </div> - - - </div> - </div> - - <div id="documentation"> - <h1 class="class">JSON::Editor::EditMenu</h1> - - <div id="description"> - <p> -This class creates the Edit pulldown menu. -</p> - - </div> - - <!-- Constants --> - - - <!-- Attributes --> - - - <!-- Methods --> - - <div id="public-instance-method-details" class="method-section section"> - <h3 class="section-header">Public Instance Methods</h3> - - - <div id="copy-method" class="method-detail "> - <a name="M000147"></a> - - <div class="method-heading"> - - <span class="method-name">copy</span><span - class="method-args">(item)</span> - <span class="method-click-advice">click to toggle source</span> - - </div> - - <div class="method-description"> - - <p> -Copy data from model into primary clipboard. -</p> - - - - <div class="method-source-code" - id="copy-source"> -<pre> -<span class="ruby-comment cmt"># File lib/json/editor.rb, line 548</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">copy</span>(<span class="ruby-identifier">item</span>) - <span class="ruby-identifier">data</span> = <span class="ruby-constant">Editor</span>.<span class="ruby-identifier">model2data</span>(<span class="ruby-identifier">model</span>.<span class="ruby-identifier">iter_first</span>) - <span class="ruby-identifier">json</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">:max_nesting</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>) - <span class="ruby-identifier">c</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Clipboard</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">Gdk</span><span class="ruby-operator">::</span><span class="ruby-constant">Selection</span><span class="ruby-operator">::</span><span class="ruby-constant">PRIMARY</span>) - <span class="ruby-identifier">c</span>.<span class="ruby-identifier">text</span> = <span class="ruby-identifier">json</span> - <span class="ruby-keyword kw">end</span></pre> - </div> - - </div> - - - </div> - - - <div id="create-method" class="method-detail "> - <a name="M000152"></a> - - <div class="method-heading"> - - <span class="method-name">create</span><span - class="method-args">()</span> - <span class="method-click-advice">click to toggle source</span> - - </div> - - <div class="method-description"> - - <p> -Create the menu. -</p> - - - - <div class="method-source-code" - id="create-source"> -<pre> -<span class="ruby-comment cmt"># File lib/json/editor.rb, line 645</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span> - <span class="ruby-identifier">title</span> = <span class="ruby-constant">MenuItem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'Edit'</span>) - <span class="ruby-identifier">title</span>.<span class="ruby-identifier">submenu</span> = <span class="ruby-identifier">menu</span> - <span class="ruby-identifier">add_item</span>(<span class="ruby-value str">'Copy'</span>, <span class="ruby-value">?c</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">method</span>(<span class="ruby-identifier">:copy</span>)) - <span class="ruby-identifier">add_item</span>(<span class="ruby-value str">'Paste'</span>, <span class="ruby-value">?v</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">method</span>(<span class="ruby-identifier">:paste</span>)) - <span class="ruby-identifier">add_separator</span> - <span class="ruby-identifier">add_item</span>(<span class="ruby-value str">'Find'</span>, <span class="ruby-value">?f</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">method</span>(<span class="ruby-identifier">:find</span>)) - <span class="ruby-identifier">add_item</span>(<span class="ruby-value str">'Find Again'</span>, <span class="ruby-value">?g</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">method</span>(<span class="ruby-identifier">:find_again</span>)) - <span class="ruby-identifier">add_separator</span> - <span class="ruby-identifier">add_item</span>(<span class="ruby-value str">'Sort'</span>, <span class="ruby-value">?S</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">method</span>(<span class="ruby-identifier">:sort</span>)) - <span class="ruby-identifier">title</span> - <span class="ruby-keyword kw">end</span></pre> - </div> - - </div> - - - </div> - - - <div id="find-method" class="method-detail "> - <a name="M000149"></a> - - <div class="method-heading"> - - <span class="method-name">find</span><span - class="method-args">(item)</span> - <span class="method-click-advice">click to toggle source</span> - - </div> - - <div class="method-description"> - - <p> -Find a string in all nodes’ contents and select the found node in the -treeview. -</p> - - - - <div class="method-source-code" - id="find-source"> -<pre> -<span class="ruby-comment cmt"># File lib/json/editor.rb, line 570</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">item</span>) - <span class="ruby-ivar">@search</span> = <span class="ruby-identifier">ask_for_find_term</span>(<span class="ruby-ivar">@search</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">return</span> - <span class="ruby-identifier">iter</span> = <span class="ruby-identifier">model</span>.<span class="ruby-identifier">get_iter</span>(<span class="ruby-value str">'0'</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">return</span> - <span class="ruby-identifier">iter</span>.<span class="ruby-identifier">recursive_each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> - <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@iter</span> - <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@iter</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">i</span> - <span class="ruby-keyword kw">next</span> - <span class="ruby-keyword kw">else</span> - <span class="ruby-ivar">@iter</span> = <span class="ruby-keyword kw">nil</span> - <span class="ruby-keyword kw">next</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@search</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">i</span>[<span class="ruby-constant">CONTENT_COL</span>]) - <span class="ruby-identifier">set_cursor</span>(<span class="ruby-identifier">i</span>.<span class="ruby-identifier">path</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">false</span>) - <span class="ruby-ivar">@iter</span> = <span class="ruby-identifier">i</span> - <span class="ruby-keyword kw">break</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span></pre> - </div> - - </div> - - - </div> - - - <div id="find-again-method" class="method-detail "> - <a name="M000150"></a> - - <div class="method-heading"> - - <span class="method-name">find_again</span><span - class="method-args">(item)</span> - <span class="method-click-advice">click to toggle source</span> - - </div> - - <div class="method-description"> - - <p> -Repeat the last search given by <a href="EditMenu.html#M000149">find</a>. -</p> - - - - <div class="method-source-code" - id="find-again-source"> -<pre> -<span class="ruby-comment cmt"># File lib/json/editor.rb, line 590</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_again</span>(<span class="ruby-identifier">item</span>) - <span class="ruby-ivar">@search</span> <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">return</span> - <span class="ruby-identifier">iter</span> = <span class="ruby-identifier">model</span>.<span class="ruby-identifier">get_iter</span>(<span class="ruby-value str">'0'</span>) - <span class="ruby-identifier">iter</span>.<span class="ruby-identifier">recursive_each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> - <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@iter</span> - <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@iter</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">i</span> - <span class="ruby-keyword kw">next</span> - <span class="ruby-keyword kw">else</span> - <span class="ruby-ivar">@iter</span> = <span class="ruby-keyword kw">nil</span> - <span class="ruby-keyword kw">next</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@search</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">i</span>[<span class="ruby-constant">CONTENT_COL</span>]) - <span class="ruby-identifier">set_cursor</span>(<span class="ruby-identifier">i</span>.<span class="ruby-identifier">path</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">false</span>) - <span class="ruby-ivar">@iter</span> = <span class="ruby-identifier">i</span> - <span class="ruby-keyword kw">break</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span></pre> - </div> - - </div> - - - </div> - - - <div id="paste-method" class="method-detail "> - <a name="M000148"></a> - - <div class="method-heading"> - - <span class="method-name">paste</span><span - class="method-args">(item)</span> - <span class="method-click-advice">click to toggle source</span> - - </div> - - <div class="method-description"> - - <p> -Copy json text from primary clipboard into model. -</p> - - - - <div class="method-source-code" - id="paste-source"> -<pre> -<span class="ruby-comment cmt"># File lib/json/editor.rb, line 556</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">paste</span>(<span class="ruby-identifier">item</span>) - <span class="ruby-identifier">c</span> = <span class="ruby-constant">Gtk</span><span class="ruby-operator">::</span><span class="ruby-constant">Clipboard</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">Gdk</span><span class="ruby-operator">::</span><span class="ruby-constant">Selection</span><span class="ruby-operator">::</span><span class="ruby-constant">PRIMARY</span>) - <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">json</span> = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">wait_for_text</span> - <span class="ruby-identifier">window</span>.<span class="ruby-identifier">ask_save</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@changed</span> - <span class="ruby-keyword kw">begin</span> - <span class="ruby-identifier">window</span>.<span class="ruby-identifier">edit</span> <span class="ruby-identifier">json</span> - <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> - <span class="ruby-identifier">window</span>.<span class="ruby-identifier">clear</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span></pre> - </div> - - </div> - - - </div> - - - <div id="sort-method" class="method-detail "> - <a name="M000151"></a> - - <div class="method-heading"> - - <span class="method-name">sort</span><span - class="method-args">(item)</span> - <span class="method-click-advice">click to toggle source</span> - - </div> - - <div class="method-description"> - - <p> -Sort (Reverse sort) all elements of the selected array by the given -expression. <em>x</em> is the element in question. -</p> - - - - <div class="method-source-code" - id="sort-source"> -<pre> -<span class="ruby-comment cmt"># File lib/json/editor.rb, line 611</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sort</span>(<span class="ruby-identifier">item</span>) - <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span> = <span class="ruby-identifier">selection</span>.<span class="ruby-identifier">selected</span> - <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'Array'</span> - <span class="ruby-identifier">parent</span> = <span class="ruby-identifier">current</span>.<span class="ruby-identifier">parent</span> - <span class="ruby-identifier">ary</span> = <span class="ruby-constant">Editor</span>.<span class="ruby-identifier">model2data</span>(<span class="ruby-identifier">current</span>) - <span class="ruby-identifier">order</span>, <span class="ruby-identifier">reverse</span> = <span class="ruby-identifier">ask_for_order</span> - <span class="ruby-identifier">order</span> <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">return</span> - <span class="ruby-keyword kw">begin</span> - <span class="ruby-identifier">block</span> = <span class="ruby-identifier">eval</span> <span class="ruby-node">"lambda { |x| #{order} }"</span> - <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">reverse</span> - <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">sort!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">block</span>[<span class="ruby-identifier">b</span>] <span class="ruby-operator"><=></span> <span class="ruby-identifier">block</span>[<span class="ruby-identifier">a</span>] } - <span class="ruby-keyword kw">else</span> - <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">sort!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">block</span>[<span class="ruby-identifier">a</span>] <span class="ruby-operator"><=></span> <span class="ruby-identifier">block</span>[<span class="ruby-identifier">b</span>] } - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span> - <span class="ruby-constant">Editor</span>.<span class="ruby-identifier">error_dialog</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-node">"Failed to sort Array with #{order}: #{e}!"</span>) - <span class="ruby-keyword kw">else</span> - <span class="ruby-constant">Editor</span>.<span class="ruby-identifier">data2model</span>(<span class="ruby-identifier">ary</span>, <span class="ruby-identifier">model</span>, <span class="ruby-identifier">parent</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">m</span>.<span class="ruby-identifier">insert_before</span>(<span class="ruby-identifier">parent</span>, <span class="ruby-identifier">current</span>) - <span class="ruby-keyword kw">end</span> - <span class="ruby-identifier">model</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">current</span>) - <span class="ruby-identifier">expand_collapse</span>(<span class="ruby-identifier">parent</span>) - <span class="ruby-identifier">window</span>.<span class="ruby-identifier">change</span> - <span class="ruby-identifier">toplevel</span>.<span class="ruby-identifier">display_status</span>(<span class="ruby-value str">"Array has been sorted."</span>) - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">else</span> - <span class="ruby-identifier">toplevel</span>.<span class="ruby-identifier">display_status</span>(<span class="ruby-value str">"Only Array nodes can be sorted!"</span>) - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">else</span> - <span class="ruby-identifier">toplevel</span>.<span class="ruby-identifier">display_status</span>(<span class="ruby-value str">"Select an Array to sort first!"</span>) - <span class="ruby-keyword kw">end</span> - <span class="ruby-keyword kw">end</span></pre> - </div> - - </div> - - - </div> - - - </div> - - - </div> - - - <div id="rdoc-debugging-section-dump" class="debugging-section"> - - <p>Disabled; run with --debug to generate this.</p> - - </div> - - <div id="validator-badges"> - <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> - <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish - Rdoc Generator</a> 1.1.6</small>.</p> - </div> - -</body> -</html> - |