[ZeroBrane Studio] Re: Snippets Pane

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Fri, 26 Sep 2014 13:02:01 -0700

Hi Steve,

> Is what I’m attempting possible?

Should be possible, but I recommend using ide:AddPanel method;
everything in the src/package.lua is a public API and is much less
likely to change than using other (internal) functions/methods in ZBS.

You can use ide:AddPanel(tagCtrl, "tagpanel", "Tag") to add your
control a a panel.

> I didn’t see any mention of adding a new window so I attempted to duplicate 
> all > occurrences of the Watch pane by duplicating existing “Watch” related 
> items, > e.g. watchCtrl->tagCtrl, ID_ADDWATCH->ID_ADDTAG,

> I don’t understand why wx.wxEVT_COMMAND_MENU_SELECTED is no longer valid.

The reason you are getting this error is that you probably didn't
register ID_ADDTAG, ID_EDITTAG and other IDs. You need to create them
using "ID_ADDTAG = ID('mytagplugin.addtag')" code; the string you give
to ID() has to be unique, so it's recommended for it to include a
plugin name as a prefix.

I highly recommend to initially make any changes as a plugin. There is
a variety of API calls that can be used from plugins with about 50
plugins already in the repository
(https://github.com/pkulchenko/ZeroBranePackage) and I've integrated
ZBS with several products using plugin API (and I can extend it if
something is missing).

Paul.

Other related posts: