Key Value Coding (KVC) example

Please share your functions/code-snips

Key Value Coding (KVC) example

Postby berndnoetscher » Thu Jul 08, 2010 10:50 am

Code: Select all
' global

Dim myInstance As ukBaseClass

Event Init()
  Dim myMuArray As Array = myInstance!myArray
  Alert("valueForKeyPath", myMuArray)

  myInstance!myArray = myMuArray 'setValue forkeypath
  Alert("valueForKeyPath", myInstance!myArray)
End Event

File ukBaseClass.NSObject
Code: Select all
' ukBaseClass

Private Dim myArray As Array

Function myArray() As NSMutableArray
  Alert("get my array",myArray)
  Return myArray
End Function

Sub setMyArray(theArray As NSMutableArray)
  Alert("set my array")
End Sub

Event Init()
End Event
Site Admin
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am

Return to Code examples (Xcode 3)

Who is online

Users browsing this forum: No registered users and 0 guests