thomthom / SKUI

Ruby wrapper of classes that maps to GUI controls in SketchUp's UI::WebDialogs
MIT License
26 stars 14 forks source link

Broken bridge communication under SU2014 #59

Closed noelwarr closed 11 years ago

noelwarr commented 11 years ago

I have a window with a button with an on-click callback. The call back looks at the values of a few controls. It is uppon checking these values that an error is thrown:

Error: #

A little further investigation seems to indicate that

Bridge.execute("Bridge.get_value(\"#UI_81846250 select\");") is returning false, when it shouldn't. Any ideas?

This was working quite well under SU2013

broken bridge

thomthom commented 11 years ago

Can you post the source for that dialog? You can use gist or something.

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

I have a window with a button with an on-click callback. The call back looks at the values of a few controls. It is uppon checking these values that an error is thrown:

Error: #

A little further investigation seems to indicate that

Bridge.execute("Bridge.get_value(\"#UI_81846250 select\");") is returning false, when it shouldn't. Any ideas?

This was working quite well under SU2013

— Reply to this email directly or view it on GitHub.

noelwarr commented 11 years ago

A few things: This problem is coming and going for me. Makes me think it's a timing thing with the bridge. I just realised that my repo is a few weeks behind yours and you had some problems with listbox.value() so I'll update and experiment a little more.

I thought I had filed an issue with SKUI on github. Must have pressed the wrong button. I have my Lisboa ticket!

2013/9/20 Thomas Thomassen notifications@github.com

Can you post the source for that dialog? You can use gist or something.

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

I have a window with a button with an on-click callback. The call back looks at the values of a few controls. It is uppon checking these values that an error is thrown:

Error: #

A little further investigation seems to indicate that

Bridge.execute("Bridge.get_value(\"#UI_81846250 select\");") is returning false, when it shouldn't. Any ideas?

This was working quite well under SU2013

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24820933 .

thomthom commented 11 years ago

Yea. I recently pushed some code that affected the bridge. Pull the latest changes and see if it comes back.

See you in Lisbon! Awesome!

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

A few things: This problem is coming and going for me. Makes me think it's a timing thing with the bridge. I just realised that my repo is a few weeks behind yours and you had some problems with listbox.value() so I'll update and experiment a little more.

I thought I had filed an issue with SKUI on github. Must have pressed the wrong button. I have my Lisboa ticket!

2013/9/20 Thomas Thomassen notifications@github.com

Can you post the source for that dialog? You can use gist or something.

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

I have a window with a button with an on-click callback. The call back looks at the values of a few controls. It is uppon checking these values that an error is thrown:

Error: #

A little further investigation seems to indicate that

Bridge.execute("Bridge.get_value(\"#UI_81846250 select\");") is returning false, when it shouldn't. Any ideas?

This was working quite well under SU2013

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24820933 .

— Reply to this email directly or view it on GitHub.

noelwarr commented 11 years ago

https://gist.github.com/noelwarr/47c9d1df1064a1f60e5e

I'm pretty sure it must be a timing problem with ruby/js because the following edit in bridge.js fixes the problem

 /* Returns the value for the given jQuery selector.
 */
get_value : function( selector ) {
  alert();//pausing here a second fixes problem
  return $(selector).val();
},

If it is a timing thing it'll be difficult to reporduce on another machine as the differences if SketchUp and JSVM speed will either fix the problem or make it worse.

2013/9/20 Noel Warren noelwarr@gmail.com

A few things: This problem is coming and going for me. Makes me think it's a timing thing with the bridge. I just realised that my repo is a few weeks behind yours and you had some problems with listbox.value() so I'll update and experiment a little more.

I thought I had filed an issue with SKUI on github. Must have pressed the wrong button. I have my Lisboa ticket!

2013/9/20 Thomas Thomassen notifications@github.com

Can you post the source for that dialog? You can use gist or something.

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

I have a window with a button with an on-click callback. The call back looks at the values of a few controls. It is uppon checking these values that an error is thrown:

Error: #

A little further investigation seems to indicate that

Bridge.execute("Bridge.get_value(\"#UI_81846250 select\");") is returning false, when it shouldn't. Any ideas?

This was working quite well under SU2013

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24820933 .

thomthom commented 11 years ago

The bridge should take care of the async nature of js to ruby. There should be no need for timing. Did you try with the latest SKUI?

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

https://gist.github.com/noelwarr/47c9d1df1064a1f60e5e

I'm pretty sure it must be a timing problem with ruby/js because the following edit in bridge.js fixes the problem

