
Quote from lolo on December 15, 2023, 6:35 pmесть-ли у кого пример работы с переменной OBJID
Does anyone have an example of working with the OBJID variable?
есть-ли у кого пример работы с переменной OBJID
Does anyone have an example of working with the OBJID variable?

Quote from luishp on December 16, 2023, 9:45 am@lolo use OBJID in a plugin to allow the VisualNEO Web user to select an object from the app he is working on. The variable will return the object name or id. For example if the user selects a Container object your OBJID variable will store something like "Container1".
This is very useful to inject HTML code within the Container using JavaScript or to transform it using CSS.I hope it helps.
@lolo use OBJID in a plugin to allow the VisualNEO Web user to select an object from the app he is working on. The variable will return the object name or id. For example if the user selects a Container object your OBJID variable will store something like "Container1".
This is very useful to inject HTML code within the Container using JavaScript or to transform it using CSS.
I hope it helps.

Quote from lolo on December 17, 2023, 8:07 pm@luishp
я пытаюсь подключить vanilacalendar
I'm trying to connect a vanilla calendarfunction pvvVanilaCalendar (idOBJVanila){ var script = document.createElement("script"); script.type="text/javascript"; script.innerHTML="document.addEventListener('DOMContentLoaded', () => {const calendar = new VanillaCalendar('#"+idOBJVanila+"'); calendar.init();});"; document.getElementsByTagName('body')[0].appendChild(script); };ошибок нет, но и календаря тоже нет
no errors, but no calendar either
@luishp
я пытаюсь подключить vanilacalendar
I'm trying to connect a vanilla calendar
function pvvVanilaCalendar (idOBJVanila){
var script = document.createElement("script");
script.type="text/javascript";
script.innerHTML="document.addEventListener('DOMContentLoaded', () => {const calendar = new VanillaCalendar('#"+idOBJVanila+"'); calendar.init();});";
document.getElementsByTagName('body')[0].appendChild(script);
};
ошибок нет, но и календаря тоже нет
no errors, but no calendar either

Quote from luishp on December 18, 2023, 5:56 pmHi @lolo, what you have done is very strage. It should be something like this:
function pvvVanilaCalendar(idOBJVanila){ $App["vcalendar"+idOBJVanila] = new VanillaCalendar("#"+idOBJVanila); $App["vcalendar"+idOBJVanila].init(); };Be sure to include the required JavaScript files.
Hi @lolo, what you have done is very strage. It should be something like this:
function pvvVanilaCalendar(idOBJVanila){
$App["vcalendar"+idOBJVanila] = new VanillaCalendar("#"+idOBJVanila);
$App["vcalendar"+idOBJVanila].init();
};
Be sure to include the required JavaScript files.

Quote from lolo on December 19, 2023, 12:52 pm@luishp
спасибо!
я думал, что нужно создать новые елементы и вставить их в страницу.
$App[] - это внутрення команда создающая переменную объект? или тип переменной может быть любым?Thank you!
I thought that I needed to create new elements and insert them into the page.
Is $App[] an internal command that creates a variable object? or can the variable be of any type?
@luishp
спасибо!
я думал, что нужно создать новые елементы и вставить их в страницу.
$App[] - это внутрення команда создающая переменную объект? или тип переменной может быть любым?
Thank you!
I thought that I needed to create new elements and insert them into the page.
Is $App[] an internal command that creates a variable object? or can the variable be of any type?

Quote from luishp on December 20, 2023, 12:10 pmIs $App[] an internal command that creates a variable object? or can the variable be of any type?
@lolo All the neoScript variables are accessed from JavaScript using $App.
If you use $App.myvar in JavaScript it will become [myvar] in neoScript.
$App.myvar is exactly the same as $App["myvar"] but in the last case you can use a variable instead so consider this:BeginJS thename = "myvar"; $App[thename] = "Hello!" EndJS jsAlert "[myvar]"I hope it helps.
Is $App[] an internal command that creates a variable object? or can the variable be of any type?
@lolo All the neoScript variables are accessed from JavaScript using $App.
If you use $App.myvar in JavaScript it will become [myvar] in neoScript.
$App.myvar is exactly the same as $App["myvar"] but in the last case you can use a variable instead so consider this:
BeginJS thename = "myvar"; $App[thename] = "Hello!" EndJS jsAlert "[myvar]"
I hope it helps.