Google Groups Home
Help | Sign in
Message from discussion Subclassing Remote.Form
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Bill Burcham  
View profile
 More options 14 May, 17:04
From: Bill Burcham <bill.burc...@gmail.com>
Date: Wed, 14 May 2008 09:04:10 -0700 (PDT)
Local: Wed 14 May 2008 17:04
Subject: Subclassing Remote.Form
I have a few questions about subclassing Remote.Form. I want to
override onsubmit to do some validation and then call super's
onsubmit. So I derived from Remote.Form. Now the question:

* when I overrode onsubmit it wasn't getting called - only super's
onsubmit was called. Can I override onXX methods and expect them to
bind properly?

Which brings up another question: with Prototype, is it necessary to
explicitly invoke $super() in initialize to cause the superclass
initializer to be called - or is this behavior automatic? (should be
automatic I think) I tried it both ways (calling $super() in
initialize versus not calling it at all). Neither way caused my
onsubmit to bind. However failing to call $super() did seem to result
in an object that had not had Remote.Base initialize invoked
(this.options weren't set).

Guess I'm looking for Prototype best practice and then wondering
whether there is a particular problem subclassing lowpro Remote.Form.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google