Browse Source

Better HTML template in Mix.

Use happened in JS.
Debugging QML enabled.
cl-refactor
Gav Wood 10 years ago
parent
commit
4046debbc9
  1. 3
      libjsqrc/ethereumjs/dist/ethereum.js
  2. 4
      libjsqrc/ethereumjs/dist/ethereum.js.map
  3. 2
      libjsqrc/ethereumjs/dist/ethereum.min.js
  4. 3
      libjsqrc/ethereumjs/lib/filter.js
  5. 2
      mix/CMakeLists.txt
  6. 4
      mix/qml/js/ProjectModel.js

3
libjsqrc/ethereumjs/dist/ethereum.js

@ -590,6 +590,9 @@ var Filter = function(options, impl) {
Filter.prototype.arrived = function(callback) { Filter.prototype.arrived = function(callback) {
this.changed(callback); this.changed(callback);
}; };
Filter.prototype.happened = function(callback) {
this.changed(callback);
};
/// gets called when there is new eth/shh message /// gets called when there is new eth/shh message
Filter.prototype.changed = function(callback) { Filter.prototype.changed = function(callback) {

4
libjsqrc/ethereumjs/dist/ethereum.js.map

File diff suppressed because one or more lines are too long

2
libjsqrc/ethereumjs/dist/ethereum.min.js

File diff suppressed because one or more lines are too long

3
libjsqrc/ethereumjs/lib/filter.js

@ -61,6 +61,9 @@ var Filter = function(options, impl) {
Filter.prototype.arrived = function(callback) { Filter.prototype.arrived = function(callback) {
this.changed(callback); this.changed(callback);
}; };
Filter.prototype.happened = function(callback) {
this.changed(callback);
};
/// gets called when there is new eth/shh message /// gets called when there is new eth/shh message
Filter.prototype.changed = function(callback) { Filter.prototype.changed = function(callback) {

2
mix/CMakeLists.txt

@ -26,6 +26,8 @@ else()
qt5_add_resources(UI_RESOURCES noweb.qrc) qt5_add_resources(UI_RESOURCES noweb.qrc)
endif() endif()
add_definitions(-DQT_QML_DEBUG)
# eth_add_executable is defined in cmake/EthExecutableHelper.cmake # eth_add_executable is defined in cmake/EthExecutableHelper.cmake
eth_add_executable(${EXECUTABLE} eth_add_executable(${EXECUTABLE}
ICON mix ICON mix

4
mix/qml/js/ProjectModel.js

@ -171,8 +171,8 @@ function doCreateProject(title, path) {
files: [ contractsFile, indexFile ] files: [ contractsFile, indexFile ]
}; };
//TODO: copy from template //TODO: copy from template
fileIo.writeFile(dirPath + indexFile, "<html></html>"); fileIo.writeFile(dirPath + indexFile, "<html>\n<head>\n<script>\nvar web3 = parent.web3;\nvar theContract = parent.contract;\n</script>\n</head>\n<body>\n<script>\n</script>\n</body>\n</html>");
fileIo.writeFile(dirPath + contractsFile, "contract MyContract {\n}\n"); fileIo.writeFile(dirPath + contractsFile, "contract Contract {\n}\n");
newProject(projectData); newProject(projectData);
var json = JSON.stringify(projectData, null, "\t"); var json = JSON.stringify(projectData, null, "\t");
fileIo.writeFile(projectFile, json); fileIo.writeFile(projectFile, json);

Loading…
Cancel
Save