J
Jack Leach
I was wondering if anyone could advise on some sort of 'best practices' for
organizing the command procedures for various custom menus and toolbars.
I've done this by each command as a seperate public function to do what I
need, but its a lot of public functions to have laying around. I've done it
by having one public function and passing a long to it as a command ID, but
that's a lot of select case statements to go through in one function... not
the least bit efficient.
I'm now considering storing the cmd procedure in a table. One public
function with the cmd ID passed to it, a table lookup against the ID to pull
the required procedure, and then Eval to run the procedure, which could at
that point be private to the module. It seems like it would be well
structured with minimal overhead.
Any thoughts?
thanks,
--
Jack Leach
www.tristatemachine.com
"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
organizing the command procedures for various custom menus and toolbars.
I've done this by each command as a seperate public function to do what I
need, but its a lot of public functions to have laying around. I've done it
by having one public function and passing a long to it as a command ID, but
that's a lot of select case statements to go through in one function... not
the least bit efficient.
I'm now considering storing the cmd procedure in a table. One public
function with the cmd ID passed to it, a table lookup against the ID to pull
the required procedure, and then Eval to run the procedure, which could at
that point be private to the module. It seems like it would be well
structured with minimal overhead.
Any thoughts?
thanks,
--
Jack Leach
www.tristatemachine.com
"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)