Execution timed-out
-
I removed These LAF Lines And Error Goes Away
laf.registerFunction("drawPopupMenuBackground", function(d, obj) { d.fillAll(0XFF171717); d.setColour(Colours.red); d.drawRect([0, 0, obj.width, obj.height], 0); }); laf.registerFunction("drawPopupMenuItem", function(g, obj) { var a = obj.area; var h = a[3]; if(obj.isSeparator) { g.setColour(0XFF171717); g.drawLine(a[0]+10, a[0] + a[2]-10, a[1] + a[3]/2, a[1] + a[3]/2, 1.0); return; } if(obj.isTicked) { g.setColour(0xFF727272); g.fillEllipse([a[0] + h/3, a[1] + h/3, h/3, h/3]); } g.setFont("Averta-Medium", 16); if(obj.isHighlighted) { g.setColour(0x26bababa); g.fillRect(obj.area); g.setColour(Colours.white); g.drawAlignedText(obj.text, [a[0] + h, a[1], a[2] - h, a[3]], "left"); }else{ g.setColour(0xFF727272); g.drawAlignedText(obj.text, [a[0] + h, a[1], a[2] - h, a[3]], "left"); } });
-
@Natan Last commit here, moving mouse like crazy, no errors...
-
@ustk Can You Please Point Me To The Commit
Thank You Sir -
@Natan But this is not the solution... we need Popup menu LAF too... Yeah, I have moved mouse over CB ... I think... I need to test it on ...
HISE-61256Lej1XqG89YWa2ah4gyv9xt8DXJjgMdb9138 commit -
@Natan Of course, look at my post right above :)
-
@ustk Haha, I See No Links Or Commit Version :)
This One
commit 3cad017c7ad22f580c05b5a4de743ac6251428bfremoved text in expansion column
https://github.com/christophhart/HISE/commit/3cad017c7ad22f580c05b5a4de743ac6251428bf -
@Natan The last is... the last... :)
-
@Natan No, No problem found in LAF Code... with the latest Commit ... working fine...
-
I Pretty Stocked Here
The same Snippet Throws Me Errors, But Works Fine On Other Computers :(
-
@Natan I am getting same error....
-
@Tania-Ghosh Could You Please Post A Video
I Guess This Is A Bug :/ -
@Natan @Rudra-Ghosh https://youtu.be/FC5jzB02-Bo
-
Yeah I Told @Rudra-Ghosh n @ustk That There Is A Bug In This,
My Whole Night Ruined To Find An Answer To This, Commenting Out 8000 Lines Of My Script,
:)
Thank You @Tania-Ghosh -
@Christoph-Hart Do You Have Any Idea Over This?
-
I Guess We Are In The Same Frequency :/
@andioak said in Finally: Fully customize stock UI elements with a scripted LookAndFeel:
While trying to add a customization I seem to get an infinite loop:
laf.registerFunction("drawToggleButton", function(g, obj) { var blue = "0xFB00A6C9"; var yellowish = "0xFBB4CF0C"; if(obj.text == "Button1") // accessing only one of the item for a special color, or anything: { Console.print("object id is button1"); // this code keeps repeating over and over... ? g.setColour(yellowish); // custom color only here. } else { g.setColour(blue); } g.fillRoundedRectangle(obj.area, 4.0); if(obj.over) g.fillRoundedRectangle(obj.area, 4.0); if(obj.down) g.fillRoundedRectangle(obj.area, 4.0); g.setColour(Colours.withAlpha(obj.textColour, obj.value ? 1.0 : 0.3)); g.setFont("Arial Bold", 12.0); g.drawAlignedText(obj.text, obj.area, "centred"); });
The
if (obj.text == "Button1")
is processed all the time and always returns true, even though there is only one single item with that name.UPDATE: after testing the same if-types as already used in the hise docs copy-paste that this one is made from, it works if I remove the
Console.print()
and replace the if statement with this only:... g.setColour(blue); if(obj.text == "Button2") g.setColour(yellowish); ...
Is that how this was intended to be used only? Is there an issue with the Console? Not being handled in that stage?
-
-
@d-healey It's Not The Cause Of This Issue Sir.
Check The Above Post That I Posted With Youtube Link.8000, Yeah Because All Of My UI Designed Using Vectors SVG Files.
I Worked Around 1 Year Over This Masterpiece
With Just 10 Panels You Simply Reach To 2k In Code Lines. -
@Natan Are you using namespaces to break up your code?
-
Only Two, One For The Serial Number Authorization, And One For VU Meter Whcih I Removed From The Code To Solve The Time Out Issue.
Just Replaced It With Another One, And NO Time Out Error Shows Up So Far.
-
@Natan 8000 lines in two namespaces! That's double crazy.
@d-healey It's Not The Cause Of This Issue Sir.
Correct, but it makes it a whole lot harder to debug and maintain, and almost certainly your code needs some optimisation. Start by creating one namespace for each of your main panels, this will make things much simpler.