[Proto-Scripty] Re: Problem with prototype and arrays.

2010-08-02 Thread RobG
On Aug 2, 3:43 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, I found that array looping method online, I guess I will remove that page from my bookmarks. Yes, it's an extremely common misconception. What, that for..in iterates over an object's properties? It's per ECMA-262. There

[Proto-Scripty] Re: $$()

2010-08-02 Thread kenxle
In my understanding, it will generate one event each time a field is blurred, not 100 events each time a field is blurred. Each field gets its own listener. On Jul 30, 5:51 am, Yozefff yoze...@gmail.com wrote: Question .. Let's say I have 100 input fields, type = text. I want to put a onblur

[Proto-Scripty] Re: Problem with prototype and arrays.

2010-08-02 Thread T.J. Crowder
Hi, Yes, it's an extremely common misconception. What, that for..in iterates over an object's properties? No, that it loops over array indexes. -- T.J. On Aug 2, 3:49 pm, RobG rg...@iinet.net.au wrote: On Aug 2, 3:43 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi, I found that

Re: [Proto-Scripty] Re: $$()

2010-08-02 Thread Walter Lee Davis
Well to answer the OP's question, it will create 100 *listeners* which each consume a certain amount of memory and each have to be tracked and deleted if the number of observed items on the page changes after load. In contrast, a single listener that's listening for a bubbled event will

[Proto-Scripty] autocompleter and zero matches

2010-08-02 Thread Martín Marqués
I have an input field with autocompleter to build a pull down to select options. I was trying to figure out the best way to build an exception function if there are no rows returned. Is there some custom way of doing this? -- Martín Marqués select 'martin.marques' || '@' || 'gmail.com' DBA,

Re: [Proto-Scripty] autocompleter and zero matches

2010-08-02 Thread Walter Lee Davis
The autocompleter expects an empty UL to be returned if there are no matching results, what sort of exception were you thinking of? Walter On Aug 2, 2010, at 2:22 PM, Martín Marqués wrote: I have an input field with autocompleter to build a pull down to select options. I was trying to

Re: [Proto-Scripty] autocompleter and zero matches

2010-08-02 Thread Martín Marqués
2010/8/2 Walter Lee Davis wa...@wdstudio.com: The autocompleter expects an empty UL to be returned if there are no matching results, what sort of exception were you thinking of? I'm switching from a huge select pull down to an input with autocomplete, so I need the user to select EXACTLY one of

Re: [Proto-Scripty] autocompleter and zero matches

2010-08-02 Thread Walter Lee Davis
Hmmm. Okay. One of the basic precepts of the Autocompleter as written is that it also accepts anything you type in as a valid input, even if it doesn't match at all. It's sort of like the combo box input as seen in lots of desktop software in that regard. That's going to be fairly tricky

Re: [Proto-Scripty] autocompleter and zero matches

2010-08-02 Thread Martín Marqués
2010/8/2 Walter Lee Davis wa...@wdstudio.com: Hmmm. Okay. One of the basic precepts of the Autocompleter as written is that it also accepts anything you type in as a valid input, even if it doesn't match at all. It's sort of like the combo box input as seen in lots of desktop software in that

Re: [Proto-Scripty] autocompleter and zero matches

2010-08-02 Thread Walter Lee Davis
Looking at the documentation[1], I don't see any callback event that happens if there are no results, only one that adds the chosen list element to the list, or one that fires automatically after that update happens. But I don't believe that either one happens in case of no matches found.

[Proto-Scripty] Re: Problem with prototype and arrays.

2010-08-02 Thread RobG
On Aug 3, 2:19 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Yes, it's an extremely common misconception. What, that for..in iterates over an object's properties? No, that it loops over array indexes. I'm missing something here. Array indexes are properties, which is why they