on 07-21-2007 6:53 AM
In the wdDoModify () the method is static
public static void wdDoModify(){
checkTable();
}
public void checkTable(){
wdContext.currentContext.getEmpid();
}
ERROR : The method checkTable() is not static
after that i change to
public static void checkTable(){
wdContext.currentContext.getEmpid();
}
Error: cannot make static field to non-static field wdContext
Just pass parameter "wdContext" from method wdDoModifyView() to the static method:
public static void wdDoModifyView(...)
{
...
checkTable(wdContext, ...);
}
private static void checkTable(IPrivate<View>.IContextNode wdContext, ...)
{
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
From wdDomodify(),it is not possible.
Declaring a new method using standard control is also of same purpose.
So, create a new method and paste the code from the method inside
//@@begin others
//@@ end
Static method can access only static variables.U r getting the error because wdContext is a nonstatic variable and the static method u created inside
//@@begin others
//@@ end
is accessing that nonstatic variable(wdContext).
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Create method using new button in the method tab. Let the method name be test().
U can access this method from wdDomodifyView() by
wdThis.test()
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.