User Tools

Site Tools


update_write_ini_file_entries_.htm
Navigation:  ABC Library Reference > INIClass > INIClass Methods >====== Update (write INI file entries) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page
Update( section, | entry, value| ), VIRTUAL
entry, value, filename
window
entry, queue, field, [field], [field]

blk2blue.jpg

Update Writes entries to the INI file.
section A string constant, variable, EQUATE, or expression containing the INI file section name.
entry A string constant, variable, EQUATE, or expression containing the INI file entry name.
value A constant, variable, EQUATE, or expression containing the value to store for the section and entry.
filename
Update(section,entry,value) Writes a single value specified by section and entry to the INI file specified in the INIClass.FileName property.
Update(section,entry,value,filename) Writes a single value specified by section and entry to the INI file specified by filename.
Update(section,window) Writes several WINDOW position and size attributes to the INI file specified in the INIClass.FileName property, for retrieval by a subsequent corresponding call to Fetch(section,window). Restoring the values returns the specified WINDOW to its saved position and size.
Update(queue, field, [field], [field] ) Writes the records of a QUEUE with a maximum of three fields to the INI file specified in the INIClass.FileName property.

Implementation:

If a window is present, the Update method writes five entries to the specified INI file section: Maximize, XPos, YPos, Height, and Width. These entries are retrieved and applied by the Fetch method to restore the window's position and size.

Example:

Sound   STRING('ON ')

PWindow  WINDOW('Preferences'),AT(,,89,34),IMM,MAX,RESIZE

         CHECK('&Sound'),AT(8,6),USE(Sound),VALUE('ON','OFF')

         BUTTON('OK'),AT(57,3,30,10),USE(?OK)

        END

CODE

OPEN(PWindow)

INIMgr.Fetch('Preferences',PWindow)         !restore PWindow size & position

INIMgr.Update('Preferences',PWindow)        !save PWindow size & position

See Also:     Fetch , PUTINI

update_write_ini_file_entries_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1