Sha256: 22eeadbb6168c1588ee141117572e52d3e750b2b544d9ab05ef34a4a9eac0f5f

Contents?: true

Size: 659 Bytes

Versions: 7

Compression:

Stored size: 659 Bytes

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.

module Wx

  module HTML

    class HtmlWindow

      # Need to override HtmlWindow.add_filter to provide cashing
      # for the added custom html filters to prevent premature GC
      class << self
        def html_filters
          @html_filters ||= []
        end
        private :html_filters

        wx_add_filter = instance_method(:add_filter)
        define_method(:add_filter) do |filter|
          html_filters << filter
          wx_add_filter.bind(self).call(filter)
        end
      end

    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wxruby3-0.9.7-x64-mingw-ucrt lib/wx/html/htmlwindow.rb
wxruby3-0.9.5-x64-mingw-ucrt lib/wx/html/htmlwindow.rb
wxruby3-0.9.4-x64-mingw-ucrt lib/wx/html/htmlwindow.rb
wxruby3-0.9.3-x64-mingw-ucrt lib/wx/html/htmlwindow.rb
wxruby3-0.9.2-x64-mingw-ucrt lib/wx/html/htmlwindow.rb
wxruby3-0.9.1-x64-mingw-ucrt lib/wx/html/htmlwindow.rb
wxruby3-0.9.0-x64-mingw-ucrt lib/wx/html/htmlwindow.rb