[Proto-Scripty] Help destroying many events on tr mouseenter and mouseleave

2011-07-09 Thread kstubs
I have something like this:

tr.on('mouseenter',thiz.Mousing.bindAsEventListener(thiz));
tr.on('mouseleave',thiz.Mousing.bindAsEventListener(thiz));

This table is built frequently (every few keystrokes by the user) so I need 
to setup the mouseenter and mouseleave event and tear them down just as 
quickly.

So, when I go to update the table container (whipe it out each time) I'd 
like to call one or two very convenient inokes on the tr's, something like:

this.table.select('tr').invoke( ... tear down those events here ... );

Is this the correct approach, or must I itterate through the result of each 
tr and tear them down this way?

Karl..

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/nHZI_5RW018J.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Event Keyup a-z key response

2011-07-09 Thread kstubs
Is there a clever way to ignore all other keystrokes, like arrow keys and 
only responsd to keycodes ranging from a-z and 0-9?  I guess another valid 
keystroke would be SHIFT+.  So something like:

onKeyUp: function(e) {

  // if not valid keystroke event
  return;

  // otherwise, do the following code
}

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/n6A8WdIsaqAJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: History and onpopstate

2011-07-09 Thread pedz
This isn't using prototype but works:

window.onpopstate = function (even) { ... };

new Event.Handler(element, ...) requires element be an element.  window 
doesn't work.  Not a big deal.  I'm using Firefox 5.  I don't know (yet) how 
portable the above is going to be.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/SK84y9W8dBQJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Object from string

2011-07-09 Thread kstubs
Wow, you just have to love Javascript, so flexible sometimes!  What an 
amazing language, I tell ya.
Thanks for that shortcut ilandril!

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/OmNB4U2L-l0J.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] History and onpopstate

2011-07-09 Thread pedz
My first attempt to use HTML 5's onPopState isn't working.  I did:

$$('body')[0].on('popstate', Raptor.makeWrapper(function(event) {
console.log('popped');
}));

I've tried a few different capitalizations but, so far, it isn't logging the 
'popped' message.

Any suggestions on how to hook this up?  It appears (from the HTML 5 
documentation) that the event handler needs to be hooked to the body 
element.
 

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/ZbJj5kxIwBUJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Object from string

2011-07-09 Thread Joseph Spandrusyszyn
   var idx = itt + 1;
   var name = 'p_Value' + idx.toString();
   var h = {};
   h[name] = names[itt];
On Jul 9, 2011 4:24 AM, "kstubs"  wrote:
> OK, I figured it out. Here is my solution, and ultimately I need an
Object,
> as you can see I'm extending args in the end, so is there a way to avoid
> creating the hash, then casting the hash to an object?
>
> var idx = itt + 1;
> var name = 'p_Value' + idx.toString();
> var h = $H();
> h.set(name, names[itt]);
> Object.extend(args, h.toObject());
>
> --
> You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
> To view this discussion on the web visit
https://groups.google.com/d/msg/prototype-scriptaculous/-/Sdi2kTKvSBsJ.
> To post to this group, send email to
prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Object from string

2011-07-09 Thread kstubs
OK, I figured it out.  Here is my solution, and ultimately I need an Object, 
as you can see I'm extending args in the end, so is there a way to avoid 
creating the hash, then casting the hash to an object?

var idx = itt + 1;
var name = 'p_Value' + idx.toString();
var h = $H();
h.set(name, names[itt]);
Object.extend(args, h.toObject());

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/Sdi2kTKvSBsJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Object from string

2011-07-09 Thread kstubs
I hope I haven't asked this before!!  OK, so if have a name string like 
this:

var name = 'somename' + x// assuming x = 1

and some value = '1234'

I need the object:

{ somename1: '1234' }


But I can't figure out how to get here.  Please help.
Karl..

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/aiwFrtlehJ0J.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.