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

Re: Problem with "sap.m"

$
0
0

Hi ,

 

  U r are calling the function instead of registering the function !!!!

 

//Correct Way

sap.ui.getCore().attachInit(writeWelcome);

 

Looks like attachInit doesnt has only one parameter which is Event Handler so we cannt pass text

ForMore Information

JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.core.Core

 

//Wrong Way

sap.ui.getCore().attachInit(writeWelcome("Welcome"));


  - This Calls the function writeWelcome and Return of function will be registered as Event Handler

  - Since  writeWelcome is executed before sap.m Library is loaded u will an error which is mentioned



Regards,

Jibin Joy


Viewing all articles
Browse latest Browse all 8950

Trending Articles



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