Multi layout on ControlDesk using Python [solved]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • medlot
    New Member
    • Nov 2006
    • 12

    #16
    Very funny now, no error is displayed on the interpreter panel but nothing happens. I do import the python file _layout_2 rather than the layout file layout_2.lay as you said.

    I open only the layout_1 window, i swith to the animation mode. Then when clicking on the button, I suspect the layout_2 window to appear, but nothing happens !

    did I somthing wrong?

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #17
      Originally posted by medlot
      Very funny now, no error is displayed on the interpreter panel but nothing happens. I do import the python file _layout_2 rather than the layout file layout_2.lay as you said.

      I open only the layout_1 window, i swith to the animation mode. Then when clicking on the button, I suspect the layout_2 window to appear, but nothing happens !

      did I somthing wrong?
      If the code looks like the (minus weird pasting artifacts):
      Code:
       
       
      # -*- coding: cp1252 -*-
       
      def On_Instrumentation_layout_2_dSPACEDisplayControl_Click():
      	"""
      	Syntax : On_Instrumentation_layout_2_dSPACEDisplayControl_C lick()
       
      	Purpose : Click event handler.
       
      	Parameters : None
       
      	"""
      	print "On_Instrumentation_layout_2_dSPACEDisplayControl_Click called"
      then all I expect is:
      On_Instrumentat ion_layout_2_dS PACEDisplayCont rol_Click called
      printed on the interpreter panel (which comfirms that you can now call a function in another module). Look like you need to add some fuctionality to get what you are after.

      Comment

      • medlot
        New Member
        • Nov 2006
        • 12

        #18
        Sorry, I didn't understand what I should do within your previous post , may be a problem of US english.

        Comment

        • bartonc
          Recognized Expert Expert
          • Sep 2006
          • 6478

          #19
          Originally posted by medlot
          Sorry, I didn't understand what I should do within your previous post , may be a problem of US english.
          Could be a problem with my usage.... Your english is great!
          _layout_2 does print to the screen, right?
          If so, it is working as far as you have written code for.
          To get more than printing (figuratively) "Hello", there must be more code in the function that you call. 3:00am PST. More later.

          Comment

          • medlot
            New Member
            • Nov 2006
            • 12

            #20
            Right now, when clicking on the button, I have the code that it is expected to be printed.

            Code:
            On_Instrumentation_layout_1_dSPACEOnOffButtonControl_Click called
            But still no layout_2 window appearing. As you sad, there shoud be more things to add to perform that. I m trying to find a solution but stay in touch please.

            Comment

            • bartonc
              Recognized Expert Expert
              • Sep 2006
              • 6478

              #21
              Originally posted by medlot
              Right now, when clicking on the button, I have the code that it is expected to be printed.

              Code:
              On_Instrumentation_layout_1_dSPACEOnOffButtonControl_Click called
              But still no layout_2 window appearing. As you sad, there shoud be more things to add to perform that. I m trying to find a solution but stay in touch please.
              I looked at dSpace ControlDesk. Looks like good software. Python is a good choice for user extentions. My favorite book to learn python is published by O'Reilly, by Mark Lutz and David Ascher, April 1999
              1. Learning Python
                French translation, February 2000
              I found at this link:


              Hope this helps.

              Comment

              • medlot
                New Member
                • Nov 2006
                • 12

                #22
                Thanks, I m on the rails now....
                I ll stay in touch with this forum, it's very helpfull.

                Comment

                • bartonc
                  Recognized Expert Expert
                  • Sep 2006
                  • 6478

                  #23
                  Originally posted by medlot
                  Thanks, I m on the rails now....
                  I ll stay in touch with this forum, it's very helpfull.
                  You are quite welcome. That's what we are here for!
                  Keep posting,
                  Barton

                  Comment

                  Working...