Home › Forums › General › Programming › Standalone Lua Not Loading
Tagged: lua disabled, standalone
- This topic has 30 replies, 3 voices, and was last updated 4 years ago by dnaldoog.
-
AuthorPosts
-
March 21, 2020 at 5:13 pm #117470
Bug/question posted. Let’s see…
March 22, 2020 at 1:56 am #117473I 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.
- This reply was modified 4 years ago by dnaldoog.
March 23, 2020 at 11:27 am #117481I 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.hWill 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();
March 23, 2020 at 1:37 pm #117486"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“.March 23, 2020 at 6:19 pm #117487The 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…
March 24, 2020 at 5:20 am #117488For some reason this JD-990 Editor can be loaded twice and nothing pops up. I don’t know why.
March 24, 2020 at 8:48 pm #117500Very interesting… I will download it and analyze it carefully.
Hope the developer found the miracle recipe 🙂March 25, 2020 at 1:25 am #117501I’ve tried to duplicate it in the panels attached above and the code suggestions above, but something is missing!
March 25, 2020 at 5:40 pm #117511So, this is looking to be a nice and interesting challenge 🙂
March 25, 2020 at 5:55 pm #117512OK. 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!March 26, 2020 at 2:15 am #117513Thanks 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.
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.