I have a few subroutines (some are quite long) that will be used in several activities. Currently, I am simply copying/pasting/editing them from the b4ppc version of my application into the needed activity. There has to be a better way.
I am confused by the documentation for "Callsub". I experimented with some simple subroutines that do nothing more than call for a msgbox but they don't work. For example I have an activity named "input" and another named "curves". I put a sub named 'test' in the 'input' activity like this:
sub test
msgbox("hello","message")
end sub
then in the curves 'btnOK_click' event I put:
sub btnOK_click
Callsub(input,"test")
end sub
Nothing happened or no error warning.
kickaha coded an example for me how to retrieve a sub routine from a Code module but I have not been able to duplicate it with any of my more complex routines. According to the documentation, you are not supposed to be able to use the code module like this but I was hopeful the callsub would work between activities.
I don't understand how log (x) works. Again I tried a simple experiment like shown in the docs:
For i = 1 to 10
log(i)
next
then looked in the 'logs' in the lower right of the ide but could not see the result.
In both cases perhaps the code skipped over it although it was placed where it should have been recognized. I am a 'sledgehammer' type of guy who will use whatever works so I can live with what I am doing but I would really like to use a carpenter's hammer once in a while. i appreciate all of you.
Jim Schuchert
I am confused by the documentation for "Callsub". I experimented with some simple subroutines that do nothing more than call for a msgbox but they don't work. For example I have an activity named "input" and another named "curves". I put a sub named 'test' in the 'input' activity like this:
sub test
msgbox("hello","message")
end sub
then in the curves 'btnOK_click' event I put:
sub btnOK_click
Callsub(input,"test")
end sub
Nothing happened or no error warning.
kickaha coded an example for me how to retrieve a sub routine from a Code module but I have not been able to duplicate it with any of my more complex routines. According to the documentation, you are not supposed to be able to use the code module like this but I was hopeful the callsub would work between activities.
I don't understand how log (x) works. Again I tried a simple experiment like shown in the docs:
For i = 1 to 10
log(i)
next
then looked in the 'logs' in the lower right of the ide but could not see the result.
In both cases perhaps the code skipped over it although it was placed where it should have been recognized. I am a 'sledgehammer' type of guy who will use whatever works so I can live with what I am doing but I would really like to use a carpenter's hammer once in a while. i appreciate all of you.
Jim Schuchert