Loading ...
Sorry, an error occurred while loading the content.

52294Re: [ydn-javascript] DataTable Cell Editor for HTML-formatted data

Expand Messages
  • Satyam
    Dec 29, 2009
      Are you including this file after including the DataTable source file?  Does BCE exist at all? Have you made it an alias of BaseCellEditor?  I say this because you are using the alias BCE in the extend but not in the constructor.  If you are running it with the debugger to break on all errors, lang.extend should have failed. 

      Also, run JSLint and make sure you don't have any more globals than you should nor that you have any unused variables, that usually indicates some misspelling and possibly a fatal typo.


      El 29/12/2009 20:38, Brian McCullough escribió:
      On Mon, Dec 28, 2009 at 07:50:16PM -0800, Brian McCullough wrote:
      On Mon, Dec 28, 2009 at 03:51:08PM +0100, Satyam wrote:
      The next step is to use your suggestion of using the Date Editor to assist me with the RTE part.
      Satyam ( and anybody else ),
      As I predicted, I have come up with a question.
      Following your suggestion, I copied the DateCellEditor code out of CellEditor.js ( in the API Documentation ), into a file in my own directory-space, and made what seemed to me to be appropriate changes. ( I tried to do nothing major to start with, just get a basic RTE rendered. )  I copied the "shortcut" var definitions from the beginning of the file, and the whole definition of DateCellEditor.
      So I started with:
      widget.DateCellEditor = function(oConfigs) {
          this._sId = "yui-dateceditor" + YAHOO.widget.BaseCellEditor._nCount++;
          widget.DateCellEditor.superclass.constructor.call(this, "date", oConfigs); 
      and changed it to:
      widget.RTECellEditor = function(oConfigs) {
      this._sId = "yui-rteceditor" + YAHOO.widget.BaseCellEditor._nCount++;
      widget.RTECellEditor.superclass.constructor.call(this, "rte", oConfigs); 
      I also compared the DateCellEditor to the TextareaCellEditor where I was unsure.
      At this point, I am getting an error complaining that "widget.RTECellEditor.superclass" is not defined.  Is there something else that I need to copy from the CellEditor.js file that will help to define this, or is it not actually necessary?
      Since both DateCellEditor and TextareaCellEditor use the same construct, I don't think that I have acually mis-spelled anything, and my understanding is that the BaseCellEditor should be the superclass, but I would suspect that the RTECellEditor might need to be known to the BaseCellEditor, or in some other way properly included with that class.
      I do have the line:
      lang.extend(widget.RTECellEditor, BCE, {
      Just after the above, as it is for the other Cell Editors, but that obviously doesn't really do the trick.
      Yahoo! Groups Links
      <*> To visit your group on the web, go to:
      <*> Your email settings:
          Individual Email | Traditional
      <*> To change settings online go to:
          (Yahoo! ID required)
      <*> To change settings via email:
      <*> To unsubscribe from this group, send an email to:
      <*> Your use of Yahoo! Groups is subject to:
      No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.722 / Virus Database: 270.14.123/2592 - Release Date: 12/29/09 08:47:00
    • Show all 9 messages in this topic