Alain Plantec a écrit : >> Perhaps the PreferenceValue could hold the types/description too to >> help tools... >> >> FreeTypeSettings class>>monitorTypeLCD >> <preference> >> ^ MonitorTypeLCD ifNil: [ >> MonitorTypeLCD := PreferenceValue >> name: 'LCD monitor type' >> type: #Boolean >> value: false >> default: false >> decsription: 'Use of a LCD...'] >> > could be ok for me, anyway what do you think of: > > FreeTypeSettings class>>monitorTypeLCD > <preference: 'LCD monitor type' type: #Boolean decsription: 'Use of a > LCD...'> > ^ MonitorTypeLCD ifNil: [ MonitorTypeLCD := PreferenceValue value: > false default: false] > > Name, type and description are only useful from PreferenceBrowser point > of view (preference helper) > whereas a PreferenceValue is concerned by its value and its default. > or simply :
FreeTypeSettings class>>monitorTypeLCD <preference:'LCD monitor type' type:#Boolean decsription:'Use of a LCD...'> ^ MonitorTypeLCD ifNil: [MonitorTypeLCD := PreferenceValue default:false] _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
