[ZeroBrane Studio] Re: Help: how do you show a character limit line?

  • From: Rob Probin <rob.probin@xxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Tue, 27 Aug 2013 09:50:48 +0100

GetConfig is not a member of self. Commenting out "= self:GetConfig()" stops 
the error and the line appears. 

On 27 Aug 2013, at 08:22, Rob Probin <rob.probin@xxxxxxxxx> wrote:

> Thanks for this. I also like to have an 80 column mark. 
> 
> On 27 Aug 2013, at 00:21, Paul K <paul@xxxxxxxxxxxxx> wrote:
> 
>> Hi Mike,
>> 
>>> Thanks for the plugin! Small issue: self:GetConfig is nil. I probably 
>>> goofed up some settings elsewhere.
>> 
>> No, it's my fault; here is the correct version:
>> 
>> return {
>> name = "Mark edge plugin",
>> description = "Marks column edge for long lines.",
>> author = "Paul Kulchenko",
>> 
>> onEditorLoad = function(self, editor)
>>   local config = self:GetConfig()
>>   editor:SetEdgeMode(wxstc.wxSTC_EDGE_LINE)
>>   editor:SetEdgeColumn(config and config.column or 80)
>>   if config and config.color then
>>     editor:SetEdgeColour(wx.wxColour((table.unpack or unpack)(config.color)))
>>   end
>> end,
>> }
>> 
>>> Otherwise, the plugin (using hard-coded location and color) works perfectly.
>> 
>> Good; please let me know if you need anything else.
>> 
>> Paul.
>> 

Other related posts: