Skip to content

Commit

Permalink
Use the new addEventListener from dom.
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 51dc3002c43044407d87714cc806fcca943dfc8b
  • Loading branch information
jaccarmac committed Apr 1, 2015
1 parent b0b2a6e commit bd9b2ea
Show file tree
Hide file tree
Showing 7 changed files with 248 additions and 250 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.jaccarmac.draftboys" version="0.4.1"
<widget id="com.jaccarmac.draftboys" version="0.4.2"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>DRAFTBOYS</name>
Expand Down
8 changes: 2 additions & 6 deletions draftboys.org
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ will help me practice Cordova, Nim, literate programming, and App Engine.
#+NAME: config.xml
#+BEGIN_SRC xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.jaccarmac.draftboys" version="0.4.1"
<widget id="com.jaccarmac.draftboys" version="0.4.2"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>DRAFTBOYS</name>
Expand Down Expand Up @@ -154,11 +154,7 @@ will help me practice Cordova, Nim, literate programming, and App Engine.
#+BEGIN_SRC nim
import dom

proc addEventListener(target: ref TDocument, `type`: cstring,
listener: proc (event: TEvent), useCapture: bool = false)
{.importc: "EventTarget.prototype.addEventListener.call".}

proc placeholderListener(event: TEvent) =
proc placeholderListener(event: ref TEvent) =
document.getElementById("placeholder").innerHTML = "Hello from Nim!"

document.addEventListener("deviceready", placeholderListener)
Expand Down
2 changes: 1 addition & 1 deletion platforms/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="401" android:versionName="0.4.1" package="com.jaccarmac.draftboys" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:hardwareAccelerated="true" android:versionCode="402" android:versionName="0.4.2" package="com.jaccarmac.draftboys" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
Expand Down
Loading

0 comments on commit bd9b2ea

Please sign in to comment.