V4RB Tutorial 1, TestAddRecords

Chuck Pelto cbpelto at pcisys.net
Thu Oct 7 10:01:47 CDT 2004


I've been twiddling around with trying to get this method to work and 
have met with complete failure.

On page 16 of the tutorial it reads....

boPerson.TestAddRecords:
Sub TestAddRecords(N as integer)
...

The implication being that TestAddRecords() is a method inside of the 
boPerson object.

At the bottom of the page it says...

This method will be called from the Window1 menu event handler.

There is not code or guidance where to put such code to call 
TestAddRecords in the tutorial. The text on page 16 implies that it 
will be located in the source code of Window 1.

So, I put in the following code into a Menu Handler of Window1 to try 
it.

Function FileAdd()
   dim res as boolean
   dim N as integer
   N = 10000

   res = boPerson.TestAddRecords(N)

   if (res = true) then

     MsgBox("Done adding 10000 records.")

   else

     MsgBox("Failed adding 10000 records!!!")

   end if

End Function

Note: I modified the code of TestAddRecords to include the return of a 
boolean if it worked or didn't work.

What is happening when I compile to run is that it will not compile. It 
gives me an error message about the TestAddRecords not being a method 
or property in Window1.

However, I am using the proper dot protocol for calling a method in a 
different object, according to communications on the RB listserv.

Is there a problem using the dot protocol of RB when the method being 
called is in a Valentina object?

Please advise....

Regards,

Chuck Pelto



More information about the Valentina mailing list