class WatchesView : Window
{
visible = false;
- text = "Watches";
+ text = $"Watches";
borderStyle = sizable;
background = { 224, 224, 224 };
hasClose = true;
return true;
}
};
- DataField expressionField { "char *", true, width = 130, header = "Expression" };
- DataField typeField { "Type", false, width = 180, header = "Type" };
- //DataField addressField { "char *", true, width = 80, header = "Symbol Address" };
- DataField valueField { class(WatchMultiLineString), true, width = 330, header = "Value" };
+ DataField expressionField { "char *", true, width = 130, header = $"Expression" };
+ DataField typeField { "Type", false, width = 180, header = $"Type" };
+ //DataField addressField { "char *", true, width = 80, header = $"Symbol Address" };
+ DataField valueField { class(WatchMultiLineString), true, width = 330, header = $"Value", freeData = false };
WatchesView()
{
return true;
}
- bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
- {
- if(active)
- {
- //listBox.SelectRow(listBox.firstRow);
- ide.RepositionWindows(false);
- }
- return true;
- }
-
bool OnClose(bool parentClosing)
{
visible = false;
void Show()
{
visible = true;
+ ide.RepositionWindows(false);
Activate();
}
void AddWatch(Watch wh)
{
DataRow row = listBox.AddRowAfter(listBox.lastRow.previous);
- row.tag = (int)wh;
+ row.tag = (int64)wh;
wh.row = row;
UpdateWatch(wh);
}
row.SetData(expressionField, null);
row.SetData(typeField, null);
row.SetData(valueField, null);
+ if(ide.workspace)
+ {
+ for(w : ide.workspace.watches)
+ w.row = null;
+ }
}
}
char * string = this;
char actualString[8196];
int c, len = 0;
- for(c = 0; (ch = string[c]); c++)
+ for(c = 0; (ch = string[c]) && len < sizeof(actualString)-1; c++)
{
if(ch == '\t') { actualString[len++] = '\\'; actualString[len++] = 't'; }
else if(ch == '\r') { actualString[len++] = '\\'; actualString[len++] = 'r'; }
else actualString[len++] = ch;
}
actualString[len] = 0;
- class(String)._vTbl[__ecereVMethodID_class_OnDisplay](class(String), actualString, surface, x, y, width, null, alignment, displayFlags);
+ ((void (*)(void *, void *, void *, int, int, int, void *, uint, uint))(void *)class(String)._vTbl[__ecereVMethodID_class_OnDisplay])(class(String), actualString, surface, x, y, width, null, alignment, displayFlags);
}
}
};