<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Comments</title>
 <link>http://community.activestate.com</link>
 <description>Comments</description>
 <language>en</language>
<item>
 <title>new version</title>
 <link>http://community.activestate.com/forum-topic/push-pop-method-navigation#comment-5957</link>
 <description>&lt;p&gt;Here&#039;s a new version, complete with ability to save selections, deal with unsaved buffers, and open buffers that have been closed.&lt;/p&gt;
&lt;p&gt;pushd:&lt;/p&gt;
&lt;div class=&quot;geshi-block&quot;&gt;
&lt;div class=&quot;geshifilter javascript&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;==&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;undefined&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt; = &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; view = ko.&lt;span style=&quot;color: #006600;&quot;&gt;views&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;manager&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;currentView&lt;/span&gt;;&lt;br /&gt;
window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; path: view.&lt;span style=&quot;color: #006600;&quot;&gt;document&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;file&lt;/span&gt; ? view.&lt;span style=&quot;color: #006600;&quot;&gt;document&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;file&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;URI&lt;/span&gt;:view.&lt;span style=&quot;color: #006600;&quot;&gt;document&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;displayPath&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; line: view.&lt;span style=&quot;color: #006600;&quot;&gt;currentLine&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; pos: view.&lt;span style=&quot;color: #006600;&quot;&gt;currentPos&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; anchor: view.&lt;span style=&quot;color: #006600;&quot;&gt;anchor&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;pre class=&quot;geshi-plain&quot;&gt;if (typeof(window.ppd)==&#039;undefined&#039;) {
    window.ppd = [];
}

var view = ko.views.manager.currentView;
window.ppd.push({
    path: view.document.file ? view.document.file.URI:view.document.displayPath,
    line: view.currentLine,
    pos: view.currentPos,
    anchor: view.anchor
});&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;popd:&lt;/p&gt;
&lt;div class=&quot;geshi-block&quot;&gt;
&lt;div class=&quot;geshifilter javascript&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;==&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;undefined&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt; = &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; os = Components.&lt;span style=&quot;color: #006600;&quot;&gt;classes&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&amp;quot;@activestate.com/koOs;1&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;createInstance&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CC0000;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; m = window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;pop&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;!m&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;break&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #009900; font-style: italic;&quot;&gt;// get the view via the manager&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; v = ko.&lt;span style=&quot;color: #006600;&quot;&gt;views&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;manager&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;getViewForURI&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;m.&lt;span style=&quot;color: #006600;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #009900; font-style: italic;&quot;&gt;// no view, maybe an unsaved new file?&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;!v&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v = ko.&lt;span style=&quot;color: #006600;&quot;&gt;views&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;manager&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;getUntitledView&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;m.&lt;span style=&quot;color: #006600;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #009900; font-style: italic;&quot;&gt;// no view, can we open it?&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;!v &amp;amp;&amp;amp; os.&lt;span style=&quot;color: #006600;&quot;&gt;path&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;exists&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;m.&lt;span style=&quot;color: #006600;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v= ko.&lt;span style=&quot;color: #000066;&quot;&gt;open&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;URI&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;m.&lt;span style=&quot;color: #006600;&quot;&gt;path&lt;/span&gt; +&lt;span style=&quot;color: #3366CC;&quot;&gt;&amp;quot;#&amp;quot;&lt;/span&gt; + m.&lt;span style=&quot;color: #006600;&quot;&gt;line&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;v&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v.&lt;span style=&quot;color: #006600;&quot;&gt;makeCurrent&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v.&lt;span style=&quot;color: #006600;&quot;&gt;currentPos&lt;/span&gt; = m.&lt;span style=&quot;color: #006600;&quot;&gt;pos&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v.&lt;span style=&quot;color: #006600;&quot;&gt;anchor&lt;/span&gt; = m.&lt;span style=&quot;color: #006600;&quot;&gt;anchor&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #009900; font-style: italic;&quot;&gt;// we couldn&#039;t get a view for this, so go to the next one&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;geshi-plain&quot;&gt;if (typeof(window.ppd)==&#039;undefined&#039;) {
    window.ppd = [];
}

