Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle WebServer Basic -- Dialog Function -- How do I do this?
I was trying to use a dialog, and initialize some of its fields using
data from fields
from the form.
I read in the help that you can use a "dialog function" for that but the
example they gave was
so buggy and did not comply with their write-up (Example: they wrote that
you need to set the
function name to either 0 or 1 to tell the function if to stay in the
dialog or close it, but
instead used the line before the 'End Function' to set Oracle Basic = 1
!!! Is it valid? it
had nothing to do with the function's name! (which was not mentioned
within the function's code).
I understand from what I read so far you don't need to call the function,
that it is
automatically called when the dialog is initialized and whenever
something is happening
(clicked, for example) in the dialog, and that the only reference to the
function is to have its
name in the beginning of the dialog definition, like so:
Begin Dialog FooBar x,y,width,height,"Title",.functionName
But it doesn't seem to call it, at least from what I can tell when I turn
debugger on, and the
fact it doesn't do what its supposed to....
Please, if you know how to properly call the Dialog Function, or know where I can find that information, let me know at serri_at_exis.net Here is the barebone version of my .scr :
Sub Main
Begin Dialog Sample 100,100,170,60,"FooBar Sample Dialog", .Foo Text 10,10,130,14,"Enter the number of foos you want:" TextBox 145,10,15,14, .SomeNumber OKButton 35,35,40,14 CancelButton 95,35,40,14
IF nReturn = -1 then
DIM nSomeTotal AS Integer
' more code goes here, all ok
END IF
End Sub
FUNCTION Foo(ControlID$, Action%, SuppValue%)
' does not gets called, at all
If Action% = 1 then SomeNumber = SomeNumber + 1 End If