Module: Preferences

Share your advanced knowledge/code with the community.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Module: Preferences

Post by Peter »

Hello,

the PureBasic Preferences-Library for SpiderBasic:

https://github.com/spiderbytes/Preferences

Greetings ... Peter

Edit: Removed code; added github-Link
Last edited by Peter on Fri Jul 07, 2017 9:37 am, edited 1 time in total.
User avatar
SparrowhawkMMU
Posts: 281
Joined: Wed Aug 19, 2015 3:02 pm
Location: United Kingdom

Re: Module: Preferences

Post by SparrowhawkMMU »

I was not even aware of it in PureBasic! :D

Thanks Peter. Incidentally, do you have a github/gitlab account where you have all your great libraries/modules in a central place?

It would be nice if Fred added a user-contributed modules section to the SB website so that your code and that of the others who have contributed would be readily available and easy to find.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Module: Preferences

Post by Peter »

SparrowhawkMMU wrote:Incidentally, do you have a github/gitlab account where you have all your great libraries/modules in a central place?
Since just now. ;-)

(see first posting)

Greetings ... Peter
User avatar
SparrowhawkMMU
Posts: 281
Joined: Wed Aug 19, 2015 3:02 pm
Location: United Kingdom

Re: Module: Preferences

Post by SparrowhawkMMU »

+1
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

Re: Module: Preferences

Post by IdeasVacuum »

Hi Peter
Where is Preferences.prefs stored? :?
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Module: Preferences

Post by Peter »

IdeasVacuum wrote:Where is Preferences.prefs stored? :?
in your Browser.

Screenshot of my Google Chrome - Console (opened with <F12>:
Image

Greetings ... Peter
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

Re: Module: Preferences

Post by IdeasVacuum »

Hi Peter

Ah, I was expecting Preferences.pref to be a stand-alone file, no wonder I could not find it. So, it seems to work on Android too, but the app must create the initial data list first. I'm going to have another play with it, as a work-around for SB's need to ask the User to select a text file, which in most scenarios with regards to smartphone app data use is a definite no no.

EDIT: Well, it works but the data save is not persistent so next time the app is run, the most recent prefs are not there to read.
Going to try SQL........
Post Reply