var os = Components.classes[&amp;quot;@activestate.com/koOs;1&amp;quot;].createInstance();

while (1) {
    var m = window.ppd.pop();
    if (!m) break;

    // get the view via the manager
    var v = ko.views.manager.getViewForURI(m.path);
    
    // no view, maybe an unsaved new file?
    if (!v)
        v = ko.views.manager.getUntitledView(m.path);

    // no view, can we open it?
    if (!v &amp;amp;&amp;amp; os.path.exists(m.path))
        v= ko.open.URI(m.path +&amp;quot;#&amp;quot; + m.line);

    if (v) {
        v.makeCurrent();
        v.currentPos = m.pos;
        v.anchor = m.anchor;
        break;
    }
    // we couldn&#039;t get a view for this, so go to the next one
}&lt;/pre&gt;&lt;/div&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 22:50:46 +0100</pubDate>
 <dc:creator>shanec</dc:creator>
 <guid isPermaLink="false">comment 5957 at http://community.activestate.com</guid>
</item>
<item>
 <title>&gt; would that re-open the</title>
 <link>http://community.activestate.com/forum-topic/push-pop-method-navigation#comment-5956</link>
 <description>&lt;p&gt;&amp;gt; would that re-open the file on calling:&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&amp;gt; ko.open.URI()&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&amp;gt; If I had closed? &lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 21:51:28 +0100</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 5956 at http://community.activestate.com</guid>
</item>
<item>
 <title>Nice!</title>
 <link>http://community.activestate.com/forum-topic/push-pop-method-navigation#comment-5955</link>
 <description>&lt;p&gt;Thanks guys. This is a great starting point. I like the view.displayPath suggestion -- would that re-open the file on calling:&lt;/p&gt;
&lt;p&gt;ko.open.URI()&lt;/p&gt;
&lt;p&gt;If I had closed? That&#039;s something that SlickEdit would do as you traversed backwards through the stack.&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 20:55:57 +0100</pubDate>
 <dc:creator>IRC</dc:creator>
 <guid isPermaLink="false">comment 5955 at http://community.activestate.com</guid>
</item>
<item>
 <title>Or you could just save the</title>
 <link>http://community.activestate.com/forum-topic/push-pop-method-navigation#comment-5954</link>
 <description>&lt;p&gt;Or you could just save the view.displayPath and the line number and use&lt;/p&gt;
&lt;p&gt;  ko.open.URI(displayPath + &quot;#&quot; + lineNumber);&lt;/p&gt;
&lt;p&gt;No reference to the view.&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 20:53:06 +0100</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 5954 at http://community.activestate.com</guid>
</item>
<item>
 <title>side affects</title>
 <link>http://community.activestate.com/forum-topic/push-pop-method-navigation#comment-5953</link>
 <description>&lt;p&gt;Btw, that is a quick hack, and it has problems.  Keeping a reference to a view will cause problems if you have pushed a position onto the stack, then close the view.  A third macro could trigger on file closing to ensure that the ppd array does not contain the view being closed.&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 20:48:17 +0100</pubDate>
 <dc:creator>shanec</dc:creator>
 <guid isPermaLink="false">comment 5953 at http://community.activestate.com</guid>
</item>
<item>
 <title>pushd/popd</title>
 <link>http://community.activestate.com/forum-topic/push-pop-method-navigation#comment-5952</link>
 <description>&lt;p&gt;Here&#039;s a simple pushd/popd implementation, if I understand the required functionality correctly.  It consists of two seperate macro&#039;s that need to be added to the toolbox.  You can then bind keys to the macro&#039;s.  I haven&#039;t tested this deeply, but seems to work.&lt;/p&gt;
&lt;p&gt;pushd:&lt;/p&gt;
&lt;div class=&quot;geshi-block&quot;&gt;
&lt;div class=&quot;geshifilter javascript&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;==&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;undefined&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt; = &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; view: ko.&lt;span style=&quot;color: #006600;&quot;&gt;views&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;manager&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;currentView&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; position: ko.&lt;span style=&quot;color: #006600;&quot;&gt;views&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;manager&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;currentView&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;currentPos&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;pre class=&quot;geshi-plain&quot;&gt;if (typeof(window.ppd)==&#039;undefined&#039;) {
    window.ppd = [];
}

window.ppd.push({
    view: ko.views.manager.currentView,
    position: ko.views.manager.currentView.currentPos
});&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;popd:&lt;/p&gt;
&lt;div class=&quot;geshi-block&quot;&gt;
&lt;div class=&quot;geshifilter javascript&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;==&lt;span style=&quot;color: #3366CC;&quot;&gt;&#039;undefined&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt; = &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; m = window.&lt;span style=&quot;color: #006600;&quot;&gt;ppd&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;pop&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
m.&lt;span style=&quot;color: #006600;&quot;&gt;view&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;scimoz&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;currentPos&lt;/span&gt; = m.&lt;span style=&quot;color: #006600;&quot;&gt;position&lt;/span&gt;;&lt;br /&gt;
m.&lt;span style=&quot;color: #006600;&quot;&gt;view&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;makeCurrent&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;pre class=&quot;geshi-plain&quot;&gt;if (typeof(window.ppd)==&#039;undefined&#039;) {
    window.ppd = [];
}

