Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,34 @@
|
|||
local fn SaveConfiguration
|
||||
CFDictionaryRef defaults = @{¬
|
||||
@"FULLNAME" : @"Foo Barber",¬
|
||||
@"FAVOURITEFRUIT" : @"banana",¬
|
||||
@"NEEDSPEELING" : @YES,¬
|
||||
@"SEEDSREMOVED" : @NO,¬
|
||||
@"OTHERFAMILY" : @[@"Rhu Barber", @"Harry Barber"]}
|
||||
|
||||
UserDefaultsRegisterDefaults( defaults )
|
||||
end fn
|
||||
|
||||
local fn ReadConfiguration
|
||||
CFStringRef tempStr
|
||||
|
||||
CFStringRef fullname = fn UserDefaultsString( @"FULLNAME" )
|
||||
CFStringRef favouritefruit = fn UserDefaultsString( @"FAVOURITEFRUIT" )
|
||||
BOOL needspeeling = fn UserDefaultsBool( @"NEEDSPEELING" )
|
||||
BOOL seedsremoved = fn UserDefaultsBool( @"SEEDSREMOVED" )
|
||||
CFArrayRef otherfamily = fn UserDefaultsArray( @"OTHERFAMILY" )
|
||||
|
||||
printf @"Saved configuration:\n"
|
||||
printf @"FULLNAME: %@", fullname
|
||||
printf @"FAVOURITEFRUIT: %@", favouritefruit
|
||||
if needspeeling == YES then tempStr = @"TRUE" else tempStr = @"FALSE"
|
||||
printf @"NEEDSPEELING: %@", tempStr
|
||||
if seedsremoved == YES then tempStr = @"TRUE" else tempStr = @"FALSE"
|
||||
printf @"SEEDSREMOVED: %@", @"(undefined)"
|
||||
printf @"OTHERFAMILY: %@, %@", otherfamily[0], otherfamily[1]
|
||||
end fn
|
||||
|
||||
fn SaveConfiguration
|
||||
fn ReadConfiguration
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue