Posted 17 years ago
by Jake Pearson
-
Software Developer,
Alion Science and Technology
Version: 4.0.0258
Platform: .NET 2.0
Environment: Windows Vista (32-bit)
Hi,
We found an issue in the horizontal scroll bar where it will flickers on and off. It happens if a syntax editor's ScrollBarType is set to Both and the text in the editor has lines that are wider and narrower than the size of the control. To recreate it, you can the scroll bar type to Both on the "CodeFragmentsForm" of the test application. Launch the app. Paste the code at the bottom of this post into the editor (most any text will do, I just know this one will cause it to happen. Scroll down towards the bottom by mouse dragging on the vertical scroll. Keep the mouse held down and near the bottom you should be able to find an area where the flicker will occur. I think one easy fix would change the horizontal scroll so it treats the text in the control as rectangular instead of jagged as it is right now. That way the scroll bar wouldn't change during a vertical scroll.
thanks,
Jake
We found an issue in the horizontal scroll bar where it will flickers on and off. It happens if a syntax editor's ScrollBarType is set to Both and the text in the editor has lines that are wider and narrower than the size of the control. To recreate it, you can the scroll bar type to Both on the "CodeFragmentsForm" of the test application. Launch the app. Paste the code at the bottom of this post into the editor (most any text will do, I just know this one will cause it to happen. Scroll down towards the bottom by mouse dragging on the vertical scroll. Keep the mouse held down and near the bottom you should be able to find an area where the flicker will occur. I think one easy fix would change the horizontal scroll so it treats the text in the control as rectangular instead of jagged as it is right now. That way the scroll bar wouldn't change during a vertical scroll.
thanks,
Jake
// initialize counters
wcRestart = 0;
ArrayList OperatorList = new ArrayList(); for (int y = 0; y < NumOps; y++) {
ArrayList OperatorSuspendedTaskList = new ArrayList();
for (int z = 0; z < SuspTskOpList[y].Count; z++)
{
int task = (int)SuspTskOpList[y][z];
OperatorSuspendedTaskList.Add(task);
//Model.Message("running task = " +TaskMSStringIDLookup(task));
}
OperatorList.Add(OperatorSuspendedTaskList);
}
ArrayList TaskList = (ArrayList)OperatorList[optr];
if ((Clock >= 15) && (optr == 0))
{
Model.PrintOutput("RESUMEWL : " + "list count=" +
TaskList.Count + " " + "optr : " + optr + "Clock: " + Clock);
}
for (i = 0; i < TaskList.Count; i++)
{
wcTaskCnt = (int)TaskList[i];
if (wcSeqFlag[wcTaskCnt] == false)
{
if ((ts[wcTaskCnt, 0] == 2) && (ts[wcTaskCnt, 1] == wcResumeOp) && (curgolstatus[goalparent[wcTaskCnt]] != 2))
{
//wcRestart=1; I have commented it out cos this is
//the only place it is set to 1 and I am not sure what it's purpose is.
rpttask = wcTaskCnt;
TaskIDname = TaskMSStringIDLookup(rpttask);
rptstart = 3;
rptstrat = 6;
rptstring = "Resumed";
wcNumTasks[ts[wcTaskCnt, 1]]++;
WkTskOpList[ts[wcTaskCnt, 1]].Add(wcTaskCnt);
tempnumtask = wcNumTasks[wcResumeOp];
listcount = WkTskOpList[wcResumeOp].Count;
ts[wcTaskCnt, 0] = 1;
suspendtask[wcTaskCnt] = 0;
idcounter[wcTaskCnt] = 0;
ts[wcTaskCnt, 1] = wcResumeOp;
rptop = ts[wcTaskCnt, 1];
optr = rptop;
CREWWORK();
rptwkld = wkld[rptop];
if (Model.RunNumber == 1)
{
Model.TriggerSnapshot("RptTask");
}
Model.Resume("ID", TaskMSStringIDLookup(wcTaskCnt));
SuspTskOpList[wcResumeOp].RemoveAt(i);
}
// task is marked to be stopped and belongs to this operator, so take a picture
// of the status for the rpttask snapshot and start it
if ((ts[wcTaskCnt, 0] == 3) && (ts[wcTaskCnt, 1] == wcResumeOp) && (curgolstatus[goalparent[wcTaskCnt]] != 2))
{
wcRestart = 0;
rpttask = wcTaskCnt;
TaskIDname = TaskMSStringIDLookup(rpttask);
rptstart = 4;
rptstrat = 6;
rptstring = "Restarted";
tempnumtask = wcNumTasks[wcResumeOp];
idcounter[wcTaskCnt] = 0;
//RptTask snapshot taken for task restarted
if (Model.RunNumber == 1)
{
Model.TriggerSnapshot("RptTask");
}
SuspTskOpList[optr].RemoveAt(i);
Entity tempEnt = new Entity(Entity);
tempEnt.Opid = ts[wcTaskCnt, 1];
tempEnt.ID = TaskMSStringIDLookup(wcTaskCnt);
//Model.PrintOutput("trying to restart:" + tempEnt.ID);
Model.Start(tempEnt);
ts[wcTaskCnt, 0] = 1;
}
}
else
{
if (curgolstatus[goalparent[wcTaskCnt]] != 2)
{
//if(Clock>1.67)
//Model.Message("removing="+wcTaskCnt);
wcSeqFlag[wcTaskCnt] = false;
wcStratCFlag[wcTaskCnt] = false;
idcounter[wcTaskCnt] = 0;
SuspTskOpList[optr].RemoveAt(i);
//I am commenting out the snapshot. All though I take a snapshot I am not sure why a snapshot is needed here
//becuase if Strategy C flag is true,then the release condition is evaluated (because a model.start is done) where a snapshot is taken
//More over none of the rpt variables are assigned here making this snapshot wrong.
//if(Model.RunNumber==1)
//Model.TriggerSnapshot("RptTask");
//Model.Start(TaskMSStringIDLookup(wcTaskCnt),ts[wcTaskCnt,1]);
//It used to be the above line but that was starting multiple entities
//so needed to redo it in this way.
Entity tempEnt = new Entity(Entity);
tempEnt.Opid = ts[wcTaskCnt, 1];
tempEnt.ID = TaskMSStringIDLookup(wcTaskCnt);
Model.Start(tempEnt);
//Model.Message("i in the if cond="+i);
}
}
}
// reset the Task ID variable
//TaskID=wcTempTask;