// This class is a special Dispatch Object that causes the current display stack/thread
// to stop at once and return/abort. If and ony if the stackframe # is 1 or higher. 

public class Abort extends Dispatch
{
Gob destroyGob;
Abort()
{
  // this(HyperView.getCurView());
}

Abort(HyperView tView,Gob tGob)
{
this(tView);
   destroyGob = tGob;
}

Abort(HyperView tView)
{
   flags = ABORT_ENA|INHERIT_ALL;
   //System.out.println("1*** Abort(HyperView tView).flags = "+Integer.toHexString(flags));
   curView = tView;
}
           // You can call this but it wont do anything.
public boolean begin(HyperView tView)
{
   if(destroyGob != null)
   {
      //destroyGob.gobFlags  &= ~HyperConstants.GOB_ON_DISPLAY;
      destroyGob.gobFlags2 |= HyperConstants.GOB_DESTROY;
   }
   else
   {
      System.out.println("destroyGob == null");
   }
   if((tView.listFlags & HyperConstants.POPUP_NOABORT)==0 && (tView.runStack > 0))
   {
     //System.out.println("   Abort.begin(HyperConstants.POPUP_NOABORT)==0) -><- -><- ABORT!"+tView.runStack);
      return false;
   }
   else
   {

      /*System.out.println("   ! Abort.begin(HyperConstants.POPUP_NOABORT)=="
      +(tView.listFlags & HyperConstants.POPUP_NOABORT)+") -><- -><- NO ABORT!!! "+tView.runStack);*/
      return true;
   }

}

}





