sproutcore / build-tools

SproutCore Build Tools
12 stars 7 forks source link

Showcase not working #3

Closed EricG-Personal closed 11 years ago

EricG-Personal commented 11 years ago

I have the test project ( git://github.com/mauritslamers/garcon-testproject ) setup and running. Only one piece of the showcase app appears to be working for me. I can click on Using SC.Color and manipulate the controls. However, when I click on SC.ButtonView, etc. nothing appears.

mauritslamers commented 11 years ago

To me this sounds like problem in the Sproutcore application, not necessarily in the build tools. Can you provide more details?

ericgorr commented 11 years ago

I am not sure what additional details you might need. I installed everything as directed, including version v0.8.9 of node.js since I know your build tools require the older version and I did npm install. I did make sure to copy those lines of code into views_page.js. To run the show case app, I,

(1) entered into the garcon-testproject directory

(2) typed 'node gettingstarted.js' and got the following output:

14 Apr 21:50:50 - Building app: todos_one 14 Apr 21:50:50 - Building app: todos_two 14 Apr 21:50:50 - Building app: todos_three 14 Apr 21:50:50 - Building app: showcase Server started on http://localhost:8000

(3) Using the chrome browser, I went to http://localhost:8000/showcase and saw the following output appear in the terminal window - https://gist.github.com/ericgorr/5385157

(4) If I click on SC.Color first and then click on SC.Button view, the following appears in the google console.

Unsafe JavaScript attempt to access frame with URL http://demos.sproutcore.com/color_demo from frame with URL http://localhost:8000/showcase#ui/SC.ButtonView. Domains, protocols and ports must match. jquery.js:2256 jQuery.extend.attr jquery.js:2256 jQuery.extend.access jquery.js:836 jQuery.fn.extend.attr jquery.js:1920 SC.WebView.SC.View.extend.render desktop.js:28060 SC.CoreView.reopen.updateLayer core_foundation.js:5444 SC.CoreView.reopen.updateLayerIfNeeded core_foundation.js:5402 SC.View.reopen.recomputeIsVisibleInWindow core_foundation.js:10277 SC.View.reopen.parentViewDidChange core_foundation.js:9331 SC.View.reopen.removeChild core_foundation.js:9445 (anonymous function) runtime.js:7218 SC.CoreView.reopen.removeAllChildren core_foundation.js:6332 SC.ContainerView.SC.View.extend.replaceContent foundation.js:12557 SC.ContainerView.SC.View.extend.contentViewDidChange foundation.js:12640 SC.Observable._notifyPropertyObservers runtime.js:2674 SC.Observers.resumePropertyObserving runtime.js:6990 SC.Binding.flushPendingChanges runtime.js:8757 SC.RunLoop.SC.Object.extend.flushApplicationQueues runtime.js:13039 SC.RunLoop.SC.Object.extend.flushAllPending runtime.js:12858 SC.RunLoop.SC.Object.extend.endRunLoop runtime.js:12837 invoke_superclass_method runtime.js:7050 SC.RunLoop.SC.RunLoop.extend.endRunLoop core_foundation.js:1565 SC.RunLoop.end runtime.js:13139 SC.run runtime.js:13188 SC.RootResponder.SC.Object.extend.sendEvent core_foundation.js:13467 SC.RootResponder.SC.Object.extend.mouseup core_foundation.js:14704 SC.mixin.handle core_foundation.js:4245 listener core_foundation.js:4402

The vast majority of time nothing appears on the page for the SC.ButtonView, etc. Only SC.Color appears to work correctly. However, the last time I tried this, stuff was appearing for the SC.ButtonView, etc, but I still see the 'Unsafe javascript...' error above.

mauritslamers commented 11 years ago

Hi Eric,

3: the output from the buildtools in the terminal is normal.

  1. This problem is to be expected, as there is an URL hardcoded in the project. As the showcase is not downloaded from demos.sproutcore.com, it violates the Same Origin Policy. The code should actually not define the host, but just do a "local" lookup instead, and a proxy configured to make this work in the development environment.

cheers

Maurits

On 15 apr. 2013, at 03:57, ericgorr wrote:

I am not sure what additional details you might need. I installed everything as directed, including version v0.8.9 of node.js since I know your build tools require the older version and I did npm install. I did make sure to copy those lines of code into views_page.js. To run the show case app, I,

(1) entered into the garcon-testproject directory

(2) typed 'node gettingstarted.js' and got the following output:

14 Apr 21:50:50 - Building app: todos_one 14 Apr 21:50:50 - Building app: todos_two 14 Apr 21:50:50 - Building app: todos_three 14 Apr 21:50:50 - Building app: showcase Server started on http://localhost:8000

(3) Using the chrome browser, I went to http://localhost:8000/showcase and saw the following output appear in the terminal window - https://gist.github.com/ericgorr/5385157

(4) If I click on SC.Color first and then click on SC.Button view, the following appears in the google console.

Unsafe JavaScript attempt to access frame with URL http://demos.sproutcore.com/color_demo from frame with URL http://localhost:8000/showcase#ui/SC.ButtonView. Domains, protocols and ports must match. jquery.js:2256 jQuery.extend.attr jquery.js:2256 jQuery.extend.access jquery.js:836 jQuery.fn.extend.attr jquery.js:1920 SC.WebView.SC.View.extend.render desktop.js:28060 SC.CoreView.reopen.updateLayer core_foundation.js:5444 SC.CoreView.reopen.updateLayerIfNeeded core_foundation.js:5402 SC.View.reopen.recomputeIsVisibleInWindow core_foundation.js:10277 SC.View.reopen.parentViewDidChange core_foundation.js:9331 SC.View.reopen.removeChild core_foundation.js:9445 (anonymous function) runtime.js:7218 SC.CoreView.reopen.removeAllChildren core_foundation.js:6332 SC.ContainerView.SC.View.extend.replaceContent foundation.js:12557 SC.ContainerView.SC.View.extend.contentViewDidChange foundation.js:12640 SC.Observable._notifyPropertyObservers runtime.js:2674 SC.Observers.resumePropertyObserving runtime.js:6990 SC.Binding.flushPendingChanges runtime.js:8757 SC.RunLoop.SC.Object.extend.flushApplicationQueues runtime.js:13039 SC.RunLoop.SC.Object.extend.flushAllPending runtime.js:12858 SC.RunLoop.SC.Object.extend.endRunLoop runtime.js:12837 invoke_superclass_method runtime.js:7050 SC.RunLoop.SC.RunLoop.extend.endRunLoop core_foundation.js:1565 SC.RunLoop.end runtime.js:13139 SC.run runtime.js:13188 SC.RootResponder.SC.Object.extend.sendEvent core_foundation.js:13467 SC.RootResponder.SC.Object.extend.mouseup core_foundation.js:14704 SC.mixin.handle core_foundation.js:4245 listener core_foundation.js:4402

The vast majority of time nothing appears on the page for the SC.ButtonView, etc. Only SC.Color appears to work correctly. However, the last time I tried this, stuff was appearing for the SC.ButtonView, etc, but I still see the 'Unsafe javascript...' error above.

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

mauritslamers commented 11 years ago

closing the issue because it is not a problem of the build tools