SlickEdit Community
SlickEdit Product Discussion => SlickEditĀ® => Slick-CĀ® Macro Programming => Topic started by: TKasparek on March 01, 2019, 08:33:31 PM
-
How do I call a class static member on a window?
class MyClass {
static void Foo(int bar) {
return;
}
};
void MyFunc() {
// This doesn't seem to work...
p_window_id.MyClass.Foo(1);
}
-
Yes, that is a bit of an ambiguity with Slick-C. It's a rare case. The best workaround is to change the active window and then call the method. "p_window_id" will persist as the active window in the class method.
orig_wid := p_window_id;
p_window_id = new_wid;
MyClass.Foo(1);
p_window_id = orig_wid;