Le 23/08/2012 12:07, John Rose a écrit : > Benoit, > > I've just asked kendek to create new Ubuntu .debs in his pre-release > Gambas Launchpad Ubuntu ppa repo for revision #5070: I don't like to > compile a new version of Gambas3 myself as it seems to conflict with the > installed version from kendek's ppa repo. When he has done his ppa > update, I'll change my app to use the BeforeSave event handler. How do I > define the current country's id value in it? My guess is something like > (but not exactly that): > DataSourceCentre.country_id = CountryId ' variable containing the > ' foreign key value >
You will receive the Result object in an argument named "Data". So: Data["country_id"] = CountryId or Data!country_id = CountryId Just think that gb.db.form is entirely written in Gambas, so when he wrote a record to the database, it does something like that: rResult = DB.Create(...) or DB.Edit(...) ' some stuff that fills rResult Raise BeforeSave(rResult) rResult.Update > Should I still use DataBrowserCentre embedded in DataSourceCentre > embedded in DataSourceCountry (i.e. do I need DataSourceCountry)? No. > Do I > still need the 'country_id = CountryId' filters in DataSourceCentre & in > DataSourceCountry? It's independent. But I think so, as you want show only the DataSourceCentre of the current country, don't you? -- Benoît Minisini ------------------------------------------------------------------------------ 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user