var m = window.ppd.pop();
m.view.scimoz.currentPos = m.position;
m.view.makeCurrent();&lt;/pre&gt;&lt;/div&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 20:46:01 +0100</pubDate>
 <dc:creator>shanec</dc:creator>
 <guid isPermaLink="false">comment 5952 at http://community.activestate.com</guid>
</item>
<item>
 <title>Thanks shanec.
I just tried</title>
 <link>http://community.activestate.com/forum-topic/push-pop-method-navigation#comment-5951</link>
 <description>&lt;p&gt;Thanks shanec.&lt;/p&gt;
&lt;p&gt;I just tried playing around with transient marks and they&#039;re not quite what I&#039;m looking for. They don&#039;t seem to work between files:&lt;/p&gt;
&lt;p&gt;If I set transient mark 1 in file 1 and transient mark 2 in file 2 then move to file 3 and select Code -&amp;gt; Marks -&amp;gt; Move to Previous Mark it doesn&#039;t take me back to the mark 2 in file 2. Pity.&lt;/p&gt;
&lt;p&gt;Bookmarks suffer the same problem: they only work within a file.&lt;/p&gt;
&lt;p&gt;This is definitely a step closer to what I&#039;m looking for. I can see how to implement a macro that does what I want. If transient marks worked between files:&lt;/p&gt;
&lt;p&gt;push_method_macro:&lt;br /&gt;
 - set transient mark&lt;br /&gt;
 - goto definition&lt;/p&gt;
&lt;p&gt;pop_method_macro:&lt;br /&gt;
 - move to previous mark&lt;/p&gt;
&lt;p&gt;Or if bookmarks worked between files:&lt;/p&gt;
&lt;p&gt;push_method_macro:&lt;br /&gt;
 - set bookmark&lt;br /&gt;
 - goto defintion&lt;/p&gt;
&lt;p&gt;pop_method_macro:&lt;br /&gt;
 - previous bookmark&lt;br /&gt;
 - unset bookmark&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 20:25:36 +0100</pubDate>
 <dc:creator>IRC</dc:creator>
 <guid isPermaLink="false">comment 5951 at http://community.activestate.com</guid>
</item>
<item>
 <title>re: interactive shell</title>
 <link>http://community.activestate.com/forum-topic/external-logging-debugger-crashes-komodo-4-4-python-2-5#comment-5950</link>
 <description>&lt;p&gt;The logLevel setting is just to control how verbose the dbgp client internals are, they do not affect the debugger operation (or should not).&lt;/p&gt;
