rework binary code positioning setup

dependency chain set up explicitly.
Next have to react to events correctly
This commit is contained in:
Torsten Ruger
2018-06-02 17:29:38 +03:00
parent 91c7903848
commit 3bc35c2275
5 changed files with 30 additions and 9 deletions

View File

@ -72,6 +72,7 @@ module Risc
at += code.padded_length unless at < 0
code = code.next
end
position
end
end
end

View File

@ -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)