In my current VFP application I have a table dPref which holds the users preferences for the application.
Very early on in the app I call a prg which creates on object oPref attached to _screen,oApp and then issue
SCATTER NAME _SCREEN.oApp.oPref MEMO.
I could just be using SCATTER NAME _SCREEN.oPref MEMO rather than adding it to the oApp object.
Then though-out my app when I want to get the value of one of the preferences I can simply refer to the object, rather then have to make a call to a prg to use a select statement to get it.
for example:
LOCAL lnDays
lnDays = 0
IF _SCREEN.oapp.opref.nUpdateDays > 0
IF _SCREEN.oapp.opref.tLastUpdate < DATETIME()
lnDays = aim_calculate_days_between_datetimes(DATETIME(), _SCREEN.oapp.opref.tLastUpdate)
IF lnDays > _SCREEN.oapp.opref.nUpdateDays
IF YesNo_Msg('Check for updates')
aim_version_check()
aim_update_autocheck_date()
ENDIF
ENDIF
ENDIF
ENDIF
What would be the best way to do this in Lianja in:
1. Desktop apps
2. Web apps
Bookmarks