i need your help i am creating a line from a spesific location to mouse location with this code. after click i am trying to remove this line but i have no idea how please help me remove the live after click what should i change ?
stk:= (LineMorph from: 100@100 to: 1300@1300 color: Color red width: 2) openInWorld.
handle := HandleMorph new forEachPointDo: [:newPoint | stk setVertices: {whiteBallinHole position. (newPoint-(10@10)). }.
stk on: #mouseDown send: #value: to:[:evt|
evt redButtonPressed ifTrue:[ self handlesMouseDown: evt.
"DELETE THE STICK AFTER MOUSE CLICK THIS DOSNT WORK PLEASE HELP"
stk color: Color transparent.
stk delete.
""
].
].
].
" (self currentHand attachMorph: handle)."
" self currentHand addMorph:handle. "
self currentHand attachMorph:handle.