User Tools

Site Tools


k19:k19.1:k19.1.3:k19.1.3.2:start

19.1.3.2 Example 4 - Profile Manager GB3

With Gambas 3, profiles can be created with the Settings class, read out as well as evaluated, changed, saved and deleted without adding further files to the project as in Example 3.

Profil-Manager Gambas 3

Figure 19.1.3.2.1: Profile Manager - Gambas 3

The changes in the source code in Gambas 3 compared to the GB2 source code in chapter 19.1.3.1 are very minor and only affect lines 2 and 9, where 'SettingsP' is exchanged for 'Settings':

' Gambas class file
PUBLIC pSettings AS Settings
PUBLIC aProfilMatrix AS NEW String[]
 
PUBLIC SUB Form_Open()
  FProfilManager.Center
  FProfilManager.Border = 1
  aProfilMatrix.Clear
  pSettings = NEW Settings(Application.Path &/ "Profils/profils.conf", "Profile für einen FTP-Client")
  cmbProfilName.SetFocus
  txtFTPUserPassword.Password = TRUE
  cmbProfilName.ReadOnly = TRUE
  ...
The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k19/k19.1/k19.1.3/k19.1.3.2/start.txt · Last modified: 13.10.2023 by emma

Page Tools