Thanks for the replies On Apr 28, 1:18 pm, Oliver Leics <[email protected]> wrote: > Readability taken aside, I can't see how this is could be a 'misuse' > > > > > > > > > > On Sat, Apr 28, 2012 at 6:54 AM, akira <[email protected]> wrote: > > I am sorry if this is not node related, I just thought this might be a > > good place to ask since a lot of module developers are on this list. > > > Using this simple example, I would like to inherit a form > > > exports.EmailForm = forms.Form.extend({ > > email_address : forms.EmailField({required: true}) > > }) > > > exports.ExtendedEmailForm = exports.EmailForm.extend({ // <- Extending > > EmailForm > > subject : forms.CharField({maxLength: 100}) > > , message : forms.CharField() > > , sender : forms.EmailField({required: true}) > > }) > > > Is this a misuse? It works, but normally one would do something like > > this: > > > var EmailForm = forms.Form.extend({ > > email_address : forms.EmailField({required: true}) > > }) > > > But I would like to export the simple EmailForm class for usage in > > other modules too. Thanks > > > -- > > Job Board:http://jobs.nodejs.org/ > > Posting > > guidelines:https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > > You received this message because you are subscribed to the Google > > Groups "nodejs" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/nodejs?hl=en?hl=en > > -- > Oliver Leics @ G+https://plus.google.com/112912441146721682527
-- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