&lt;p&gt;When you hit a breakpoint, i.e. on &quot;client.brk()&quot;, you can enter the interactive mode by the following methods:&lt;br /&gt;
* using the menu &quot;Debug-&amp;gt;Interact&quot;&lt;br /&gt;
* on the debugging tab &quot;Debug: ...&quot;, there is an &quot;&amp;gt;&amp;gt;&quot; icon, which you can press to enter the interactive shell mode&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt; The stdout handle is protected by wsgi, so normal interaction like printing variables will not work in the expected manner. You can do something tricky like &quot;sys.stdout = sys.stderr&quot; and then general stdout goes to stderr, which is visible in the Komodo interact console.&lt;/p&gt;
&lt;p&gt;Also, you should be able to see all the local variables in the &quot;Locals&quot; tab on the left side of the debugger tab and examine the contents.&lt;/p&gt;
&lt;p&gt;Is that what your after?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Todd&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 20:09:00 +0100</pubDate>
 <dc:creator>ToddW</dc:creator>
 <guid isPermaLink="false">comment 5950 at http://community.activestate.com</guid>
</item>
<item>
 <title>Two possibilities...</title>
 <link>http://community.activestate.com/forum-topic/push-pop-method-navigation#comment-5949</link>
 <description>&lt;p&gt;Komodo has transient marks, which may provide a usable alternative to pop/push marking.  See the code-&amp;gt;marks menu.  There is also a go to definition available, in the code menu and the buffer context menu.  These are all bind-able to keys if they are not already bound.&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 19:50:07 +0100</pubDate>
 <dc:creator>shanec</dc:creator>
 <guid isPermaLink="false">comment 5949 at http://community.activestate.com</guid>
</item>
<item>
 <title>Todd,
I get the exact same</title>
 <link>http://community.activestate.com/forum-topic/external-logging-debugger-crashes-komodo-4-4-python-2-5#comment-5948</link>
 <description>&lt;p&gt;Todd,&lt;/p&gt;
&lt;p&gt;I get the exact same results except I dont see the Python Shell show up which I thought would show up because of the logging.DEBUG.&lt;/p&gt;
&lt;p&gt;I would like it when it stops to use the Python Shell so I can type python commands to help with debugging. Maybe this feature is not available. &lt;/p&gt;
&lt;p&gt;How can I start the Python Shell while debugging and have it access the current environment (E.g. application variables)&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 19:40:55 +0100</pubDate>
 <dc:creator>wyattbiker</dc:creator>
 <guid isPermaLink="false">comment 5948 at http://community.activestate.com</guid>
</item>
<item>
 <title>Definitely interested!</title>
 <link>http://community.activestate.com/forum-topic/localizing-komodo-using-babelzilla-dream-team#comment-5947</link>
 <description>&lt;p&gt;Davide,&lt;/p&gt;
&lt;p&gt;We (or at least *I* :) are very interested. I&#039;d love to see Komodo Edit localized (and Komodo IDE too, if things allow) and am willing to help where I can.&lt;/p&gt;
&lt;p&gt;I&#039;m not familiar with how the babelzilla process works so I don&#039;t know the best way to proceed right now.&lt;/p&gt;
&lt;p&gt;All the localization files for Komodo Edit are here (*.dtd and *.properties files):&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk/src/chrome/komodo/locale/en-US&quot; title=&quot;http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk/src/chrome/komodo/locale/en-US&quot;&gt;http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk/src/chrome/...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are some possibilities:&lt;br /&gt;
- We could create an area in svn.openkomodo.com where localizers would have checkin access to add localization. I&#039;d want that area to be *outside* of the openkomodo/trunk area to make sure there is no interference with the Komodo Edit release process. The natural place is probably starting new addons for language packs under here: &lt;a href=&quot;http://svn.openkomodo.com/openkomodo/browse/addons&quot; title=&quot;http://svn.openkomodo.com/openkomodo/browse/addons&quot;&gt;http://svn.openkomodo.com/openkomodo/browse/addons&lt;/a&gt;&lt;br /&gt;
- Or we could look at having some tool to package up the en-US (and other locales) however the babelzilla process needs it to help the localization.&lt;/p&gt;
&lt;p&gt;Regarding licensing: What license do babelzilla translations usual fall under? Is it a Creative Commons license or something like that? Are there restrictions on the usage of translations in commercial products?&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 19:34:24 +0100</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 5947 at http://community.activestate.com</guid>
</item>
<item>
 <title>re: how is the brk statement failing?</title>
 <link>http://community.activestate.com/forum-topic/external-logging-debugger-crashes-komodo-4-4-python-2-5#comment-5946</link>
 <description>&lt;p&gt;When testing this code myself, everything seemed to be working as expected. Once the client.brk() call is hit:&lt;br /&gt;
