teamakesmefart
Technical User
Hi All
I am using Paradox 9 and am having trouble calling a custom procedure from a library.
The library is called sisUtils and has a custom procedure called sqlDate in its Proc method like so:
Proc sqlDate(var inDate Date) String
blah
blah
return String(outDate)
endProc
This compiles OK.
From my calling form, I have placed the following in the Var method:
var
lib Library
endVar
In the calling form, I have placed the following in the Uses method:
Uses ObjectPAL
sqlDate (var inDate Date) String
endUses
The calling form has the following in its Open method:
method open(var eventInfo Event)
if eventInfo.isPreFilter() then
;// This code executes for each object on the form
else
;// This code executes only for the form
msgInfo("Opening", "Opening sisUtils library"
if lib.open("sisUtils" then
message("sisUtils library was opened successfully"
else
message("Unable to open the sisUtils library"
endif
endIf
endMethod
I then try to call the custom method in the pushButton event of a button on the calling form
method pushButton(var eventInfo Event)
var
inDate Date
outDate String
endVar
inDate = Date()
outDate = lib.sqlDate(inDate)
msgInfo("Return from sqlDate is ...", outDate)
endMethod
When I run the form, I get the msgInfo box saying that its trying to open the Library, and the status bar changes to say that the library was successfully opened (as per the form's Open method).
When I click on the button to instigate the call to the custom procedure, I get an error dialogue which says: "The method, 'SQLDate(var Date) String' is not visible from the object, '#Library1'.
Why?? Please, please help!!
Thanks in advance
Pete Wright
I am using Paradox 9 and am having trouble calling a custom procedure from a library.
The library is called sisUtils and has a custom procedure called sqlDate in its Proc method like so:
Proc sqlDate(var inDate Date) String
blah
blah
return String(outDate)
endProc
This compiles OK.
From my calling form, I have placed the following in the Var method:
var
lib Library
endVar
In the calling form, I have placed the following in the Uses method:
Uses ObjectPAL
sqlDate (var inDate Date) String
endUses
The calling form has the following in its Open method:
method open(var eventInfo Event)
if eventInfo.isPreFilter() then
;// This code executes for each object on the form
else
;// This code executes only for the form
msgInfo("Opening", "Opening sisUtils library"
if lib.open("sisUtils" then
message("sisUtils library was opened successfully"
else
message("Unable to open the sisUtils library"
endif
endIf
endMethod
I then try to call the custom method in the pushButton event of a button on the calling form
method pushButton(var eventInfo Event)
var
inDate Date
outDate String
endVar
inDate = Date()
outDate = lib.sqlDate(inDate)
msgInfo("Return from sqlDate is ...", outDate)
endMethod
When I run the form, I get the msgInfo box saying that its trying to open the Library, and the status bar changes to say that the library was successfully opened (as per the form's Open method).
When I click on the button to instigate the call to the custom procedure, I get an error dialogue which says: "The method, 'SQLDate(var Date) String' is not visible from the object, '#Library1'.
Why?? Please, please help!!
Thanks in advance
Pete Wright