rework binary code positioning setup
dependency chain set up explicitly. Next have to react to events correctly
This commit is contained in:
@ -72,6 +72,7 @@ module Risc
|
||||
at += code.padded_length unless at < 0
|
||||
code = code.next
|
||||
end
|
||||
position
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -40,6 +40,10 @@ module Risc
|
||||
trigger(:position_changed , self)
|
||||
true
|
||||
end
|
||||
def next_slot
|
||||
return -1 if at < 0
|
||||
at + object.byte_length
|
||||
end
|
||||
def self.init(object , at = -1)
|
||||
position = ObjectPosition.new(object , at)
|
||||
Position.set_to( position , at)
|
||||
|
Reference in New Issue
Block a user