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

rocko sunblaster5 at ...626...
Fri Aug 31 04:14:31 CEST 2012


On Thu, 2012-08-30 at 18:37 -0700, John Spikowski wrote:
> 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.

I discovered I can use dataControls to bind to the fields in a table.
But I think I have to use 2 dataSources, one for the dataBrowser the
other for the dataControls.

The first dataSource i'm using contains the dataControls and the second
dataSource along with the dataBrowser.
However the dataControls are not displaying the fields they're set to 
in the properties, the dataBrowser is working fine--so far.

If I click in a field in the dataBrowser, the dataControl it's bound 
should display its data, but unfortunately for me it isn't.
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

-- 
rocko <sunblaster5 at ...626...>





More information about the User mailing list