Results 1 to 4 of 4

Thread: Where are EventObject constants?

  1. #1
    Sencha User digerata's Avatar
    Join Date
    Mar 2007
    Location
    Clarkston, Michigan
    Posts
    61

    Question Where are EventObject constants?

    In Ext, there are public constants on the EventObject for keys like Space, Control, Escape, etc.

    In Ext Core, these aren't present anywhere.

    Was this just overlooked?

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

    Default

    No, they are not included. The definitions are in the "-more" file which is built into the full Ext library.

  3. #3
    Sencha User digerata's Avatar
    Join Date
    Mar 2007
    Location
    Clarkston, Michigan
    Posts
    61

    Default

    That seems petty that they wouldn't be included. This isn't some piece of complex code. It's common definitions that everyone who checks the keyboard needs.

    I'm getting more and more disheartened by Ext every day.

  4. #4
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Answers
    29

    Default

    Quote Originally Posted by digerata View Post
    That seems petty that they wouldn't be included. This isn't some piece of complex code. It's common definitions that everyone who checks the keyboard needs.
    In Ext.Core, file size is a very high priority. There are a large number of constants defining the key codes which add to the file size for everyone - whether they use them or not.

    We made the call that in the typical case the keycodes wouldn't be used and would therefore probably be sat around taking up space while adding no value.

    There's nothing stopping you from defining them yourself after Ext Core is included - it's a one-time hassle but should be straightforward.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •