Standalone Lua Not Loading

Home Forums General Programming Standalone Lua Not Loading

Viewing 11 posts - 21 through 31 (of 31 total)
  • Author
    Posts
  • #117470
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    Bug/question posted. Let’s see…

    #117473
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 236
    • Total: 237
    • ★★

    I guess in a way your code is the same as mine, but different, but still the same result. In fact you have three states to check against and still no go!

    Would be interesting to know how the argument ‘type’ works. It is an enumerator of CtrlrInstance, but how to access that through lua? Which method and syntax? Must be part of class panel I presume.

    https://github.com/RomanKubiak/ctrlr/blob/de28dc3ad3591a5832f1e38ce8adabc9369b1011/Source/Lua/CtrlrLuaPanel.cpp

    • This reply was modified 1 week, 6 days ago by dnaldoogdnaldoog.
    #117481
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    I tried console(panel:getPanelInstanceID()) but didn’t work…

    You find it in the CtrlrPanel.h file at
    https://github.com/RomanKubiak/ctrlr/blob/master/Source/Core/CtrlrPanel/CtrlrPanel.h

    Will try the other ones to see if they work.

    	/* Instance information methods */
    	const String getPanelInstanceID();
    	const String getPanelInstanceManufacturerID();
    	const String getPanelInstanceVersionString();
    	int getPanelInstanceVersionInt();
            const String getPanelInstanceName();
            const String getPanelInstanceManufacturer();
    #117486
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 236
    • Total: 237
    • ★★
    
     "InstanceSingle",
     "InstanceMulti",
     "InstanceSingleRestriced",
     "InstanceSingleEngine",
     "InstanceMultiEngine",
     "InstanceSingleRestrictedEngine"
    

    I discovered you can access these enum integers by calling the class directly. I think panel is an object of CtrlrPanel, but what to do with this I don’t know, unless you could find out how to return type (I have tried but failed), then compare it with CtrlrPanel.InstanceSingleRestrictedEngine – that is if type returns an integer it would probably be 0 to 5. But would say “InstanceSingle”, “InstanceMulti”, be what we are after anyway?

    console(String("enum =\t"..CtrlrPanel.InstanceSingleRestrictedEngine))
    prints “enum = 5“.

    https://github.com/RomanKubiak/ctrlr/blob/de28dc3ad3591a5832f1e38ce8adabc9369b1011/Source/Lua/CtrlrLuaPanel.cpp

    #117487
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    The point is: we don’t know why the OnChange method is fired when the second panel opens and not when the first one opens and this with exactly the same code.
    My guess is that some variables are not well separated between panel instances when several are open at the same time and thus the second panel things that everything is OK while it isn’t.

    Only Roman can probably help us here…

    #117488
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 236
    • Total: 237
    • ★★

    For some reason this JD-990 Editor can be loaded twice and nothing pops up. I don’t know why.

    #117500
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    Very interesting… I will download it and analyze it carefully.
    Hope the developer found the miracle recipe 🙂

    #117501
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 236
    • Total: 237
    • ★★

    I’ve tried to duplicate it in the panels attached above and the code suggestions above, but something is missing!

    #117511
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    So, this is looking to be a nice and interesting challenge 🙂

    #117512
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    OK. I opened the panel but all controls are locked for editing so I cannot see their properties.
    How did you do that?
    I opened it twice and indeed, no problem.
    And, btw, as you are the developer, shouldn’t you know how you did prevent the popups for coming?
    Joke aside, very nice panel!

    #117513
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 236
    • Total: 237
    • ★★

    Thanks Goodweather,

    It’s a nice compliment coming from you.

    Well the top layer is supposed to be hidden, so I think because it’s visible in this releases it locks the controls sitting in lower layers. It’s unintentional.

    I think there must be something in the initialization phase that stops the annoying popup behaviour; again it’s probably a lucky fluke, but when trying to duplicate it with other panels I can’t always reproduce it.

    I’ve said before that I use a uiButton with a callback function that runs a timer on boot that switches a variable from 0 to 1 allowing a function to run, but in some panels this still doesn’t repress a popup from opening when a second panel is opened. So the code logic is the same, but this panel doesn’t fire off popups etc. I can only think that there is some asynchronous(??) random(??) loading of these functions and in this particular panel the function firing the timer comes late in the sequence. Maybe it’s based on the name of the function/modulator or where it sits (in a layer) or like the pairs iterator, the order is unpredictable.

Viewing 11 posts - 21 through 31 (of 31 total)
  • You must be logged in to reply to this topic.
There is currently 0 users and 28 guests online
No users are currently active
Forum Statistics
Threads: 2,308, Posts: 16,186, Members: 59,522
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!