* Komodo requests the user to accept the debugger session&lt;br /&gt;
* the Komodo debugger is now stopped at the line &quot;a = range(3)&quot;&lt;br /&gt;
* stepping over the code (F10) works fine until the third iteration, when the exception is generated, which wsgi then handles in the Python c-compiled mod_wsgi module.&lt;br /&gt;
* the browser display a &quot;Internal Server Error&quot; as expected&lt;/p&gt;
&lt;p&gt;Is that somehow different from your experience?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Todd&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 19:28:01 +0100</pubDate>
 <dc:creator>ToddW</dc:creator>
 <guid isPermaLink="false">comment 5946 at http://community.activestate.com</guid>
</item>
<item>
 <title>Hi Todd,
Understood about</title>
 <link>http://community.activestate.com/forum-topic/external-logging-debugger-crashes-komodo-4-4-python-2-5#comment-5945</link>
 <description>&lt;p&gt;Hi Todd,&lt;/p&gt;
&lt;p&gt;Understood about the brkOnException. I am not talking about the exception though. If you look at my code above its the normal brk that fails.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 19:14:26 +0100</pubDate>
 <dc:creator>wyattbiker</dc:creator>
 <guid isPermaLink="false">comment 5945 at http://community.activestate.com</guid>
</item>
<item>
 <title>re: exception handling</title>
 <link>http://community.activestate.com/forum-topic/external-logging-debugger-crashes-komodo-4-4-python-2-5#comment-5944</link>
 <description>&lt;p&gt;Komodo&#039;s exception (brkOnExcept) handling is hooked into the Python interpreter&#039;s &quot;sys.excepthook&quot;. This &quot;sys.excepthook&quot; code is not reached by the interpreter though as wsgi is handling the exception before it gets there.&lt;/p&gt;
&lt;p&gt;Thus Komodo does not get any feedback of an exception, nor does it get any further feedback from wsgi... (this is likely in the wsgi Python binary module, so there is no possibility to debug this part).&lt;/p&gt;
&lt;p&gt;If you run the same wsgi code without the Komodo debugger, you should get the same result.&lt;/p&gt;
&lt;p&gt;As far as I can see, there would need to be specific hooks added in to the wsgi module to handle the debugging of exceptions.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Todd&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 18:37:26 +0100</pubDate>
 <dc:creator>ToddW</dc:creator>
 <guid isPermaLink="false">comment 5944 at http://community.activestate.com</guid>
</item>
<item>
 <title>Hi Todd,</title>
 <link>http://community.activestate.com/forum-topic/external-logging-debugger-crashes-komodo-4-4-python-2-5#comment-5943</link>
 <description>&lt;p&gt;Hi Todd,&lt;/p&gt;
&lt;p&gt;Now it doesn&#039;t crash on the client.brk, but a) it doesn&#039;t open the Interactive Shell b) if I single step crashes the debugger on the 3rd iteration of the code below insteaqd of producing error.&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;# Single steps but crashes debugger on 3rd iteration when called externally
client.brk(host=&quot;localhost&quot;, port=9000, logLevel=logging.DEBUG)
a = range(3)
for i in a:
    print a[i+1]&lt;/pre&gt;&lt;p&gt;
Here is my version of Komodo that I upgraded to last week.&lt;br /&gt;
Komodo IDE, version 4.4.0, build 20211, platform win32-x86.&lt;br /&gt;
Built on Mon Jun 23 17:34:19 2008.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
</description>
 <pubDate>Thu, 03 Jul 2008 16:00:14 +0100</pubDate>
 <dc:creator>wyattbiker</dc:creator>
 <guid isPermaLink="false">comment 5943 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
