[Gambas-user] Questions about the 'database' example

John Spikowski support at ...2529...
Fri Aug 31 03:37:31 CEST 2012


On Thu, 2012-08-30 at 18:15 -0700, rocko wrote:
> Been looking at the database example in Gambas 3.2.1.
> I believe it's the first one simply named 'Database'.
> I noticed on the Ftest.Form that the DataBrowser behaves differently.
> 
> For instance when you click on an record in the dataBrowser it populates
> a series of txt boxes with the data.
> Also if you click the [+] add record button it doesn't prompt you to add
> the record on the dataBrowser itself as is the default behavior, but 
> instead it clears the txt boxes and lets use them to enter a new record.
> Then you just simply click the save icon and it updates the dataBrowser.
> 
> I would love yo know how that was done.
> I looked thru the code but couldn't see anything that would  give me a
> clue.
> 
> Could some one point out the code that does this.
> I'm currently working on a similar project and that is just what I need.
> But I can't figure out how it's done.

If your database is bound to an object variable you may want to look for
that being nulled. By default all your form database fields would be
blanked (or default value) and ready for new entry repopulating the
object variable. I don't use Gambas enough to say this is how Gambas
deals with bond datasets.







More information about the User mailing list