Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken bridge communication under SU2014 #59

Closed
noelwarr opened this issue Sep 20, 2013 · 14 comments
Closed

Broken bridge communication under SU2014 #59

noelwarr opened this issue Sep 20, 2013 · 14 comments
Labels

Comments

@noelwarr
Copy link

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: #<SKUI::Bridge::CommunicationError: Unknown error. Ensure DOM is ready.>

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
Copy link
Owner

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
Copy link
Author

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//issues/59#issuecomment-24820933
.

@thomthom
Copy link
Owner

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//issues/59#issuecomment-24820933
.


Reply to this email directly or view it on GitHub.

@noelwarr
Copy link
Author

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//issues/59#issuecomment-24820933
.

@thomthom
Copy link
Owner

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//issues/59#issuecomment-24820933
.


Reply to this email directly or view it on GitHub.

@noelwarr
Copy link
Author

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//issues/59#issuecomment-24825382
.

@thomthom
Copy link
Owner

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//issues/59#issuecomment-24825382
.


Reply to this email directly or view it on GitHub.

@thomthom
Copy link
Owner

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
Copy link
Owner

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
Copy link
Author

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//issues/59#issuecomment-24888170
.

@noelwarr
Copy link
Author

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//issues/59#issuecomment-24888170
.

@thomthom
Copy link
Owner

Is it working ok now?

@noelwarr
Copy link
Author

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//issues/59#issuecomment-24910602
.

@thomthom
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants