Squeak Class Documentation category index | class index  
 
Preference
  category: System-Support
  superclass: Object
  subclasses:

Represents a true/false flag that is under user control and which can be interrogated by a call to Preferences

name a symbol, the formal name of the preference.
value a boolean, the current value
defaultValue the default value of the preference
helpString string or text, constituting the help message
localToProject boolean, whether each project holds its own version
categoryList list of categories under which to offer this
changeInformee whom, if anyone, to inform if the value changes:
changeSelector what selector to send to the changeInformee when the value changes

instance methods
  button
  representativeButtonWithColor:inPanel:
tearOffButton

  change notification
  changeInformee
changeInformee:changeSelector:
notifyInformeeOfChange

  debugging
  printOn:

  initialization
  categoryList:
name:defaultValue:helpString:localToProject:categoryList:changeInformee:changeSelector:

  local to project
  isProjectLocalString
localToProject
toggleProjectLocalness

  menu
  categoryList
copyName
helpString
name
offerPreferenceNameMenu:with:in:

  value
  defaultValue
preferenceValue
preferenceValue:
rawValue:
restoreDefaultValue
togglePreferenceValue

class methods
  no messages
 

instance methods
  button top  
 

representativeButtonWithColor:inPanel:

Return a button that controls the setting of prefSymbol. It will keep up to date even if the preference value is changed in a different place


 

tearOffButton

Hand the user a button the can control this


  change notification top  
 

changeInformee

Answer the receiver's changeInformee


 

changeInformee:changeSelector:

Set the changeInformee and changeSelector as specified


 

notifyInformeeOfChange

If there is a changeInformee, notify her that I have changed value


  debugging top  
 

printOn:

Print a string decribing the receiver to the given stream


  initialization top  
 

categoryList:

Set the receiver's categoryList


 

name:defaultValue:helpString:localToProject:categoryList:changeInformee:changeSelector:

Initialize the preference from the given values. There is an extra tolerence here for the symbols #true, #false, and #nil, which are interpreted, when appropriate, as meaning true, false, and nil


  local to project top  
 

isProjectLocalString

Answer a string representing whether sym is a project-local preference or not


 

localToProject

Answer whether this preference is project-local


 

toggleProjectLocalness

Toggle whether the preference should be held project-by-project or globally


  menu top  
 

categoryList

Answer the categoryList


 

copyName

Copy the name of the given preference to the clipboard


 

helpString

Answer the help string provided for the receiver


 

name

Answer this preference's name


 

offerPreferenceNameMenu:with:in:

the user clicked on a preference name -- put up a menu


  value top  
 

defaultValue

Answer this preference's defaultValue


 

preferenceValue

Answer the current value of the preference


 

preferenceValue:

set the value as indicated, and invoke the change selector if appropriate


 

rawValue:

set the value as indicated, with no side effects


 

restoreDefaultValue

restore the default value to the preference


 

togglePreferenceValue

Toggle whether the value of the preference


class methods
  no messages top