sketchucation logo sketchucation
    • Login
    1. Home
    2. Garry K
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    G
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 33
    • Posts 976
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Web dialog on a Mac

      Thanks guys

      I have now tested with Decimal Feet, Engineering Feet and Architectural Feet.
      All of the 3 models that are feet create an error.

      All the rest of the models work.
      This holds true for SU 7, SU 8 and 2013 for Windows.

      The error is a bit misleading as it appears as a script error on line 1 char 416
      The interesting part is that the html script doesn't have that many characters on line 1

      This may be where I pass in a big string, and need to parse it. If that is the case then the defaults.txt file has a value that does not translate over to feet.

      posted in Developers' Forum
      G
      Garry K
    • RE: Web dialog on a Mac

      Also - Stair Maker doesn't support unit switching after you have used it in the session. However it should honor switching units prior to running the stair maker.

      posted in Developers' Forum
      G
      Garry K
    • RE: Web dialog on a Mac

      I use decimal millimeters with 3 decimals of precision or greater
      I have tested with decimal inches with 3 decimals of precision or greater
      I have also tested with fractional inches at 1/64" precision.

      But I haven't tested using all the different choices.
      The defaults.txt file supports mm and decimal inches for defaults.
      Sketchup should convert these values to the appropriate units.

      There is a sketchup bug that will have trouble with fractions in inches.
      This problem also exists with the built in inputbox.

      posted in Developers' Forum
      G
      Garry K
    • RE: Web dialog on a Mac

      Did you update the defaults.txt file or leave it as 'user' and 'test'

      posted in Developers' Forum
      G
      Garry K
    • RE: Web dialog on a Mac

      Steve,

      Ok we are getting somewhere. Can you tell me if the input boxes and drop downs were populated before you clicked on the "Load" button.

      "user not on file" at the top of the dialog is correct for an error code -21.
      I believe that if you edit the defaults.txt file and stick in the user and password from registering with my web site that you would be able to create a circular stair.

      I will temporarily make changes to the web service so that you don't have to edit the defaults.txt file. And I am going to rem out the extra messages and drop the load button.

      posted in Developers' Forum
      G
      Garry K
    • RE: Curved Staircases

      The other thing I should say - is the defaults.txt file gets over written each time. So unfortunately you need to go back in and edit the file.

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      The trial is for 30 days. I will reset everyone once I get this working.

      I am adding a temporary button ( it will mess up the look of the web dialog - but then this is just temporary )

      I want to rule out if this is a timing issue.
      Click the load button should reload the information.


      version 1.0.6

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      Walt,

      The "http error" comes from the http call to my web service.

      xmlHttp.readyState == 4
      and
      xmlHttp.status != 200

      I could have returned the status - they mostly talk about time outs etc.
      I know that the web host site has been experiencing hack attacks today. So it very well could time out.

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      John,

      You need to edit the Defaults.txt file and insert user and password.
      Error -21 means "user not on file"
      The shipped user in the defaults.txt file is "user" and password is "test" and these are not on file.

      You would have to register on my website which will email you with your password.

      posted in Woodworking
      G
      Garry K
    • RE: Web dialog on a Mac

      Steve,

      In ruby the last statement in the callback is
      dialog.execute_script( script )

      In the web side there is a parsing routine plus the populate_drop_down function

      
      function from_ruby( data )
      {
      	var element;
      	var pair;
      	var pairs = data.split( '&' );
      	var count = pairs.length;
      
      	for ( var i = 0; i < count; i++ )
      	{
      		pair = pairs[i].split( '=' );
      
      		element = document.getElementById( pair[0] )
      
      		if ( element.type == "select-one" )
      		{
      			if ( pair[1].indexOf('|') == -1 )
      				element.selectedIndex = pair[1];
      			else
      				populate_drop_down( element, pair[1] );
      		}
      		else if ( element.type == "text" )
      			element.value = pair[1];
      		else if ( element.type == "checkbox" )
      			element.checked = pair[1] == '1';
      	}
      }
      
      

      It almost seems like the DOM isn't really ready to receive updates.

      posted in Developers' Forum
      G
      Garry K
    • RE: Web dialog on a Mac

      It is on the stair maker thread

      http://sketchucation.com/forums/viewtopic.php?f=183%26amp;t=54157%26amp;p=510178#p510178

      posted in Developers' Forum
      G
      Garry K
    • RE: Curved Staircases

      I've got some different debugging information in here.
      I've also changed a bit of code that now uses instance variables.

      Please open your Ruby Console and try it and send me back the information.
      Thanks


      version 1.0.5

      posted in Woodworking
      G
      Garry K
    • RE: Web dialog on a Mac

      Well, call me frustrated.

      The simple test application worked with the Mac. But the complete Stair Maker plugin does not work with the Mac.

      I've added instance variables for the web dialog.
      I've stored the text that Ruby passes over to the Web Dialog as an instance variable and built prior to calling the web dialog.

      I must be missing something. The overall strategy now is:

      if ( document.addEventListener )
      document.addEventListener( "DOMContentLoaded", ready, false );
      else if ( document.attachEvent )
      document.attachEvent( "onreadystatechange", check_ready );

      When the DOM is loaded it makes a call back to ruby with text == 'loaded'.
      ruby then passes the string over to the web dialog for processing.
      When the user clicks the button the web dialog traverses the DOM and peels out all of the text for input controls and builds up a single string. Then makes a call back to ruby and closes the dialog.

      One question I have is can Safari handle making a call to execute script from within the ruby call back. Or do I need to consider turning this into a state machine?

      posted in Developers' Forum
      G
      Garry K
    • RE: Curved Staircases

      Thanks Jeff,

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

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      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

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      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?

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      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"

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      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.

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      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.

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      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.

      posted in Woodworking
      G
      Garry K
    • 1
    • 2
    • 39
    • 40
    • 41
    • 42
    • 43
    • 48
    • 49
    • 41 / 49