<?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 - Creating custom editor tab - Comments</title>
 <link>http://community.activestate.com/forum-topic/creating-custom-editor-tab</link>
 <description>Comments for &quot;Creating custom editor tab&quot;</description>
 <language>en</language>
<item>
 <title>a better example</title>
 <link>http://community.activestate.com/forum-topic/creating-custom-editor-tab#comment-5196</link>
 <description>&lt;p&gt;It&#039;s probably best to extend the &quot;views-editor&quot; binding. Try out this example, I think this may help you along:&lt;/p&gt;
&lt;p&gt;If you modify the diff view binding &quot;views-diff.unprocessed.xml&quot; as such:&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;-    extends=&quot;chrome://komodo/content/bindings/views-buffer.xml#view-buffer-base&quot;&amp;gt;
+    extends=&quot;chrome://komodo/content/bindings/views-editor.xml#view-editor&quot;&amp;gt;&lt;/pre&gt;&lt;p&gt;
Note: The &quot;views-diff&quot; binding is only currently used by the diff dialog (not for view diff in editor tab).&lt;/p&gt;
&lt;p&gt;Then open up a diff view in a Komodo editor tab like so:&lt;br /&gt;
ko.open.URI(&quot;/path_to_a_patch_or_diff_file.txt&quot;, &quot;diff&quot;);&lt;/p&gt;
&lt;p&gt;You&#039;ll have close to the functionality you need (i.e. you have the additional diff button toolbar) plus an editable scintilla view.&lt;/p&gt;
&lt;p&gt;Note that some functionality will be borked by this example (i.e. close buffer).&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Todd&lt;/p&gt;
</description>
 <pubDate>Fri, 25 Apr 2008 10:44:46 -0700</pubDate>
 <dc:creator>ToddW</dc:creator>
 <guid isPermaLink="false">comment 5196 at http://community.activestate.com</guid>
</item>
<item>
 <title>That info was very useful,</title>
 <link>http://community.activestate.com/forum-topic/creating-custom-editor-tab#comment-5194</link>
 <description>&lt;p&gt;That info was very useful, thanks. It seems that, yes, I want to create my own view binding (e.g. views-myextension.xml) but opening it in a browser view gives an undesirable navigation toolbar at the top of the page. I notice that the view manager and view bindings have functions such as newView or doNewView which open a new view of the requested type. Ideally I like to use the same technique, but how can I get the view manager to know about the new view type offered by my extension?&lt;/p&gt;
&lt;p&gt;I basically need something like views-diff.xml, but opening in a document tab rather than its own window - and also not read-only, which diff is.&lt;/p&gt;
&lt;p&gt;On a side note I had managed to get a new scintilla view insome cases but the editing area only allowed a sinlge line of text because the return key was not recognised. I presume this is something to do with bindings and the way scintilla is embedded as a plugin.&lt;/p&gt;
</description>
 <pubDate>Fri, 25 Apr 2008 06:52:58 -0700</pubDate>
 <dc:creator>basil_brush</dc:creator>
 <guid isPermaLink="false">comment 5194 at http://community.activestate.com</guid>
</item>
<item>
 <title>re: custom Komodo tab</title>
 <link>http://community.activestate.com/forum-topic/creating-custom-editor-tab#comment-5188</link>
 <description>&lt;p&gt;You&#039;ll need to create a custom Komodo view, similar to the view-xxx.xml bindings in:&lt;br /&gt;
&lt;a href=&quot;http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk/src/chrome/komodo/content/bindings&quot; title=&quot;http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk/src/chrome/komodo/content/bindings&quot;&gt;http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk/src/chrome/...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once the view is defined and the bindings (xml and css) are properly setup, you can then create new instances of the view using &quot;ko.open.URI(filepath, &#039;xxx&#039;)&quot;, where xxx would be the name of your binding, i.e. &quot;ko.open.URI(&#039;foo.html&#039;, &#039;browser&#039;)&quot;.&lt;/p&gt;
&lt;p&gt;The browser preview functionality will likely be the closest match to what you are after, as you can load chrome xul straight into this view by doing something like:&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;ko.open.URI(&#039;chrome://komodo/content/dialogs/authenticate.xul&#039;, &#039;browser&#039;);&lt;/pre&gt;&lt;p&gt;
Cheers,&lt;br /&gt;
Todd&lt;/p&gt;
</description>
 <pubDate>Thu, 24 Apr 2008 17:23:21 -0700</pubDate>
 <dc:creator>ToddW</dc:creator>
 <guid isPermaLink="false">comment 5188 at http://community.activestate.com</guid>
</item>
<item>
 <title>Creating custom editor tab</title>
 <link>http://community.activestate.com/forum-topic/creating-custom-editor-tab</link>
 <description>&lt;p&gt;Hello. I&#039;d like my extension to be able to create a new document tab for editing C code, but this code will be processed by my extension and not written to a file. In addition I would like a few extra GUI elements in the page area just above the document itself, mostly for displaying info such as function details and parameters. The editor in the tab needs to be komodo&#039;s editor so that all komodo&#039;s editing functionality is still there, so not just a plain xul textarea.&lt;/p&gt;
&lt;p&gt;If it was firefox I&#039;d just make a xul page, with GUI elements at the top and an editor tag, and open it in a new tab using the &quot;chrome://&quot; address. But how to do this in komodo? I looked in komodo.xul and noticed that the document area is a view tag, which I guess is associated with the xml objects in bindings folder. But I don&#039;t know xul well enough to understand it well.&lt;/p&gt;
&lt;p&gt;Is it possible to load xul into a view tab or will I have to hack komodo using script? Any commments on the best way to achieve this are greatly appreciated. Thanks.&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/creating-custom-editor-tab#comments</comments>
 <category domain="http://community.activestate.com/forums/komodo-extensions-0">Komodo Macros and Extensions</category>
 <category domain="http://community.activestate.com/os/linux">Linux</category>
 <pubDate>Sat, 12 Apr 2008 13:47:27 -0700</pubDate>
 <dc:creator>basil_brush</dc:creator>
 <guid isPermaLink="false">2194 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
