Git Product home page Git Product logo

kpirc's People

Contributors

matthewearl avatar

Watchers

 avatar  avatar  avatar

kpirc's Issues

Add verifiers for settings

The Settings window (IRC Client -> Settings) should reject invalid values. When an invalid value is entered (triggered by a text box modify, for example) a message should appear at the bottom of the window explaining why the value is invalid and for which field. The Apply and OK buttons should become greyed out.

To implement this the Input and Page nested classes should be moved into their own (public) classes. Input should have a validateValue(SettingValue) method which by default approves all values. The idea being that whoever extends SettingsEditor can also extend Input for settings that can take invalid values. Instantiations of this subclass should be used as Inputs in the SettingsEditor. The addPage() and add addInput() methods of SettingsEditor should be changed to just take a Page or Input respectively and add it to the appropriate list.

validateValue() should return a ValidationResult() (a new class) which either indicates failure with an error string (to be displayed in the Settings window) or success without an error string.

Verifiers for colour values shouldn't be necessary (the picker control cannot return invalid values). The current string settings (nick, user, real name) need verifiers to make sure that they conform to RFC 1459.

Need listener mechanism when settings are updated

For example, when the "default background colour" setting is changed (IRC Client -> Settings -> Colours -> (Change) -> Ok) all text controls that use this variable should redraw.

Interested controls (in the above case text controls which use the default background colour) should register a setting path (e.g. "Irc.defaultBG") with a static method on Settings. They will be called back with a SettingValue when the value is changed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.