BJTAWJ / webclient-mobile-for-ca-plex

Automatically exported from code.google.com/p/webclient-mobile-for-ca-plex
0 stars 0 forks source link

SearchField #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Need version of Sencha Touch to reproduce error

I’m getting a few errors in the console when using the SearchField control 
and I suspect that the template is wrong. I have marked the changes in red 
below that I think need to be made – can you have your guys look at it and 
see if I am right with the changes. The search field processing was changed 
recently by Sencha – and I suspect your code is from an earlier version.

      listeners: {
            focus: { /* The Text class – xtype ‘textfield’ – defines two parameters for this event – Ext.form.Text and Ext.EventObject */
                  fn: function(thisField, e) {
                        /(!If:/(!Event:phys=Gained Focus))
                        panel.submit(wcli.util.evt("Gained Focus", "/(!NameID)"));
                        /(!If)
                  },
                  scope: this
            },
            blur: { /* The Text class – xtype ‘textfield’ – defines two parameters for this event – Ext.form.Text and Ext.EventObject */
                  fn: function(thisField, e) {
                        /(!If:/(!Event:phys=Lost Focus))
                        panel.submit(wcli.util.evt("Lost Focus", "/(!NameID)"));
                        /(!If)
                  },
                  scope: this
            },
            Input keyup: { /* The Text class – xtype ‘textfield’ – no longer has this event – it now uses keyup event – and defines two parameters for this event – Ext.form.Text and Ext.EventObject */
                  fn: function(thisField, e) {
                        /(!If:/(!Event:phys=Modified))
                        panel.submit(wcli.util.evt("Modified", "/(!NameID)"));
                        /(!If)
                  },
                  scope: this
            },
            change: { /* The Text class – xtype ‘textfield’ – defines three parameters for this event – Ext.form.Text, Mixed and Mixed */
                  fn: function(thisField, oldValue, newValue e) {
                        /(!If:/(!Event:phys=Updated))
                        panel.submit(wcli.util.evt("Updated", "/(!NameID)"));
                        /(!If)
                  },
                  scope: this
            },
            action: { /* The Text class – xtype ‘textfield’ – defines two parameters for this event – Ext.form.Text and Mixed */
                  fn: function(thisField, keyCode e) { 
                        /* Based on the value of keyCode, perform application specific processing – such as Enter key processing */
                  },
                  scope: this
            }

Original issue reported on code.google.com by jdrhodes...@gmail.com on 26 Jun 2011 at 1:26

GoogleCodeExporter commented 8 years ago
The JS error is a duplicate of #1, which has been resolved.

The parameters to the callbacks are irrelevant since they are unused, but to 
prevent further confusion I have removed them.

The observation about the input event is correct, but keyup is not entirely 
equivalent to input.  Hold down a single key and release it; this would 
generate many input events but only a single keyup event.  With that being 
said, I have switched to keyup since, flawed as it might be, it is clearly 
better than not working at all.  Will need to go back and fix that one.

Original comment by j...@jkerns.com on 29 Jun 2011 at 5:50

GoogleCodeExporter commented 8 years ago

Original comment by j...@jkerns.com on 29 Jun 2011 at 5:52