Skip to content

Commit

Permalink
removed KVC methods and replaced initialize with init; still not work…
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Dec 30, 2008
1 parent d379cda commit 87d7af0
Showing 1 changed file with 3 additions and 29 deletions.
32 changes: 3 additions & 29 deletions RaiseMan/StaffList.rb
Expand Up @@ -9,42 +9,16 @@
class StaffList < NSDocument
attr_accessor :employees

def initialize
def init
@employees = []
super
end

def employees=(newEmployees)
return if @employees == newEmployees
@employees = newEmployees
end

# for reading

def countOfEmployees
@employees.length
end

def objectInEmployeesAtIndex(i)
@employees[i]
end

# for writing

def insertObject(object, inEmployeesAtIndex:i)
@employees[i,0] = object
end

def removeObjectFromEmployeesAtIndex(i)
@employees.delete_at(i)
end

# you can also implement:

def replaceObjectInEmployeesAtIndex(i, withObject:object)
@employees[i, 1] = object
end



def windowNibName
# Implement this to return a nib to load OR implement
# -makeWindowControllers to manually create your controllers.
Expand Down

0 comments on commit 87d7af0

Please sign in to comment.