console error

Home Forums General Programming console error

Tagged: , ,

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #72096
    m.tarenskeen
    Participant
      • Topics: 30
      • Replies: 113
      • Total: 143
      • ★★

      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 years, 11 months ago by m.tarenskeen.
      • This topic was modified 6 years, 11 months ago by m.tarenskeen.
      • This topic was modified 6 years, 11 months ago by m.tarenskeen.
      • This topic was modified 6 years, 9 months ago by m.tarenskeen.
      #72099
      human fly
      Participant
        • Topics: 124
        • Replies: 1070
        • Total: 1194
        • ★★★★

        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
          • Topics: 30
          • Replies: 113
          • Total: 143
          • ★★

          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
            • Topics: 124
            • Replies: 1070
            • Total: 1194
            • ★★★★

            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
              • Topics: 124
              • Replies: 1070
              • Total: 1194
              • ★★★★

              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
                • Topics: 30
                • Replies: 113
                • Total: 143
                • ★★

                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
                  • Topics: 30
                  • Replies: 113
                  • Total: 143
                  • ★★

                  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
                    • Topics: 0
                    • Replies: 11
                    • Total: 11

                    Confirmed (Win 8.1, Ctrlr-5.5.2)

                    • This reply was modified 6 years, 10 months ago by spk77.
                    Attachments:
                    You must be logged in to view attached files.
                    #72421
                    audiosync
                    Participant
                      • Topics: 5
                      • Replies: 13
                      • Total: 18

                      Same problem here…

                      #72886
                      coupe70
                      Participant
                        • Topics: 3
                        • Replies: 2
                        • Total: 5

                        Has this been solved somehow ?

                        #72888
                        human fly
                        Participant
                          • Topics: 124
                          • Replies: 1070
                          • Total: 1194
                          • ★★★★

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

                          (please advise on updates between versions)

                          #72890
                          dnaldoog
                          Participant
                            • Topics: 4
                            • Replies: 480
                            • Total: 484
                            • ★★

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

                            #72892
                            m.tarenskeen
                            Participant
                              • Topics: 30
                              • Replies: 113
                              • Total: 143
                              • ★★

                              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
                              Participant
                                • Topics: 45
                                • Replies: 550
                                • Total: 595
                                • ★★★

                                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
                                  • Topics: 124
                                  • Replies: 1070
                                  • Total: 1194
                                  • ★★★★

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

                                  #72898
                                  dnaldoog
                                  Participant
                                    • Topics: 4
                                    • Replies: 480
                                    • Total: 484
                                    • ★★

                                    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 6 years, 7 months ago by dnaldoog.
                                    #72902
                                    Paul Scheidt
                                    Participant
                                      • Topics: 2
                                      • Replies: 11
                                      • Total: 13

                                      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)
                                    • The forum ‘Programming’ is closed to new topics and replies.
                                    There is currently 0 users and 90 guests online
                                    No users are currently active
                                    Forum Statistics
                                    Threads: 2,495, Posts: 17,374, Members: 77,605
                                    Most users ever online was 12 on January 22, 2019 3:47 pm
                                    Ctrlr