Code Monkey home page Code Monkey logo

calatrava's Introduction

Build Status

Dependencies

It should be as easy to get started with Calatrava as possible. However, there are still a small number of dependencies that need to be installed beforehand.

Note: Currently, Calatrava only supports fully-featured development on Macs. This will probably always be the case for iOS apps. Linux support for Android and Mobile Web is in progress. Windows is a little further off. Pull requests welcomed.

Mac dependencies

  1. rvm. Calatrava projects are configured to use rvm by default. You could use Calatrava without it, but you will then need to make sure you have Ruby 1.9.3 installed however you prefer.

  2. bundler. Install in either your rvm global gemset, or wherever else makes sense for your setup.

  3. Xcode. You'll have to get this from the Mac App Store. Once installed, make sure you download and install the command line tools, and make sure you run xcode-select. Calatrava doesn't actually directly use Xcode except when building iOS apps, so you can use it on a non-Mac as long as you don't run the iOS build targets.

  4. Android SDK. I recommend installing using homebrew if you're on a Mac. But however you get hold of it, the android command is expected to be on the path.

  5. Node.js. Only used to run tests, not part of any production code. Again, if you're on a Mac I recommend installing using homebrew.

  6. ant. Up until Mac OS X 10.9 Mavericks this was included. However, it has now been removed. It can be installed with homebrew, however. Only required for Droid projects.

Linux

Note: Support for Linux is limited to running the Android and Mobile Web builds. Please note the following restrictions:

  • If you generate a new project using calatrava, the iOS part will not be generated.
  • Only the web:\* and droid:\* and kernel:\* tasks will work.

Here are the dependencies for Linux:

  1. rvm. Calatrava projects are configured to use rvm by default. You could use Calatrava without it, but you will then need to make sure you have Ruby 1.9.3 installed however you prefer.

  2. bundler. Install in either your rvm global gemset, or wherever else makes sense for your setup.

  3. Android SDK — the android command is expected to be on the path.

  4. Node.js and NPM. Only used to run tests, not part of any production code.

  5. Apache2. Used for hosting the mobile web versions. Some flavours of Linux will not come with this shipped. On Ubuntu systems, this can be installed with the following command: sudo apt-get install apache2 (from this page)

  6. ant. You'll probably pick this up when you install the Android tools. Only required for Droid projects.

Getting Started

Once you have the dependenices installed, there are just six simple steps to creating and building your first Calatrava cross-platform mobile app.

  1. Install the Calatrava gem: gem install calatrava

  2. Create your Calatrava project: calatrava create <project-name>

  3. cd <project-name>. If you're using rvm you will be prompted to trust a new .rvmrc.

  4. bundle install

  5. rake bootstrap

  6. To build and run the Mobile Web app: rake web:apache:start

    Then browse to http://localhost:8888 in your favourite browser.

  7. To build and install the Android app: rake droid:deploy

    You will need to have an Android emulator running, or a device connected.

  8. To build and run the iOS app open the Xcode workspace in the ios directory, and then build and run the target named after your project.

Working with Calatrava while it's under Development

  1. Clone this repo.

  2. cd into the repo.

  3. Run bin/calatrava create <project-name> --dev

The --dev switch will create a new project that refers to the calatrava gem as a path on disk. This is much more convenient if you're experimenting with Calatrava, or working on it.

calatrava's People

Contributors

cv avatar dtao avatar filipesperandio avatar gga avatar jagregory avatar kalyanakella avatar marcinkwiatkowski avatar mariagomez avatar moredip avatar patkua-mas avatar pedrombl avatar priyaaank avatar rcarragher avatar rtircher avatar snehayv avatar vivekjain10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calatrava's Issues

Bundler might install multiple cocoapods version

Gemfile generated by calatrava create <project name> does not state the cocoapods version dependency. This might lead bundler to pick a cocoapods version not supported by calatrava and fail the pod install command when running rake bootstrap.

'env: node: No such file or directory" build error in xcode trying to run base project

Hi,

I have followed the instructions on the project landing page. I can view the currency converter in the browser, I then tried to deploy it to my iPhone 5. To do this I opened the generated workspace and then only thing I changed in the generated project was the code signing, for all the obvious reasons, I had to select my signing profile.

I am running OSX 10.7, XCode 4.5.2 (4G2008a) with command line tools installed.

