Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Spider Monkey Panel (foo_spider_monkey_panel) (Read 348802 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1325




An error constantly crashes, what should I do? Is it a problem in the covers or?

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1326
I have the following error:

Error: Spider Monkey Panel v1.6.1 (Lastfm Cover: Lastfm Cover by zeremy)
CheckMenuRadioItem failed:
Index is out of bounds

File: thumbs.js
Line: 345, Column: 25
Stack traces:
  _thumbs/this.rbtn_up@thumbs.js:345:25
  _panel/this.rbtn_up@panel.js:85:11
  on_mouse_rbtn_up@lastfm_cover.js:197:18

The error occurs when I right-click on the "Panel properties" menu and change the value from 3 to 4 in the "THUMBS.ASPECT" field

The problem also occurs in the original smoralis footuner-master skin.






Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1327
I have the following error:

Error: Spider Monkey Panel v1.6.1 (Lastfm Cover: Lastfm Cover by zeremy)
CheckMenuRadioItem failed:
Index is out of bounds

File: thumbs.js
Line: 345, Column: 25
Stack traces:
  _thumbs/this.rbtn_up@thumbs.js:345:25
  _panel/this.rbtn_up@panel.js:85:11
  on_mouse_rbtn_up@lastfm_cover.js:197:18

The error occurs when I right-click on the "Panel properties" menu and change the value from 3 to 4 in the "THUMBS.ASPECT" field

The problem also occurs in the original smoralis footuner-master skin.







4 is an invalid value.
Valid values are 0,1,2,3.

Code: [Select]
panel.m.AppendMenuItem(MF_STRING, 1510, 'Crop (focus on centre)');
                panel.m.AppendMenuItem(MF_STRING, 1511, 'Crop (focus on top)');
                panel.m.AppendMenuItem(MF_STRING, 1512, 'Stretch');
                panel.m.AppendMenuItem(MF_STRING, 1513, 'Centre');
                panel.m.CheckMenuRadioItem(1510, 1513, this.properties.aspect.value + 1510);

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1328
It is a problem of having the same size between the radio station logo cover and the album cover downloaded in real time.









Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1329
I can't answer if you don't provide with what script / panel you are using to display the radio station cover.


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1331
You are using the same panel twice? one for the radio station cover and the other for last. fm cover?
The scripts in footuner are modified specifically for the layout, and I will not support any modifications needed to use otherwise.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1332
I was slow to answer because in the meantime after various attempts I managed to reduce the radio station logo panel so as to have uniformity between the radio logo cover and that of the album that downloads in real time.









Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1333
Why do I find 2 Spider Monkey Panels in Advance setting and what should I do to uninstall and reinstall?



I also have Out of Memory issues.

Can I implement memory?


 

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1335
Yes, it is.

At the moment I leave the JSplitter (first entry)

For Out of Memory problems I had benefit to change the value (maximum eap size....) to 4294967295

The next value I added a leading 1 152428800

But that's not enough to handle the extra panels.


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1336
Is it possible to make visualizations like this using SMP since I've created several Web Audio API visualizations that uses custom FFT instead of getByteFrequencyData() for the spectrum analyzer?

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1337
Got this error when trying to import a theme:

Code: [Select]
Error: Spider Monkey Panel v1.6.1 (TitleBar: TitleBar v1.2.3b21 by Ottodix)
ShowHtmlDialog failed:
WinAPI error:
  put_designMode failed with error (0x80004001):
    Not implemented.

File: JStheme_common.js
Line: 314, Column: 8
Stack trace:
  NoticeBox@JStheme_common.js:314:8
  on_init/welcome_msg_timer<@WSHtitle_bar.js:2941:4
What is this? It also shows the "Aw, crashed :(" message in red but only on the top bar.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1338
How to correctly write a condition for displaying one or another text, depending on whether a track is selected in the playlist or not.
Code: [Select]
if selected ? text 1 : text 2

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1339
How to correctly write a condition for displaying one or another text, depending on whether a track is selected in the playlist or not.
Code: [Select]
if selected ? text 1 : text 2
Without any context there is no proper answer:
https://theqwertiest.github.io/foo_spider_monkey_panel/assets/generated_files/docs/html/plman.html#.GetPlaylistSelectedItems

Code: [Select]
const myText = plman.GetPlaylistSelectedItems(plman.ActivePlaylist).Count ? 'text 1' : 'text2';

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1340
Thank you!

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1341
Quote
Is it possible to make visualizations like this using SMP since I've created several Web Audio API visualizations that uses custom FFT instead of getByteFrequencyData() for the spectrum analyzer?
Nvm, I think you can use audiowaveform or ffprobe to make audio waveform data and take only short chunk of it something like this (assuming it doesn't support WASM at all) with offset equal to current playback time for FFT spectrum analysis or something like that

Or is it that requires updating the SMP to support visualizations so Web Audio visualizers can be put into fb2k through SMP?

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1342
@TF3RDL , Web Audio API is not a part of ECMAScript standard and SpiderMonkey (which is the engine that SMP is using) is a pure JavaScript engine without any DOM extensions. SMP v1.x does not implement any DOM facilities either (except for small things like timers and console.log). Hence it's impossible to do what you want with SMP.

Additionally, Web Audio API is a *very* complex API which has a rather limited application in fb2k environment, so it won't be implemented in SMP v2.x either (i.e. features it provides are just not worth the time it requires to implement it).

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1343
Is there a simple method to make a font using GdiDrawText or DrawString to appear upside down?

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1344
I had the same problem and not founding a proper way to do it, without creating intermediate images, just used inverted chars.

Code: [Select]
"use strict";

include(fb.ComponentPath + 'docs\\Flags.js');

String.prototype.flip = function() {
const last = this.length - 1;
let result = new Array(this.length)
for (let i = last; i >= 0; --i) {
let c = this.charAt(i);
let r = flipTable[c];
result[last - i] = r !== void(0) ? r : c;
}
return result.join('');
}

const flipTable = {
a : '\u0250',
b : 'q',
c : '\u0254',
d : 'p',
e : '\u01DD',
f : '\u025F',
g : '\u0183',
h : '\u0265',
i : '\u0131',
j : '\u027E',
k : '\u029E',
//l : '\u0283',
m : '\u026F',
n : 'u',
r : '\u0279',
t : '\u0287',
v : '\u028C',
w : '\u028D',
y : '\u028E',
'.' : '\u02D9',
'[' : ']',
'(' : ')',
'{' : '}',
'?' : '\u00BF',
'!' : '\u00A1',
"\'" : ',',
'<' : '>',
'_' : '\u203E',
';' : '\u061B',
'\u203F' : '\u2040',
'\u2045' : '\u2046',
'\u2234' : '\u2235',
'\r' : '\n'
}
for (let i in flipTable) {flipTable[flipTable[i]] = i}

const gFont = gdi.Font('Segoe UI', 10);

function on_paint(gr) {
    const text = 'Hello'.flip();
    gr.SetTextRenderingHint(TextRenderingHint.ClearTypeGridFit);
    const w = gr.CalcTextWidth(text, gFont);
    const h = gr.CalcTextHeight(text, gFont);
    gr.GdiDrawText(text, gFont, 0x000000, (window.Width - w)/2, (window.Height - h)/2, window.Width, window.Height); // From top to bottom
    gr.SetTextRenderingHint(TextRenderingHint.SystemDefault);
    let x = (window.Width - w)/2;
    let y = (window.Height - h)/2 + 20;
    [...text].reverse().forEach((key, i) => {
        const w = gr.CalcTextWidth(key, gFont);
        gr.GdiDrawText(key, gFont, 0x000000, x, y, w, h, StringFormatFlags.DirectionVertical); // From top to bottom
        x += w;
    });
    x = (window.Width - w)/2;
    y += 20;
    [...text].reverse().forEach((key, i) => {
        const w = gr.CalcTextWidth(key, gFont);
        gr.GdiDrawText(key, gFont, 0x000000, x, y, w, h, StringFormatFlags.DirectionVertical); // From top to bottom
        y += h;
    });
}
Play with chars and flags.

Have not found a way to align text to top, i.e. 'H' does not measure in height the same than 'o', but CalcTextHeight keeps giving the same result for both (so I can not reduce the vertical offset per letter).

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1345
Thanks for getting back. (I've been away)

This is what I was looking for. I tried ChatGPT but this is much better than what 'he' came up with. :)

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1346
A small status update: I've managed to switch jobs and relocate to Netherlands, which should secure my livelihood for mid-term (and hopefully long-term as well). It will be a little hectic while I'm settling down, but after that I should have enough free time and (more importantly :) ) mental energy to work on my components (especially once I secure a proper workstation instead of my subpar-performance netbook).

Meanwhile, I was working a bit on v2 of SMP in the background. It's still far from ready, but I wanted to share a sneak-peek on some of it's features.

One of the main goals of v2 is to make SMP much friendlier for JS devs, both for those who have experience working with JS (e.g. NodeJS, web API) and for those who don't. This is achieved by replacing most(all?) ad-hoc solutions with standard or standard-like solutions:
- New NodeJS-like package format instead of ad-hoc packages.
- Module import/export support instead of `include`.
- API rewrite:
  - 'Modulerised' API: all API is now accessible through built-in modules.
  - WebAPI-like/NodeJS-like API: replaced old API with standard analogues. E.g. `Graphics` > CanvasAPI, static hardcoded event callbacks >`addEventListener` in corresponding objects, `FileSystemObject` and various file text APIs > nodejs fs module.
  - Async/off-thread methods where needed: in v1 some methods perform very CPU intensive operations, which blocks the main thread and makes UI unresponsive. Async methods instead return a Promise which will be resolved in the worker thread, thus removing the blocking.
  - Huge performance and memory consumption improvements.
  - Lots of new stuff that was not possible or available in the v1.
- TypeScript type bindings for SMP API.
- v1 compatibility mode.

Progress on v2 can be tracked via this ticket: https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/213

See ya all later and stay safe :)

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1347
Wonderful news! Thanks for your follow up!
Good luck with your new job!

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1348
Sound good... have a nice (busy) relocation.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1349
Yuri, it is good to hear you're doing fine, hope you like the Netherlands and its folks.
You should make a diary and write about your Dutch adventures, I would buy it =)
Also have fun starting to learn the Dutch language =)