/* Returns the value for the given jQuery selector. */ get_value : function( selector ) { alert();//pausing here a second fixes problem return $(selector).val(); },

If it is a timing thing it'll be difficult to reporduce on another machine as the differences if SketchUp and JSVM speed will either fix the problem or make it worse.

2013/9/20 Noel Warren noelwarr@gmail.com

A few things: This problem is coming and going for me. Makes me think it's a timing thing with the bridge. I just realised that my repo is a few weeks behind yours and you had some problems with listbox.value() so I'll update and experiment a little more.

I thought I had filed an issue with SKUI on github. Must have pressed the wrong button. I have my Lisboa ticket!

2013/9/20 Thomas Thomassen notifications@github.com

Can you post the source for that dialog? You can use gist or something.

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

I have a window with a button with an on-click callback. The call back looks at the values of a few controls. It is uppon checking these values that an error is thrown:

Error: #

A little further investigation seems to indicate that

Bridge.execute("Bridge.get_value(\"#UI_81846250 select\");") is returning false, when it shouldn't. Any ideas?

This was working quite well under SU2013

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24820933 .

— Reply to this email directly or view it on GitHub.

noelwarr commented 11 years ago

Yup El 20/09/2013 19:07, "Thomas Thomassen" notifications@github.com escribió:

The bridge should take care of the async nature of js to ruby. There should be no need for timing. Did you try with the latest SKUI?

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

https://gist.github.com/noelwarr/47c9d1df1064a1f60e5e

I'm pretty sure it must be a timing problem with ruby/js because the following edit in bridge.js fixes the problem

/* Returns the value for the given jQuery selector. */ get_value : function( selector ) { alert();//pausing here a second fixes problem return $(selector).val(); },

If it is a timing thing it'll be difficult to reporduce on another machine as the differences if SketchUp and JSVM speed will either fix the problem or make it worse.

2013/9/20 Noel Warren noelwarr@gmail.com

A few things: This problem is coming and going for me. Makes me think it's a timing thing with the bridge. I just realised that my repo is a few weeks behind yours and you had some problems with listbox.value() so I'll update and experiment a little more.

I thought I had filed an issue with SKUI on github. Must have pressed the wrong button. I have my Lisboa ticket!

2013/9/20 Thomas Thomassen notifications@github.com

Can you post the source for that dialog? You can use gist or something.

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

I have a window with a button with an on-click callback. The call back looks at the values of a few controls. It is uppon checking these values that an error is thrown:

Error: #

A little further investigation seems to indicate that

Bridge.execute("Bridge.get_value(\"#UI_81846250 select\");") is returning false, when it shouldn't. Any ideas?

This was working quite well under SU2013

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub< https://github.com/thomthom/SKUI/issues/59#issuecomment-24820933> .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24825382 .

thomthom commented 11 years ago

I'll look at it next week. I'm out travelling the whole weekend.

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

Yup El 20/09/2013 19:07, "Thomas Thomassen" notifications@github.com escribió:

The bridge should take care of the async nature of js to ruby. There should be no need for timing. Did you try with the latest SKUI?

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

https://gist.github.com/noelwarr/47c9d1df1064a1f60e5e

I'm pretty sure it must be a timing problem with ruby/js because the following edit in bridge.js fixes the problem

/* Returns the value for the given jQuery selector. */ get_value : function( selector ) { alert();//pausing here a second fixes problem return $(selector).val(); },

If it is a timing thing it'll be difficult to reporduce on another machine as the differences if SketchUp and JSVM speed will either fix the problem or make it worse.

2013/9/20 Noel Warren noelwarr@gmail.com

A few things: This problem is coming and going for me. Makes me think it's a timing thing with the bridge. I just realised that my repo is a few weeks behind yours and you had some problems with listbox.value() so I'll update and experiment a little more.

I thought I had filed an issue with SKUI on github. Must have pressed the wrong button. I have my Lisboa ticket!

2013/9/20 Thomas Thomassen notifications@github.com

Can you post the source for that dialog? You can use gist or something.

Sent from my Sony Xperia™ smartphone

Noel notifications@github.com wrote:

I have a window with a button with an on-click callback. The call back looks at the values of a few controls. It is uppon checking these values that an error is thrown:

Error: #

A little further investigation seems to indicate that

Bridge.execute("Bridge.get_value(\"#UI_81846250 select\");") is returning false, when it shouldn't. Any ideas?

This was working quite well under SU2013

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub< https://github.com/thomthom/SKUI/issues/59#issuecomment-24820933> .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24825382 .

— Reply to this email directly or view it on GitHub.

thomthom commented 11 years ago

Can you supply a working self contained example?

When I try to load that gist I just get errors.

w = Vistii::GUI.initialize_main_window
Error: #<NameError: c:/gistfile1.rb:158:in `initialize_main_window': uninitialized constant Vistii::PATH>
c:/gistfile1.rb:158
(eval):46
thomthom commented 11 years ago

Ok, worked around it by commenting out the image. But I'm not seeing the same error as you. I find a different one.

Can you describe exactly the steps that lead up to that error?

noelwarr commented 11 years ago

Hi Thomas

Thanks for taking the time to look into this. I'm trying to put together a working example but the problem with my working example is its working. So it looks like I might have structured something badly in my project, though I can't figure out what.

Anyway, just to let you know I'm working on it. I'll write back later. Cheers

2013/9/22 Thomas Thomassen notifications@github.com

Can you supply a working self contained example?

When I try to load that gist I just get errors.

w = Vistii::GUI.initialize_main_window Error: #<NameError: c:/gistfile1.rb:158:in `initialize_main_window': uninitialized constant Vistii::PATH> c:/gistfile1.rb:158 (eval):46

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24888170 .

noelwarr commented 11 years ago

It seems I HADN'T correctly pulled from your repo. God damn it.[image: Imatge en línia 1]

2013/9/23 Noel Warren noelwarr@gmail.com

Hi Thomas

Thanks for taking the time to look into this. I'm trying to put together a working example but the problem with my working example is its working. So it looks like I might have structured something badly in my project, though I can't figure out what.

Anyway, just to let you know I'm working on it. I'll write back later. Cheers

2013/9/22 Thomas Thomassen notifications@github.com

Can you supply a working self contained example?

When I try to load that gist I just get errors.

w = Vistii::GUI.initialize_main_window Error: #<NameError: c:/gistfile1.rb:158:in `initialize_main_window': uninitialized constant Vistii::PATH> c:/gistfile1.rb:158 (eval):46

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24888170 .

thomthom commented 11 years ago

Is it working ok now?

noelwarr commented 11 years ago

Yeah. Sorry for the bother. Everything is working a charm. Looks like I'll have to brush up on my GIT skills.

2013/9/23 Thomas Thomassen notifications@github.com

Is it working ok now?

— Reply to this email directly or view it on GitHubhttps://github.com/thomthom/SKUI/issues/59#issuecomment-24910602 .

thomthom commented 11 years ago

No worries. I did find some other bug that I fixed. :)