Sha256: 33eb40f1006a834f1e64310ea5f7cb9eb4fc5880804f17e905d5ce900e482eea

Contents?: true

Size: 387 Bytes

Versions: 45

Compression:

Stored size: 387 Bytes

Contents

class NSArray

  # @param type [Symbol] type A pointer type from the list at {http://www.rubymotion.com/developer-center/guides/runtime/ RubyMotion Pointers Reference#_pointers}
  # @return [Pointer] A pointer to the array, of the specified type
  def to_pointer(type)
    ret = Pointer.new(type, self.length)
    self.each_index do |i|
      ret[i] = self[i]
    end
    ret
  end

end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
sugarcube-2.0.1 lib/cocoa/sugarcube-pointer/nsarray.rb
sugarcube-2.0.0 lib/cocoa/sugarcube-pointer/nsarray.rb
sugarcube-1.7.0 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.6.3 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.6.2 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.6.1 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.6.0 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.9 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.8 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.7 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.6 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.5 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.4 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.3 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.2 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.1 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.5.0 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.4.6 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.4.5 lib/sugarcube-pointer/nsarray.rb
sugarcube-1.4.4 lib/sugarcube-pointer/nsarray.rb