This repository has been archived by the owner on Apr 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Cannot read property 'DisplayText' of undefined when adding many Items #2
Comments
My code ( let animationMenu = new NativeUI.Menu('Animation', '', new NativeUI.Point(10, 50));
//animationMenu.Close();
let count = animationData.length;
alt.log('Count: ' + count);
let animationListItems = new NativeUI.ItemsCollection(buildStringRange(0, count));
let animationList = new NativeUI.UIMenuListItem('Animationen', '', animationListItems);
let animationFlagsLoop = new NativeUI.UIMenuCheckboxItem('Loop', false, 'Animation wird wiederholt.');
let animationFlagsStopOnLastFrame = new NativeUI.UIMenuCheckboxItem('StopOnLastFrame', false, 'Animation wird nach dem letzten Frame beendet.');
let animationFlagsUpperBody = new NativeUI.UIMenuCheckboxItem('UpperBody', false, 'Animiert nur den oberen Teil des Characters.');
let animationFlagsAllowPlayerControl = new NativeUI.UIMenuCheckboxItem('AllowPlayerControl', false, 'Erlaubt das Steuern des Characters trotz Animation.');
let animationFlagsCancelable = new NativeUI.UIMenuCheckboxItem('Cancelable', false, 'Erlaub das abbrechen der Animation.');
animationMenu.AddItem(animationList);
animationMenu.AddItem(new NativeUI.UIMenuItem('Flags:'));
animationMenu.AddItem(animationFlagsLoop);
animationMenu.AddItem(animationFlagsStopOnLastFrame);
animationMenu.AddItem(animationFlagsUpperBody);
animationMenu.AddItem(animationFlagsAllowPlayerControl);
animationMenu.AddItem(animationFlagsCancelable);
function buildStringRange(start, end) {
let ret = new Array();
for (let i = start; i < end; ++i) {
ret.push('' + i);
}
return ret;
} |
Ok, I could break it down... It seems like the max number of ListItems is 100000 ... |
It's been a while but I just rebased my project on a more up to date codebase. Would be awesome if you could recheck your issue and let me know if the problem still exists. |
Should be fixed with latest Version |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Adding a huge amount of strings (I added 138133 items) to the
UIMenuListItem
the console (F8) gets flooded with this error:The text was updated successfully, but these errors were encountered: