Hi
I have an user defined method in one form. i have to call that method from another form. could anyone help me out?
Thanks
Raja
Hi
I have an user defined method in one form. i have to call that method from another form. could anyone help me out?
Thanks
Raja
Well. you will have to initialize the second form first. Only than can you call methods that belong to it.
Args args; // Args object
FormRun formRun; // FormRun object
Object fr;
;
// initialize Args object
args = new Args();
args.caller( this );
args.name( FormStr( CustTable ) ); //calling form CustTable
args.record( CustTable ); //passing a record of CustTable into the form
// create the form and run the method
formRun = ClassFactory.formRunClass( args );
formRun.init();
// formRun.run(); That’s if you wanted to run the form - you don’t want to do that, as far as I understand
// formRun.wait();
fr = formRun;
fr.myMethod();
Something like this