• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Curved Staircases

Scheduled Pinned Locked Moved Woodworking
171 Posts 19 Posters 33.1k Views 19 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    Garry K
    last edited by 2 Feb 2014, 06:16

    I'll have to get back into this in the morning - I've been up 20 hrs straight and can't think.

    I am putting out both errors - obviously I should have said a bit more with the messages.

    
    if ( xmlHttp.readyState == 4 )
    {
    if ( xmlHttp.status == 200 )
    	ruby_call( xmlHttp.responseText );
    else
    	ruby_call( 'error' );
    }
    
    

    In the ruby_call I pass back the JSON message and then decode it.
    If it doesn't come back then a hash object doesn't get created.

    Then this bit of code gets hit.

    
    if ( ! defined?( @@hash_obj ) )
    	UI.messagebox( "Cannot reach web service" );
    	return;
    end
    
    
    1 Reply Last reply Reply Quote 0
    • J Offline
      jeff hammond
      last edited by 2 Feb 2014, 06:24

      @garry k said:

      Jeff,

      Thanks - I see that you downloaded it. I have no idea why you couldn't reach the web site.

      Perhaps try from your browser ( I know it won't work ) but you should still see a message if you can reach the web site.

      http://cabmaker32.com//stairmaker_service.php

      If you can reach you should get a JSON response saying invalid format.

      from my browser with that link i get:
      {"code":-11,"text":"invalid format","token":240583372}

      @unknownuser said:

      I'm puzzled. I am getting the same thing now. First a "http Error" and the second time I click the button it says "Cannot reach web service"

      I will try to dig in and see what is going on.

      OK - when I tried running it my defaults.txt file was pointing to my local test web site.
      I switched over to cabmaker32.com and it works - even when I am logged on to the sit.

      i've done the following to the defaults.txt file


      user information

      userid=Jeff Hammond
      password=(my 12digit PW)
      host=http://cabmaker32.com/

      default non length values for input box

      debug_level=0
      direction=Anti Clockwise
      inside_option=None
      outside_option=None
      inside_stringer=Sawtooth
      etcetc..


      i assume that's correct, right?

      i tried logging out of your site and i still get the same error message when using Stair Maker.. i can click on the Extrude Handrail icon and i get the message about needing a curve selected.. so i select a curve then click the icon and i get an error:

      [EDIT] oops.. ruby error removed[/edit]

      i won't be able to troubleshoot too much tonight but i'll try some things in the morning if you leave instructions.

      dotdotdot

      1 Reply Last reply Reply Quote 0
      • J Offline
        jeff hammond
        last edited by 2 Feb 2014, 06:25

        @garry k said:

        I'll have to get back into this in the morning - I've been up 20 hrs straight and can't think.

        ๐Ÿ˜†
        get some rest!

        dotdotdot

        1 Reply Last reply Reply Quote 0
        • G Offline
          Garry K
          last edited by 2 Feb 2014, 13:02

          Jeff,

          1. You can reach my web site

          2. The defaults.txt file looks fine

          3. This is the code on line 792 where the error occurs for extrude handrail.

          File.join( Sketchup.find_support_file( "" ), "Plugins", "GKWare", "StairMaker", "Handrail" )

          StairMaker expects the folder Plugins/GKWare/StairMaker/Handrail
          It then goes through the files to create a list of the 6 default handrails.

          Could you run these lines of code in the Web Console

          puts Sketchup.find_support_file( "" )
          puts File.join( Sketchup.find_support_file( "" ), "Plugins", "GKWare", "StairMaker", "Handrail" )

          1 Reply Last reply Reply Quote 0
          • G Offline
            Garry K
            last edited by 2 Feb 2014, 13:52

            I have just read an article by Thomas and now realize that I am currently not supporting plugins installed in shared location. I will change this, test and get back to you.

            1 Reply Last reply Reply Quote 0
            • G Offline
              Garry K
              last edited by 2 Feb 2014, 17:35

              I've fixed the path issue and uploaded a new version to my website.

              The new version has an rbz extension and has increased the version.
              Even if your old version worked - it won't now.

              Please download a new version.

              1 Reply Last reply Reply Quote 0
              • J Offline
                jeff hammond
                last edited by 2 Feb 2014, 19:14

                ok.. so you've made some progress ๐Ÿ˜‰

                i can now activate the plugin without the previous error message.

                once i'm in it though, there are a few problems with the window size/placement etc but that's not too important right now.. i can't use any of the drop down menus:

                Screen Shot 2014-02-02 at 2.04.17 PM.png

                i can enter text/number in the text fields.. i can also check/uncheck the 'open risers' box.. and i can push the OK button but nothing is generated as i assume the drop downs should have some settings applied?

                i get this in the ruby console:

                [EDIT] no errors are being reported in the ruby console [/edit]


                not sure but you may be trying to re-invent the wheel if you single handedly troubleshoot the sketchup web dialogs on mac.. thomthom, or TIG, or Fredo have already figured this stuff out and it might be best to contact one of them for some advice/tips.. ?

                dotdotdot

                1 Reply Last reply Reply Quote 0
                • G Offline
                  Garry K
                  last edited by 2 Feb 2014, 19:41

                  We aren't too far away. However - data from the defaults.txt file is suppose to populate the controls with defaults.

                  That isn't happening.

                  Perhaps try the extrude handrail. This one is a Sketchup input box as opposed to the web dialog. Let's see if there are 6 handrail profiles in the drop down list? That should help tell me if the problem is in reading the values or in popluating the web dialog.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jeff hammond
                    last edited by 2 Feb 2014, 20:23

                    .

                    yep.. handrail works.. here's a 'traditional'

                    handrail.jpg

                    dotdotdot

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      Garry K
                      last edited by 2 Feb 2014, 21:26

                      Jeff Thanks a ton. You've been very helpful.

                      I'm going to build a shell that just populates the web dialog box with values. It will be easier to debug. Then I will see if thomthom, or TIG can help out.

                      1 Reply Last reply Reply Quote 0
                      • G Offline
                        Garry K
                        last edited by 3 Feb 2014, 20:59

                        I re read all of thomthom's documentation on web dialogs. It turns out that Safari doesn't support the onload event. I've changed how I am doing things. I'm hopeful that I've got it figured out.

                        Please download a current version and try it out on the mac - thanks.

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          jeff hammond
                          last edited by 4 Feb 2014, 02:28

                          hmm.. same thing as last time..

                          i'm not sure if there's something i can check to be positive i'm using the latest test version but in this case, i assume since i had to re-edit the txt file, all went well on the installation side of things.

                          dotdotdot

                          1 Reply Last reply Reply Quote 0
                          • G Offline
                            Garry K
                            last edited by 4 Feb 2014, 15:43

                            Thanks,

                            You can check the version in the Extensions area under Preferences. However - I did not change the version number this time. It is 1.0.3
                            Next time we try I will make a point of increasing the build number.

                            I will need to dig into this.

                            BTW are you running Sketchup 2014?
                            I haven't tested my plugin with that version - I didn't even know that it was out yet.

                            1 Reply Last reply Reply Quote 0
                            • G Offline
                              Garry K
                              last edited by 4 Feb 2014, 17:32

                              Jeff,

                              What version of SU are you running?

                              What I find interesting and frustrating is that I thought I solved this a month ago. Driven ran my test code on his mac and it seemed to work fine.

                              There is a dialog_test.rb file part way down this thread

                              http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=55577

                              perhaps you can try it and see if you 1) get a populated web dialog and 2) get an SU message box with you click "OK"

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                jeff hammond
                                last edited by 4 Feb 2014, 21:26

                                @garry k said:

                                Jeff,

                                What version of SU are you running?

                                What I find interesting and frustrating is that I thought I solved this a month ago. Driven ran my test code on his mac and it seemed to work fine.

                                There is a dialog_test.rb file part way down this thread

                                http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=55577

                                perhaps you can try it and see if you 1) get a populated web dialog and 2) get an SU message box with you click "OK"

                                i'm doing all the testing on SketchUp Make 2013 and OSX 10.9.1 (mavericks)

                                Screen Shot 2014-02-04 at 4.31.50 PM.png

                                (some of the earlier ruby errors (which i've edited out of the thread) were being reported in a weird version of sketchup i have but i switched to trying in in SuMake.)


                                when using the web dialog test via the link you provided, all seems to work fine (again, sizing/layout issues with the actual window but the functionality of the dialog appears to work well-- drop downs, text fields, buttons, check boxes.. no problems).. plus there are default setting already entered in the text fields etc when doing the test.

                                message box upon clicking 'OK' in the test:
                                Screen Shot 2014-02-04 at 4.33.45 PM.png

                                dotdotdot

                                1 Reply Last reply Reply Quote 0
                                • G Offline
                                  Garry K
                                  last edited by 4 Feb 2014, 22:01

                                  When I did this test I thought we were good to go with Safari.

                                  I suppose it is possible that it is a timing issue - which is possible since Safari works asynchronously.

                                  The difference is instead of hard coding the defaults, the program retrieves values out of variables - that would slow it down.

                                  I think the next step is to push out some info to the console. I have made a few other changes as I am getting ready to publish the plugin via the plugin store.

                                  Anyway - I wish I could afford a Mac - then I wouldn't have to rely on you as much. I am grateful.

                                  A question on the side. Your bio states you are a carpenter. What kind of work do you do may I ask?

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    jeff hammond
                                    last edited by 4 Feb 2014, 22:26

                                    @garry k said:

                                    A question on the side. Your bio states you are a carpenter. What kind of work do you do may I ask?

                                    i build skateboard ramps:

                                    2.jpg

                                    4.jpg

                                    1.jpg

                                    5.JPG

                                    6.jpg

                                    dotdotdot

                                    1 Reply Last reply Reply Quote 0
                                    • G Offline
                                      Garry K
                                      last edited by 4 Feb 2014, 22:49

                                      Pretty cool - my oldest son tore his ACL while skateboarding. He was on a pretty steep street.

                                      I've move the building of the string with all the defaults out of the call back. This should help speed it up.

                                      I've also put in a few debug messages to the console.

                                      Since you have a user id and password already I'll just put the plugin here.


                                      Stair Maker plugin version 1.0.4

                                      1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        jeff hammond
                                        last edited by 5 Feb 2014, 00:43

                                        .

                                        same problem still.. 1.0.4 on the left.. web dialog test on the right..

                                        Screen Shot 2014-02-04 at 7.37.58 PM.png

                                        dotdotdot

                                        1 Reply Last reply Reply Quote 0
                                        • G Offline
                                          Garry K
                                          last edited by 5 Feb 2014, 01:54

                                          Thanks Jeff,

                                          By any chance did you have the ruby console open when you tried the stair maker?

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 6
                                          • 7
                                          • 8
                                          • 9
                                          • 6 / 9
                                          6 / 9
                                          • First post
                                            102/171
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement