la creación de cuadros de texto

  • BardicKnowledge
  • Novice
  • Novice
  • No Avatar
  • Registrado: Abr 26, 2007
  • Mensajes: 21
  • Loc: Halifax
  • Status: Offline

Nota Junio 13th, 2007, 7:49 am

No sé qué Im que hace mal aquí. Sé que esto no debería ser difícil, pero su me escapaba.

De todas formas, lo que Im tratando de hacer es crear cajas de texto mediante un bucle que lee un XML. Yo iba a usar un valor del XML para el cuadro de texto el nombre de instancia y un valor para, así, el valor de la caja de texto.

He probado el código XML, así que sé que el problema no está ahí. Los dos problemas que he principalmente son: 1) El cuadro de texto no se crea o visualiza mientras que en el bucle (funciona si tomo la mirada hacia fuera) y 2) el cuadro de texto no se mostrará el valor XML cuando se utiliza el XML para dar el cuadro de texto un valor. Si, por ejemplo, acaba de llamar gato, y asignarle el valor del XML funciona, pero cuando trato de utilizar el XML para dar al texto un nombre de instancia y luego le da el valor del XML no funciona.

Heres mi AS:
Código: [ Select ]
var nav:XML = new XML();
nav.load("nav.xml");
nav.onLoad = startXML;
nav.ignoreWhite = true;

function startXML(){
    rootNode = nav.firstChild;
    fileLength = rootNode.childNodes;
    yy =0;
    for(i=0;i<fileLength.length;i++){
        rage = rootNode.firstChild.attributes.n;
        this.createTextField(rage, this.getNextHighestDepth(), yy, 10, 400, 22);    
        this[rage].html = true;
        this[rage].htmlText = rootNode.firstChild.attributes.n;
        yy+= 50;
    }
}

startXML();
  1. var nav:XML = new XML();
  2. nav.load("nav.xml");
  3. nav.onLoad = startXML;
  4. nav.ignoreWhite = true;
  5. function startXML(){
  6.     rootNode = nav.firstChild;
  7.     fileLength = rootNode.childNodes;
  8.     yy =0;
  9.     for(i=0;i<fileLength.length;i++){
  10.         rage = rootNode.firstChild.attributes.n;
  11.         this.createTextField(rage, this.getNextHighestDepth(), yy, 10, 400, 22);    
  12.         this[rage].html = true;
  13.         this[rage].htmlText = rootNode.firstChild.attributes.n;
  14.         yy+= 50;
  15.     }
  16. }
  17. startXML();


Gracias de antemano por cualquier ayuda ^ _ ^
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Junio 13th, 2007, 7:49 am

Publicar Información

  • Total de mensajes en este tema: 1 mensaje
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 44 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC