Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

LMD Script. Objects Typecast

Hi,

I'd like execute this operation, but receive convert error

  Memo1.Lines.Add('DataSourceMain.DataSet =  ' + IntToStr(Integer(DataSourceMain.DataSet)));  // <--Error. Solution?
  Memo1.Lines.Add('DC = ' + String(DC)); // <--Error. Solution?  

Help me please.

var intervalId = setInterval(function () { if (MtPopUpList) { LanguageMenu = new MtPopUpList(); var langMenu = document.getElementById(LanguageMenu_popupid); var origLangDiv = document.createElement("div"); origLangDiv.id = "OriginalLanguageDiv"; origLangDiv.innerHTML = "ORIGINAL: "; langMenu.appendChild(origLangDiv); LanguageMenu.Init('LanguageMenu', LanguageMenu_keys, LanguageMenu_values, LanguageMenu_callback, LanguageMenu_popupid); window["LanguageMenu"] = LanguageMenu; clearInterval(intervalId); } }, 1);
jpg
jpg
19072021_191030.jpg
7K
Tagged:

Comments

  • 2 Comments sorted by Votes Date Added
  • When posting a message, some kind of garbage got into it :) var intervalId = setInterval(function () { if (MtPopUpList) { LanguageMenu = new MtPopUpList(); var langMenu = document.getElementById(LanguageMenu_popupid); var origLangDiv = document.createElement("div"); origLangDiv.id = "OriginalLanguageDiv"; origLangDiv.innerHTML = "ORIGINAL: "; langMenu.appendChild(origLangDiv); LanguageMenu.Init('LanguageMenu', LanguageMenu_keys, LanguageMenu_values, LanguageMenu_callback, LanguageMenu_popupid); window["LanguageMenu"] = LanguageMenu; clearInterval(intervalId); } }, 1);
  • Low level unsafe type casts (like object to Integer) are not supported in script languages. As a workaround you can implement your own function. Such as: 

    function ObjectToInt(O: TObject): Integer;

    And import it into script using our Import Wizard.
Sign In or Register to comment.