gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r11366: TextField maxChars property


From: Sharad Desai
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11366: TextField maxChars property implemented
Date: Tue, 04 Aug 2009 15:29:22 -0600
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11366 [merge]
committer: Sharad Desai <address@hidden>
branch nick: trunk
timestamp: Tue 2009-08-04 15:29:22 -0600
message:
  TextField maxChars property implemented
modified:
  libcore/TextField.cpp
=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp     2009-08-04 17:39:22 +0000
+++ b/libcore/TextField.cpp     2009-08-04 21:28:13 +0000
@@ -725,6 +725,15 @@
                         break;
 
                 default:
+                               
+                                       if ( maxChars()!=0 )
+                                       {
+                                               if ( _maxChars < _glyphcount )
+                                               {
+                                                       break;
+                                               }
+                                       }
+                                       
                     if (isReadOnly()) return false;
                     wchar_t t = static_cast<wchar_t>(
                             gnash::key::codeMap[c][key::ASCII]);
@@ -1307,7 +1316,7 @@
     _glyphcount = 0;
 
     _recordStarts.push_back(0);
-    
+               
     // nothing more to do if text is empty
     if ( _text.empty() )
     {
@@ -1440,6 +1449,9 @@
     
     scrollLines();
 
+
+       
+       
     set_invalidated(); //redraw
 }
 
@@ -1934,7 +1946,9 @@
 
             default:
             {
+       
 
+                               
                 if ( password() )
                 {    
                     SWF::TextRecord::GlyphEntry ge;
@@ -3471,8 +3485,6 @@
 {
     boost::intrusive_ptr<TextField> text = ensureType<TextField>(fn.this_ptr);
 
-    //LOG_ONCE(log_unimpl("TextField.multiline"));
-
     if (!fn.nargs) {
         // Getter
         return as_value(text->multiline());
@@ -3529,8 +3541,6 @@
 {
     boost::intrusive_ptr<TextField> text = ensureType<TextField>(fn.this_ptr);
 
-    LOG_ONCE(log_unimpl("TextField.maxChars"));
-
     if (!fn.nargs)
     {
         boost::int32_t maxChars = text->maxChars();


reply via email to

[Prev in Thread] Current Thread [Next in Thread]