Permalink
Browse files

Stopped work on the splash store to prepare for demo.

  • Loading branch information...
1 parent fee0e94 commit 3f84ef26e90515d4ab239fb7bc09c9252d20fa7c Harry Brundage committed Nov 28, 2010
@@ -17,18 +17,17 @@ class Action extends Citrus.Object
actionText: ""
constructor: (attributes) ->
- if (_.keys(attributes).length == (this.constructor.declares.length + Citrus.Action.alwaysDeclared.length))
- @valid = true
- for k, v of attributes
- k = k.camelize(true) # Camel case the underscored lowercase Rails text
- if _.isFunction(this[k])
- @valid = (@valid && this[k].call(v))
- else
- this[k] = v
-
- else
+ unless (_.keys(attributes).length == (this.constructor.declares.length + Citrus.Action.alwaysDeclared.length))
Ti.API.debug("Wrong amount of arguments passed to action constructor!")
- @valid = false
+
+ @valid = true
+ for k, v of attributes
+ k = k.camelize(true) # Camel case the underscored lowercase Rails text
+ if _.isFunction(this[k])
+ @valid = (@valid && this[k].call(v))
+ else
+ this[k] = v
+
readyToRun: () ->
return true

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -3,7 +3,7 @@ class VisitLinkAction extends Citrus.PlatformAction
type: "PlatformVisitLinkAction"
buttonText: "Safari"
- iconName: "safari"
+ iconName: "go"
action: (success, failure) ->
Titanium.Platform.openURL(@url)

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,22 +1,24 @@
class SplashStore extends Citrus.Object
constructor: () ->
+ return
@db = Titanium.Database.open("citrus")
# Temp reset
if true
names = []
- tables = @db.execute("SELECT name from sqlite_master WHERE type='table';")
+ # tables = @db.execute("SELECT name from sqlite_master WHERE type='table';")
while tables.isValidRow()
names.push tables.fieldByName('name')
tables.next()
tables.close()
- for name in names
- result = @db.execute("DROP TABLE IF EXISTS "+name)
+ #\for name in names
+ # result = @db.execute("DROP TABLE IF EXISTS "+name)
- @db.execute("CREATE TABLE splashes IF NOT EXISTS (id INTEGER PRIMARY KEY, code STRING NOT NULL, name STRING NOT NULL, data TEXT NOT NULL)")
+ # @db.execute("CREATE TABLE splashes IF NOT EXISTS (id INTEGER PRIMARY KEY, code STRING NOT NULL, name STRING NOT NULL, data TEXT NOT NULL)")
addSplash: (data) ->
+ return
if data.persistable?
save = data.persistable()
else

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3f84ef2

Please sign in to comment.