insertion pushes, split position tests
This commit is contained in:
@ -69,10 +69,17 @@ module Risc
|
||||
return int if int == self.at
|
||||
Position.set_to(self , int)
|
||||
@at = int
|
||||
trigger(:position_changed , self )
|
||||
trigger_changed
|
||||
int
|
||||
end
|
||||
|
||||
# helper to fire the event that the position changed
|
||||
# Note: set checks if the position actually has changed, before fireing
|
||||
# but during insert it is helpful to trigger just to set the next
|
||||
def trigger_changed
|
||||
trigger(:position_changed , self )
|
||||
end
|
||||
|
||||
def trigger_inserted
|
||||
event_table[:position_changed].each { |handler| handler.position_inserted( self) }
|
||||
end
|
||||
|
Reference in New Issue
Block a user