Home Forums General Programming console error

Tagged: , ,

This topic contains 16 replies, has 8 voices, and was last updated by  Paul Scheidt 2 months, 1 week ago.

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #72096

    m.tarenskeen
    Participant

    Hi,

    I installed Ctrlr-5.5.2 on Windows 7.

    Suddenly I can’t do a simple thing like

    console("Hello World")

    in my LUA code anymore.
    I also tried from Panel->LUA Editor

    >>> console("Hello world")
    ERROR: Ambiguous, candidates:
    void console(String const&)
    void console(std::string const&)

    What’s this? I use console() a lot, especially when developing a new panel, and to try and test lua code.

    `

    • This topic was modified 6 months, 2 weeks ago by  m.tarenskeen.
    • This topic was modified 6 months, 2 weeks ago by  m.tarenskeen.
    • This topic was modified 6 months, 2 weeks ago by  m.tarenskeen.
    • This topic was modified 4 months, 3 weeks ago by  m.tarenskeen.
    #72099

    human fly
    Participant

    please give a step-by-step on how to print Hello World.
    (5.4.29 win10 here) i still haven’t figured out how to
    print anything in the console.

    #72100

    m.tarenskeen
    Participant

    What do you mean? What have you tried?

    1. Start ctrlr
    2. From dropdown menu go to: Panel -> LUA console
    3. Click on the bottom part of the Console
    4. type console("Hello world")
    5. The text “Hello world” should appear on the upper part of the Console.

    If this works, you can try using console(“Any text bla bla”) in LUA code you use for your Panels.

    I have reverted to Ctrlr 5.4.29 after having too much trouble with 5.5.2.

    #72102

    human fly
    Participant

    ah, great. thank you.
    when i tried, i was using print
    so that works 🙂 and i can get on with some tutorials.

    is console the same as print? i’ve seen console used in
    methods ie: where a patch name string is being assembled.
    where does ‘console’ come into play in a finished panel?

    what i’ve noticed about 5.4.29, vs. the 5.4.2 version i was
    using before – is that the compiler no long tells you why and
    where your method has failed (in red). this was useful. now
    you only get info when you compile successfully and run it
    when you start the panel, or trigger it from a modulator.
    so i preferred 5.4.2 in that sense.
    don’t know what other changes have been made.

    Q? > is it possible to go backwards in versions with files? !
    ie: can you open a 5.5.xx file in 5.4.xx ?

    #72146

    human fly
    Participant

    here’s an example:
    if you open the DEMO-Move component with animation panel,
    myMethod() has:

    myMethod = function(mod, value)
    	console ("animate")
    	anim = CtrlrLuaComponentAnimator()
    
    	if value == 1 then
    		anim:animateComponent(
    			panel:getComponent("modulator-1"),
    			panel:getComponent("pos1"):getLuaBounds(),
    			1.0,
    			1000,
    			false,
    			1000,
    			1000
    		)
    	end
    
    	-- etc.
    end

    and it indeed prints ‘animate’ to the console.

    so, from there, what can i do with that?
    ie: if i can get it to print to the console,
    is it just a display of what i can send to
    something else? (newb…)
    example please, if possible.

    #72148

    m.tarenskeen
    Participant

    I frequently use the console() function to insert code in my LUA code for testing and debugging purposes. For example to track the value of certain variables when doing things in my panel. The console window has to be open to see anything. Or, on my Linux laptop, sometimes I start Ctrlr from aterminal window and I can see the messages in the terminal window, or redirect them to a logfile from there.

    If you want all kinds of strings and values to show up in a dialog window that pops up from a panel there are other methods that you need. There are several examples of that in the Ctrlr DEMO distribution.

    #72153

    m.tarenskeen
    Participant

    This thread is drifting away from my original question, which still isn’t answered:

    why does console("Hello World") fail and generate all these error messages since Ctrlr version 5.5.2 ?

    #72412

    spk77
    Participant

    Confirmed (Win 8.1, Ctrlr-5.5.2)

    • This reply was modified 4 months, 4 weeks ago by  spk77.
    Attachments:
    You must be logged in to view attached files.
    #72421
    audiosync
    audiosync
    Participant

    Same problem here…

    #72886

    coupe70
    Participant

    Has this been solved somehow ?

    #72888

    human fly
    Participant

    any reason you would not regress to 5.4.29?
    console works here for PC win10.

    (please advise on updates between versions)

    #72890
    dnaldoog
    dnaldoog
    Participant

    console(String(“Hello World”)) should solve the problem

    #72892

    m.tarenskeen
    Participant

    console(String(“Hello World”)) should solve the problem

    OK, thanks. But why? And does this make it not-a-bug?
    Seems a lot of typing just to say “Hello World”.

    #72896
    goodweather
    goodweather
    Participant

    I’m using 5.3.201 and no issue…
    I don’t know what has been changed in all versions 5.4 and 5.5 but know several people having different problems. So I prefer a version that works 🙂

    #72897

    human fly
    Participant

    goodweather, please come over and help resolve the
    ‘custom’ thing.

    #72898
    dnaldoog
    dnaldoog
    Participant

    I found that in the source code headers of version 5.3 there is only:
    static void console (const String &arg);

    but in version 5.5 there is:

    static void console (const String &arg);
    static void console (const std::string &arg);

    ctrlr/Source/Lua/JuceClasses/LGlobalFunctions.h

    so that is probably causing:

    ERROR: Ambiguous, candidates:
    void console(String const&)
    void console(std::string const&)

    …but what this change represents, I wouldn’t know.

    • This reply was modified 2 months, 1 week ago by dnaldoog dnaldoog.
    #72902

    Paul Scheidt
    Participant

    I had the same console error with 5.5.2 on Windows 10, so I’m using 5.4.29 and it works fine.

Viewing 17 posts - 1 through 17 (of 17 total)

You must be logged in to reply to this topic.

Comments are closed.