Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3116

Problem with "sap.m"

$
0
0

Hi,

 

First, I'll ask you to bear with me as I'm new to SAPUI5, Web IDE, JavaScript, etc

 

I have a problem that puzzles me: an assignment of "sap.m.Text" fails, but works fine in the "Console" just after it fails.

 

This is how it looks on the Web IDE:

Problem with SAP-M Web IDE.jpg

 

The 2 "attachInit" (lines 25-29 and 30-34) are 2 pieces of codes that works fine.

They are different (earlier) versions of the code that doesn't work (lines 18-22).

 

This is a snippet of the problematic code:

function writeWelcome(sText){
                tText = new sap.m.Text();
                tText.setText(sText)
  1. tText.placeAt("content");
}

 

This is what happen before line 19 is executed.

Note the error in the "Console" when I try to assign "tText" (it's actually the same code as in line 19):

Problem with SAP-M 1.jpg

 

When I execute line 19 I get the same error:

Problem with SAP-M 2.jpg

 

But then, when I execute the same line of code in the "Console", like before, it's all OK:

Problem with SAP-M 3.jpg

 

Any help will be appreciated.

 

 

 

 

Regards,

Ayal Telem.


Viewing all articles
Browse latest Browse all 3116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>