Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Maurits Lamers
@mauritslamers
If you don't see anything appearing, then there must be a problem with the underlying project. Perhaps it misses a certain file? The best way to figure this out, is to open the browser debugger and see what it gives. Perhaps it is currently depending on something which has been filtered out during the build process. There are certain app folders which get filtered out in the build process, such as the fixtures folder.
ycxu@bupt.edu.cn
@buptycxu11
@mauritslamers I could see all the js&css files which reported “not found” in the browser's debugger. So I thought it was not caused by build command. Any other idea, please!
Maurits Lamers
@mauritslamers
if it cannot find the js files, you might have not copied some essentials
you need to copy the entire static/* structure to the apache server
ycxu@bupt.edu.cn
@buptycxu11
@mauritslamers Yes, I did it
Maurits Lamers
@mauritslamers
and how are you referring to the index.html of the project?
did you create a symbolic link in the root of the webserver, pointing to the index.html of the app?
ycxu@bupt.edu.cn
@buptycxu11
@mauritslamers Yes, I created a symbolic link and copied it to the root
Maurits Lamers
@mauritslamers
perhaps I understand you wrong, but you need to create a symbolic link in the root of the web server to the apps index.html
Assuming you are running a Linux server, what do you see when you do ls -al in the root path of the webserver?
ycxu@bupt.edu.cn
@buptycxu11
Not running a Linux server, I am testing the project in Window10
@mauritslamers Not running a Linux server, I am testing the project in Window10.
Maurits Lamers
@mauritslamers
ah... symbolic links are then most likely out of the question
a shortcut is not the same
you will then have to refer to the index file by providing the full path
so, static/appname/en/[hash/index.html
ycxu@bupt.edu.cn
@buptycxu11
I created the symbolic link with mklink command just now. Then I restarted apache, it seems did not work.
image.png
Maurits Lamers
@mauritslamers
It is such a long time ago I worked with Windows, that I am unsure what the mklink command will actually do, and whether it will work similarly to the Linux symbolic link
Also, Apache might need to be configured to follow symbolic links
In that sense, it might be easier to configure Apache itself, and have the webroot be
an alias to the current location of the app
That is why my current suggestion was to use the full link to the app, in order to test whether that will work
ycxu@bupt.edu.cn
@buptycxu11
@mauritslamers Cool!!! Thank you very much!!!!!!!!!!! After configured the httpd.conf file (i.e restore the nodes value of DocumentRoot&Directory), it worked.
Maurits Lamers
@mauritslamers
Great that it worked now :) Very welcome!
ycxu@bupt.edu.cn
@buptycxu11
How could I learn SproutCore in all details?
How to read the website of a new framework(like SproutCore) to get the most important information?
I want to be able to solve bugs instead of just being dizzy.
ycxu@bupt.edu.cn
@buptycxu11
@mauritslamers Could you give me a hand? I really appreciate it.
Maurits Lamers
@mauritslamers
@ycxu-bupt The best thing for the moment is to follow the guides. What makes SproutCore quite different from more recent 'frameworks' such as Vue, React and Angular is that it is much more like a desktop framework than a web-framework
It is modelled after Cocoa, the OSX desktop framework
SproutCore has a rather strict MVC, where the View only talks to the Controller, and Controllers talk to the model layer, which is provided by the datastore framework
Maurits Lamers
@mauritslamers
@nicolasbadia Question regarding the Aki theme: when aki is generated as @2x, shouldn't that also mean that some pixel sizes should be doubled? I was reviewing the TodosThree example application and noticed that with Aki (as well as with Ace btw) the texts belonging to the list items as well as the checkbox on top is rather off. Currently it is indicated to be left: 22px, but it only looks ok when I make it left: 44px, and then I also have to lower it by 10 px; in order to be aligned with the checkbox
TodosThree.png
Image is with the Ace theme, but the Aki theme suffers from the same problem.
Actually, this also happens with the 'normal' css...
Maurits Lamers
@mauritslamers
Ah, nevermind, it seems to have been change in the way css classes have been added, where the css files of the todos three app still used the old ones.
Maurits Lamers
@mauritslamers
@nicolasbadia Different question: I have been hunting down something from the todos_three application that I didn't understand why it didn't work. It has to do with the special stateObserves method which allows observing of something but will only trigger when that state is the current state. In the todos_three app, the enterState method is used to fire off some queries, and there is a didLoad stateObserves observer which should be fired whenever the status of the targeted controller changes. However, it never fires. I found that the reason for this is that any observer is only activated after the enterState function has been run. This is asking for a race condition and I would find it much more logical if any observers were already listening before the enterState function is called. This would mean that the call this._setupAllStateObserveHandlers() at https://github.com/sproutcore/sproutcore/blob/master/frameworks/statechart/system/state.js#L1237 would move to the method stateWillBecomeEntered. What is your gutfeeling about this?
Nicolas Badia
@nicolasbadia
@mauritslamers Hi, looks good to me, did the change on my project and no issue so far. Would it makes sense to also call _teardownAllStateObserveHandlers in stateDidBecomeExited?
Maurits Lamers
@mauritslamers
@nicolasbadia I am trying to run through the different scenarios. My change catches state observable triggers which happens as a result of what is done while the enterState is being executed. This is kind of what you expect when running the enterState: the state is essentially ready to respond to events. I would think that the opposite is true of exitState: you expect the state to have stopped responding to events, and the exitState is used to clean up afterwards. Having state observers trigger during the exitState is going to make things much more difficult to predict.
Maurits Lamers
@mauritslamers
in addition: I think the original idea behind this was that any kind of async action would go through this.performAsync('method'). Getting data from the store is such an action. The method called asynchronously is called after the observers are attached. I think it is telling that in this example app it is already not done that way.Especially regarding the recent JS developments (async await etc) it makes sense to have the observers attached as early as possible.
Also: I am updating the guides to use the NodeJS BT, as well as installing sproutcore in the project/frameworks folder by default. There is no real benefit in having some old SC floating around on the system.
Maurits Lamers
@mauritslamers
There is more peculiar behavior in the TodosThree app: whenever you add a todo item, at least one of the items in the list gets unmarked, and the same happens when one or two items get offscreen.
Maurits Lamers
@mauritslamers
@nicolasbadia any clue where this might come from? I can trace it back as far as that suddently the content binding is returning false where it was true before...
Maurits Lamers
@mauritslamers
@nicolasbadia I finally figured out why this regression occurred: it was the very change of moving the stateObserves.
So I will roll back the change on master, it causes loads of issues
Maurits Lamers
@mauritslamers
@nicolasbadia I have noticed that using the selectsearch view with records from the store causes records being set editable (and locked because of that) as soon as the mouse hovers over the option in the menu. The cause is that the menu pane will select the item on mouse-over. While this behavior is required in order to display a submenu, in a menu without submenus the same visual effect could be created through CSS. The main issue with selecting the record/menuitem is that this action locks the record in the (nested) store, and consequently prevents any updates pushed into the store through pushRetrieve to display in the app, even if the record itself has never really been displayed in the app.
I created a workaround in my app now, which checks for the combination of SC.Record.READY_CLEAN and the editable state, and force-update the store if that is the case. Of course this is not something to keep doing.
Nicolas Badia
@nicolasbadia
@mauritslamers Did you try to use the last commit from this PR: sproutcore/sproutcore#1443 ?
Also, notice that when I add the 'needs review' label to a PR, it means to me it is ready to be merged to master and someone other than me should review it and merge it if it looks good.