When I try build and run the app I get the following script error:
cp -R config/result/* artifacts/development/
Config: env.coffee.erb -> env.coffee
Config: httpd.conf.erb -> httpd.conf
cp ios/public/images
cp assets/lib/ICanHaz.js assets/lib/underscore.js assets/lib/zepto.js ios/public/scripts
cp ios/public/scripts
node_modules/coffee-script/bin/coffee --compile --output ios/public/scripts artifacts/development/env.coffee
coffee artifacts/development/env.coffee -> ios/public/scripts
env: node: No such file or directory
rake aborted!
Command failed with status (127): [node_modules/coffee-script/bin/coffee --co...]
/Users/admin/.rvm/gems/ruby-1.9.3-p362@firstnativejsapp/gems/calatrava-0.6.3/lib/calatrava/tasks/assets.rb:8:in coffee' /Users/admin/.rvm/gems/ruby-1.9.3-p362@firstnativejsapp/gems/calatrava-0.6.3/lib/calatrava/app_builder.rb:49:inblock (2 levels) in builder_task'
/Users/admin/.rvm/gems/ruby-1.9.3-p362@firstnativejsapp/gems/calatrava-0.6.3/lib/calatrava/ios_app.rb:32:in block (2 levels) in install_tasks' /Users/admin/.rvm/gems/ruby-1.9.3-p362@firstnativejsapp/bin/ruby_noexec_wrapper:14:ineval'
/Users/admin/.rvm/gems/ruby-1.9.3-p362@firstnativejsapp/bin/ruby_noexec_wrapper:14:in `

'
Tasks: TOP => ios:app => ios/public/scripts/env.js
(See full trace by running task with --trace)

FR: namespace

Default namespace com. is used in android (and possible anywhere where there are namespaces). It would be nice to be able to use own namespace instead, though default one should be applied. FOr example:

NAMESPACE=sk.herby calatrava create acmeapp

or

calatrava create sk.herby.acmeapp

(the latter would still create acmeapp directory, just strips and uses namespace where appropriate.

library not found for -lPods

After creating a new project with _calatrava create sample_ and then _rake ios:buid_ I get the lPods not found issue.

Dependancy issue: cocoapods specs repo requires a newer version of cocoapods than what calatrava has

Essentially the cocoapods specs repo requires 0.18.1 or above but calatrava has only 0.16.4 as a dependancy.

This means a fresh install of calatrava is unusable currently as it hits the error and stops during create.

Unfortunately but for their own good reasons the cocoapods project seems to assume/enforce upgrading fairly regularly and given the 0.X nature of their versioning they are being honest about it up front. This does mean calatrava will need to keep more up to date also esp if it wants to work for anyone that is currently using cocoapods.

DependencyError while installing calatrava

I saw the following error while I tried to install calatrava with "gem install calatrava"

ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: calatrava requires rake (> 0.9.5), xcodeproj (> 0.4.0)

In my mac,
rake, version 10.0.3
xcodeproj version is 0.4.0

Are these two versions too high? So I cannot pass the dependencies check?

Thanks!

Failing AJAX - Typo in calatrava.inbound

Hi,

Tried testing a Ajax Call using calatrava... Its failing with error that function calatrava.inbound.successfulResponse was not found...

Found that its a typo in calatrava.coffee has successfulRespone (missing 's') in response...

Use Android Fragment to create Android Bridge

Feature Request

Currently Calatrava uses a Rhino container to run all the Javascript pertaining to the controller logic. This comes with some limitations that you can use only those Javascript libraries that do not ever request window handle and some other JS functions are unavailable since Rhino runs in a headless mode within the app.

Android had evolved in recent past with concept of fragments. Each fragment is a small reusable component on a view. Fortunately, Android supports Fragments that are not bound to view but are run in background to run tasks for views. This is very similar to the hidden web view approach that Calatrava iOS bridge uses.

Using Fragments in android as a bridge; would bring it's implementation more consistent with iOS bridge; a wider choice of libraries will be available and it would seem a bit lighter in it's approach since it would not depend on an external Rhino library for it's functioning; instead it would use natively supported web views of sorts.

Android Plugin calls are ignored if render calls are made just after changePage

When a "changePage" event is triggered in controller to change the page on the view and Plugin calls are made immediately after "changePage"; then behavior is sporadic and often plugin calls are skipped, resulting in unpredictable behavior.

Possible root cause
When a change page event is triggered, the activity on the view deregisters itself in android and calls lifecycle events like onPause and it deregisters the broadcast listeners. This leaves a gap of no broadcast receivers registered until the next activity registers one.
If those plugin calls fall during this gap period the calls are not intercepted and responded to resulting in unpredictable behavior.

Problem Building on Xcode (4.5.1) - Can't Find Bundler

I'm having trouble getting this to build on Xcode 4.5.1 on Mac OS X 10.8.2. Ruby is 1.9.3p0 installed via rvm (1.16.15), as described in the docs. Installed from scratch, as this machine is "fresh" so to speak.

If there is any other version information that may be relevant let me know, I'm happy to provide it.

Anyways, the error is:

/Users/dave-dellacosta/development/calatrava_test/ios/../build_env.sh: line 2: rvm: command not found
/Users/dave-dellacosta/Library/Developer/Xcode/DerivedData/calatrava_test-bhihmkoksemwyphdexneepjneonm/Build/Intermediates/calatrava_test.build/Debug-iphonesimulator/calatrava_test.build/Script-FE99528EF72048F1B709A35C.sh: line 3: bundle: command not found
Command /bin/sh failed with exit code 127

Tracing it back a bit further shows:

/Users/dave-dellacosta/development/calatrava_test/ios/../build_env.sh: line 2: rvm: command not found

I don't have much experience yet with Xcode and setting environment variables, but I'll check it out when I have time--seems like tweaking the build_env.sh script could solve this. Perhaps someone with more experience than I can resolve it quicker.

Compile only non partial .scss files

Bug/Issue

Currently as part of build tasks Calatrava compiles all .scss files. Although this is not needed, as all the partials (files starting with underscore) are included in other primary files by nature.

So Calatrava needs to compile only those .scss files which are NOT partials.

Back Navigation in Mobile Web

Issue/Bug

Currently the mobile web app created with Calatrava does not have a great implementation of "History" or "Back Navigation". It's broken and works for only few screens. It would be great if navigation stack would preserve user navigation history analogous to that in a browser.

[all] page.get() method needs to be callback-based

The current implementation of the page object get() method is designed to return the value read from the field. However, now that the iOS JS runtime is a hidden UIWebView this is no longer a possible implementation. Instead, the get() function should take a callback and the callback should be called with the read value.

This will require a change in the bridge across all three platforms.

Remove explicit support for SASS

It's going to be impossible to continue to add support for tools like Compass to Calatrava. Right now Calatrava wants you to use SASS. Instead, it should be optional.

  1. If your styles directory contains *.sass, *.scss or *.less files then Calatrava will attempt to run the right tools to compile and copy those.
  2. Calatrava will not explicitly depend on Sass or Less.
  3. Calatrava will expose functions that give the correct CSS output directory for each app.
  4. Calatrava will have a defined task that you can depend on to get your CSS built and copied to the right place.

Android Plugin callback handle is overridden on quick successive calls to plugin

When in Android a same plugin is called in quick succession multiple times before code has had a chance to respond to the first call; the callback handle id keeps getting overwritten until Plugin errors out with something similar.

"cannot find function 1C07F6CFE7E5EC74CB380D6F66742819 in object [object Object]. (calatrava/scripts/calatrava.js#260)"

Root Cause
Upon debugging I think following is what is happening

  • A plugin call is made from controller
  • Once a call is received a broadcast is initiated. As per the documentation here normal broadcasts are completely async. So code execution returns from this point and goes back to controller.
  • Before the broadcast receiver receives the call, controller makes another plugin call request.
  • Since we use a single instance of registered plugin from a hash map, the instance used by previous call is same as the one used by next call.
  • Upon making a method call "call" on same instance, the first thing that gets updated in plugin in that method is, okCallbackHandle At this point broadcast for second plugin call is made.
  • Since now first call returns it uses the callback handle left by second plugin call. And while making callback it's deleted as well

This results in either wrong callback being made or callback handler not being found. I think this issue will be evident in scenarios where plugin code tries to make an external web call; since that would give ample amount of time for handles to be overridden.

Fix
A reasonable fix for this is to deliver the callback handle as part of the intent so as to prevent it from being overwritten. This would mean, we can continue to use a single instance and hence be lean on object allocation and yet have data safety guaranteed since it travels with object and broadcasts.

I'll submit a pull request for this soon enough.

Attaching a Picture of potential error stack trace cause due to this; highlighting the override of callback handles.
screen shot 2013-08-15 at 3 20 55 pm

Configuration for platforms, distinct from the environments

Inside config, as well as environment.yml there should be a platform.yml. It will have top-level keys for ios, droid and web. When building the configuration hash, add together the current environment set to the target platform set.

This will conflict with the idea of running configuration as a separate pipeline however. Is that worth preserving?

calatrava.bridge.request() seems to require an optional "body" under iOS

When calling calatrava.bridge.request({ … }) without a body the following stack trace is shown in XCode:

2013-01-08 12:03:34.700 tehproject[60665:c07] Targeting: issueRequest
2013-01-08 12:03:34.700 tehproject[60665:c07] With args: ["8AEF82DCDA5625A9C6BE6D0B620A86C4","http://localhost:4567/game/1","GET",null,{"Content-Type":"application/json"}]
2013-01-08 12:03:34.700 tehproject[60665:c07] [CM] url: http://localhost:4567/game/1
2013-01-08 12:03:34.701 tehproject[60665:c07] HEADERS : {
    "Content-Type" = "application/json";
}
2013-01-08 12:03:34.701 tehproject[60665:c07] Content-Type : application/json
2013-01-08 12:03:34.701 tehproject[60665:c07] [CM] httpMethod: GET
2013-01-08 12:03:40.340 tehproject[60665:c07] -[NSNull dataUsingEncoding:]: unrecognized selector sent to instance 0x182d678

Adding an empty body does work around that issue.

Uncaught TypeError: Object #<Object> has no method 'success'

I get this error as well for 'failure'

From looking at the code it looks like you are not sending the success and failure handlers to calatrava.bridge.runtime.issueRequest (in file kernel/app/calatrava.coffee line 146). However, in the web/app/source/bridge.coffee, calatrava.bridge.web.ajax tries to call that success or error method (line 66 and 69).

FR: split of kernel/shell compiling part and bridging part

It seems to me calatrava is a blend of two things. First is bridging infrastructure with ability to create the skeleton and the build the whole application for different platforms, bridging over to common application logic.

But the application logic itself (haml and coffee compiling plus starting template prepared for this scenario) are different, more or less orthogonal thing.

I imagined I would want to use Harmony (read: traceur) instead of coffee (and something non-rubyish instead of haml), and it looks like the whole bridging part could be left untouched, only kernel/shell compilation and starting template needs to be replaced.

Then even crazier idea happened that I could create my application logic in Smalltalk (compiled by Amber) and html as well (pseudo-Seaside-style is used in Amber for pages). And again, calatrava idea of bridging native UI to Javascript app logic is finely reusable.

Do you think it would be viable to decouple those two more; and do you think it will be much/hard work?

Cannot install on windows

Hi there,

on Windows XP with Ruby 1.9.3 from rubyinstaller.org I cannot install calatrava gem with following error:

c:\> gem install calatrava
Fetching: mustache-0.99.4.gem (100%)
Fetching: plist-3.1.0.gem (100%)
Fetching: rest-client-1.6.7.gem (100%)
Fetching: xcoder-0.1.12.gem (100%)
Fetching: xcodeproj-0.3.4.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing calatrava:
        ERROR: Failed to build gem native extension.

        C:/Ruby/bin/ruby.exe extconf.rb
checking for -std=c99 option to compiler... yes
checking for CoreFoundation... no
checking for main() in -lCoreFoundation... no
CoreFoundation is needed to build the Xcodeproj C extension.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby/bin/ruby
        --with-CoreFoundationlib
        --without-CoreFoundationlib


Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.9.1/gems/xcodeproj-0.3.4 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.9.1/gems/xcodeproj-0.3.4/ext/xcodeproj/gem_make.out

Can you help me?
Is there something am I missing?

Thanks
Bye
Piero

Working with image assets will break the web:apache:start task

When creating images under ./asset/images/ (which is supported by calatrava) the following task will fail.

$ rake web:apache:start
...
 /Users/JohnDoe/tehProject/web/public/images
rake aborted!
No such file or directory - /Users/JohnDoe/tehProject/web/public/images/avatar.png
…

Expected behaviour: Should create web/public/images before copying.

Manually creating that directory works around this issue.

Is that possible to just code in JavaScript instead of CoffeeScript

I understand that CoffeeScript is good in some aspects, but I also know some people really just want to code in JavaScript, because CoffeeScript is eventually JavaScript, I'm one of those people.

Is an option or switch in your future plan to make it possible? Thanks.

How do you present a Page as a modal view on iOS?

Hey!

I would like my Page to be presented as a modal view on iOS, but I can't seem to find any suitable methods in the existing Calatrava API... Now before I go and write my own plugin for that use case... I can't believe that such a common use case is not covered.. What am I missing?

Many thanks and best wishes,
Johannes

doc request: How to put calatrava based project under CI

(I namely mean Jenkins, but the process is similar for others)

To show how to prepare a CI environment (what to install, rvm etc.) and how to overcome pitfalls (like trusting .rvmrc, races over gemspec name in case of parallel builds, etc.), what to rake targets to run for build and test, and so.

Thanks.

Upgrade to xcodeproj 0.5.x

Installing Calatrava now requires downgrading the system install of xcodeproj to the 0.4.x version. Is there any reason why it won't work with 0.5.x ?

Hooks to save app state

Feature Request

In mobile platforms which allow multiple apps to run simultaneously, it's not unusual for a user to put app in background and resume activity later. While in background, app can be killed to reclaim memory both in Android and iOS.

Since most of the app state lives in Coffeescript/Javascript based controllers it's often hard to restore that back once app re-instantiates. It would be helpful to have hooks as part of the framework which would allow user to save application state at different critical points like, app going to background or restore it when app is regaining focus.

This would be somewhat similar to the implementations that both iOS provides; either by calling predetermined functions like onResume onStarte onPause.

[droid] RequestLoader.onLoadingFinish NullPointerException

tl;dr In Android the RequestLoader sometimes fails in onLoadingFinish with a NullPointerException because the receivers haven't been registered in time for onLoadingStart to be called. This happens when an Ajax request is triggered immediately in a controller.

Scenario

I have a controller which immediately fires off an ajax request on init (is that an ok thing to do? it works everywhere but Android).

example.list.controller = ({views, changePage, ajax}) ->
  ajax
    url: 'http://example.com'
    method: 'GET'
    success: (d) -> 'succeeded'
    failure: (status, message) -> 'failed'

This creates an AjaxRequest in the Android bridge, which executes roughly like so:

protected Void doInBackground(String... params) {
  try {
    context.sendBroadcast(new Intent("com.calatrava.ajax.start"));

    // execute request
  } finally {
    context.sendBroadcast(new Intent("com.calatrava.ajax.finish"));
  }

  return null;
}

Those sendBroadcast calls notify the RequestLoader to display a progress indicator, then hide it when the request is done.

Issue

It seems the first sendBroadcast(new Intent("com.calatrava.ajax.start")) call is happening before the receivers have been registered (in RegisteredActivity.onResume), but by the time the last sendBroadcast(new Intent("com.calatrava.ajax.finish")) executes the receivers have been registered.

The end result is that the RequestLoader never receives the start notification, and then does receive the finish and crashes because the dialog doesn't exist.

Solution?

The easy fix is to just wrap the dialog.hide() call in a null check, but that's not very satisfying.

I'll try to do some more digging, but I'm wondering why the Activity isn't fully initialized by the time the controller javascript is executed. I suspect either multi-threading, or something is blocking when it shouldn't be.

Thoughts?

Upgrade Droid build tasks to use Gradle

Feature Request

Android has recently upgraded it's build tool from Ant to Gradle. It would make sense to for Calatrava to configure new Android projects with build tool as Gradle since that has a native support from Android community now. Current Android projects are configured with Ant right now.

Android Plugin callback errors out if returned data is null

If one of the plugin calls returns "null" as the data back to controller, calatrava throws a null pointer error. This is because the following function call in "PluginRegistery" assumes data to be not null always.

public void invokeCallback(String callbackHandle, Object data)
  {
    rhino.callJsFunction("calatrava.inbound.invokePluginCallback", new String[] {callbackHandle, data.toString()});
  }

Either Calatrava should handle this scenario gracefully or return a different representation of null internally which can be received in controller code successfully.

Can we make the scripts RVM free...

Hi...

I have not installed RVM but

build_env.sh runs

source ~/.rvm/scripts/rvm
rvm rvmrc load

Can we make the installation rvm free...

Thanks
Hari

Update `Plans.md`

Plans.md is already outdated (== nearly all things already implemented). I'd like to see new roadmap, either in updated Plans.md or moved from file to wiki.

"could not find 'env.coffee' in environment 'development'

Hi,

I was toying with this project and once I installed, calatrava onto my system and created a project with it. I got the above error.

Below is the full error:

cala rake web:apache:start
sass --update shell/stylesheets
cp shell/stylesheets/shell.css build/shell/css
coffee shell -> build/shell/js
node_modules/coffee-script/bin/coffee --compile --output build/shell/js shell
coffee kernel/app -> build/kernel/js
node_modules/coffee-script/bin/coffee --compile --output build/kernel/js kernel/app
cp build/shell/css/shell.css ./web/public/styles
cp ./web/public/images
cp assets/lib/ICanHaz.js assets/lib/underscore.js assets/lib/zepto.js ./web/public/scripts
cp build/kernel/js/converter/controller.converter.js ./web/public/scripts
cp build/kernel/js/converter/init.converter.js ./web/public/scripts
cp build/shell/js/pages/converter/page.conversionForm.js build/shell/js/support/shell.js ./web/public/scripts
cp build/kernel/js/calatrava.js build/kernel/js/pageHelper.js ./web/public/scripts
cp ./web/public/fonts
haml: ./web/app/views/index.haml -> ./web/public
coffee ./web/app/source -> ./web/public/scripts
node_modules/coffee-script/bin/coffee --compile --output ./web/public/scripts ./web/app/source
CALATRAVA_ENV = 'development'
rake aborted!
Could not find 'env.coffee' in environment 'development'

Does anyone know what this means?

[droid] First render goes astray

When first running the sample app on Android, the very first call by the converter.controller to render the conversionForm goes astray. As a result, the left hand currency drop-down remains empty. The right hand drop-down is correctly displayed, and all subsequent renders seem to work as expected.

Cosmetic: ios/public misplaced during calatrava create

When I run calatrava create foo, the project is created fine, except a little quirk: ios/public is created not inside foo but as a sibling to foo. In XCode it can be seen that public is missing, so it is probably created for a reason, just name of the project is forgot during mkdir or something. After I mv ios/* foo/ios/ && rmdir ios, everything is fine.

Android app breaks if a Plugin is called before launching an activity

If app design is such that before the first activity in android app is launched, a plugin is called (which can often be the case, if device specific values are specified via plugin) then app halts without throwing an error.

The reason for this is as follows:

  • When a RegisteredActivity or WebViewActivity is launched in Android app then broadcasts are registered for "Command".
  • Since a plugin is called before either a WebViewActivity or RegisteredActivity has initialized, there are no registered broadcasts receivers to catch the command initiated by registered plugin in call() method.
  • No error is thrown and because no value is returned back from plugin app either halts unceremoniously or crashes.

Potential Fix:

  • A most simple fix is to make the Bootstrap activity a RegisteredActivity instead of an Activity subclass. This would not be registered as a Calatrava page since it's not a valid view but only serves as a simple splash screen at this point. However, it would initiate the broadcast registry before plugin call happens.

A more elaborate fix would mean modularizing broadcast registry to be away from RegisteredActivity. However given that broadcast registery causes several other race conditions resulting in sporadic behavior of "Progress Spinner", as reported in issue #52; I would recommend getting rid of those in long term so that their behavior is predictable and easy to debug.

I'll submit a pull request with a quick fix in short term.

On first installing Calatrava on Lion, rake bootstrap fails with an npm install error

paul-kavanaghs-computer:pakrat paulkav$ npm install
npm ERR! Error: Not found: cucumber@'latest'
npm ERR! Valid install targets:
npm ERR! ["latest","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9","0.2.10","0.2.11","0.2.12","0.2.13","0.2.14","0.2.15","0.2.16","0.2.17"]
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:402:10)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:363:15
npm ERR! at saved (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:136:7)
npm ERR! at cb (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:31:9)
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]
npm ERR!
npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/paulkav/pakrat
npm ERR! node -v v0.4.11
npm ERR! npm -v 1.0.27
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/paulkav/pakrat/npm-debug.log
npm not ok

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.