lib/abstract_preferences.rb
def string_array_defaults_accessor(name, default_value, wrapper_class_name)
        wrapper = eval("class ::#{wrapper_class_name} < StringArrayWrapper; self end")
        wrapper.key_path = defaults_accessor(name, default_value)
        
        class_eval do
          define_method("#{name}_wrapped") do
            ary = []
            send(name).each_with_index { |string, index| ary << wrapper.alloc.initWithString_index(string, index) }
            ary
          end
        end
      end
# Besides defining a reader and writer method via defaults_accessor,
# it also defines a reader method which returns an array of strings
# wrapped in KVO compatible string wrappers.
#
# The name of the wrapper class is defined by <tt>wrapper_class_name</tt>
# and can be used as the `Class Name' of a NSArrayController.
# The wrapper exposes `string' as a KVC accessor to which a NSTableColumn can be bound.
#
#   # Defines #highlight_words, #highlight_words=, and #highlight_words_wrapped
#   string_array_defaults_accessor :highlight_words, [], 'HighlightWordWrapper'
Besides defining a reader and writer method via defaults_accessor,
it also defines a reader method which returns an array of strings
wrapped in KVO compatible string wrappers.

The name of the wrapper class is defined by wrapper_class_name
and can be used as the `Class Name' of a NSArrayController.
The wrapper exposes `string' as a KVC accessor to which a NSTableColumn can be bound.


Besides defining a reader and writer method via defaults_accessor it also defines a reader method which returns an array of strings wrapped in KVO compatible string wrappers . The name of the wrapper class is defined by wrapper_class_name and can be used as the ` Class Name ' of a NSArrayController . The wrapper exposes ` string ' as a KVC accessor to which a NSTableColumn can be bound .
def string_array_defaults_accessor(name, default_value, wrapper_class_name)
        wrapper = eval("class ::#{wrapper_class_name} < StringArrayWrapper; self end")
        wrapper.key_path = defaults_accessor(name, default_value)
        class_eval do
          define_method("#{name}_wrapped") do
            ary = []
            send(name).each_with_index { |string, index| ary << wrapper.alloc.initWithString_index(string, index) }
            ary
          end
        end
      end
def string_array_defaults_accessor ( name , default_value , wrapper_class_name ) wrapper = eval ( "class ::#{wrapper_class_name} < StringArrayWrapper; self end" ) wrapper . key_path = defaults_accessor ( name , default_value ) class_eval do define_method ( "#{name}_wrapped" ) do ary = [ ] send ( name ) . each_with_index { | string , index | ary << wrapper . alloc . initWithString_index ( string , index ) } ary end end end
Besides defining a reader and writer method via defaults_accessor,
it also defines a reader method which returns an array of strings
wrapped in KVO compatible string wrappers.
Besides defining a reader and writer method via defaults_accessor it also defines a reader method which returns an array of strings wrapped in KVO compatible string wrappers .
name
default_value
wrapper_class_name