You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/03/04 22:36:06 UTC

[royale-asjs] branch develop updated: jewel-textprompt: fix swf again

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 0e0dab5  jewel-textprompt: fix swf again
0e0dab5 is described below

commit 0e0dab56707f2d9bfe4fa3b07e0ef7208279feee
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Wed Mar 4 23:35:53 2020 +0100

    jewel-textprompt: fix swf again
---
 .../royale/jewel/beads/controls/textinput/TextPrompt.as      | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/textinput/TextPrompt.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/textinput/TextPrompt.as
index 03ecfaa..11aef00 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/textinput/TextPrompt.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/textinput/TextPrompt.as
@@ -104,7 +104,7 @@ package org.apache.royale.jewel.beads.controls.textinput
 			COMPILE::SWF
 			{
 				// listen for changes in text to hide or show the prompt
-				var model:Object = host.model;
+				var model:Object = _strand.model;
 				if (!model.hasOwnProperty("text")) {
 					throw new Error("Model requires a text property when used with TextPrompt");
 				}
@@ -161,20 +161,20 @@ package org.apache.royale.jewel.beads.controls.textinput
 		{	
 			// see what the model currently has to determine if the prompt should be
 			// displayed or not.
-			var model:Object = host.model;
+			var model:Object = _strand.model;
 			
 			if (model.text != null && model.text.length > 0 ) {
-				if (promptAdded) host.removeChild(promptField);
+				if (promptAdded) _strand.removeChild(promptField);
 				promptAdded = false;
 			}
 			else {
-				if (!promptAdded) host.addChild(promptField);
+				if (!promptAdded) _strand.addChild(promptField);
 				promptField.text = prompt;
 				promptAdded = true;
                 promptField.x = 2;
                 promptField.y = 2;
-                promptField.width = host.width-5;
-                promptField.height = host.height-4;
+                promptField.width = _strand.width-5;
+                promptField.height = _strand.height-4;
 			}
 		}
 	}