[FIXED] mojo-target-* now interactive.

This commit is contained in:
Sami Samhuri 2009-11-24 12:06:27 -08:00
parent 95c0f355ab
commit d7d2f68339
4 changed files with 44 additions and 27 deletions

View file

@ -1,6 +1,13 @@
CHANGELOG CHANGELOG
========= =========
sjs 2009-11-24
v 0.9.5 (bug fix)
- Now that I have a real Palm Pre device I was able to test device support.
Turns out I couldn't target the device because mojo-target-device was not
interactive. Whoops.
sjs 2009-11-22 sjs 2009-11-22
v 0.9.4 launch emulator if needed v 0.9.4 launch emulator if needed

33
mojo.el
View file

@ -1,6 +1,6 @@
;;; ../mojo.el --- Interactive functions to aid the development of webOS apps ;;; ../mojo.el --- Interactive functions to aid the development of webOS apps
;; 2009-11-24 09:51:16 ;; 2009-11-24 12:06:06
(defconst mojo-version "0.9.4") (defconst mojo-version "0.9.5")
(require 'json) (require 'json)
@ -278,6 +278,23 @@ NAME is the name of the scene."
(mojo-cmd-with-target "palm-launch" (list (mojo-app-id)))) (mojo-cmd-with-target "palm-launch" (list (mojo-app-id))))
;;* interactive
(defun mojo-target-device ()
"Specify that Mojo commands should target a real device.
Sets `*mojo-target*' to \"usb\"."
(interactive)
(setq *mojo-target* "usb"))
;;* interactive
(defun mojo-target-emulator ()
"Specify that Mojo commands should target a real device.
Sets `*mojo-target*' to \"tcp\"."
(interactive)
(setq *mojo-target* "tcp"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Some support functions that grok the basics of a Mojo project. ;; ;; Some support functions that grok the basics of a Mojo project. ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -497,18 +514,6 @@ URL is the luna url, and DATA is the data."
"Used to specify the target platform, \"usb\" for the device "Used to specify the target platform, \"usb\" for the device
and \"tcp\" for the emulator. Deaults to \"tcp\".") and \"tcp\" for the emulator. Deaults to \"tcp\".")
(defun mojo-target-device ()
"Specify that Mojo commands should target a real device.
Sets `*mojo-target*' to \"usb\"."
(setq *mojo-target* "usb"))
(defun mojo-target-emulator ()
"Specify that Mojo commands should target a real device.
Sets `*mojo-target*' to \"tcp\"."
(setq *mojo-target* "tcp"))
(defun mojo-emulator-running-p () (defun mojo-emulator-running-p ()
"Determine if the webOS emulator is running or not. "Determine if the webOS emulator is running or not.

View file

@ -158,6 +158,23 @@ NAME is the name of the scene."
(mojo-cmd-with-target "palm-launch" (list (mojo-app-id)))) (mojo-cmd-with-target "palm-launch" (list (mojo-app-id))))
;;* interactive
(defun mojo-target-device ()
"Specify that Mojo commands should target a real device.
Sets `*mojo-target*' to \"usb\"."
(interactive)
(setq *mojo-target* "usb"))
;;* interactive
(defun mojo-target-emulator ()
"Specify that Mojo commands should target a real device.
Sets `*mojo-target*' to \"tcp\"."
(interactive)
(setq *mojo-target* "tcp"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Some support functions that grok the basics of a Mojo project. ;; ;; Some support functions that grok the basics of a Mojo project. ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -377,18 +394,6 @@ URL is the luna url, and DATA is the data."
"Used to specify the target platform, \"usb\" for the device "Used to specify the target platform, \"usb\" for the device
and \"tcp\" for the emulator. Deaults to \"tcp\".") and \"tcp\" for the emulator. Deaults to \"tcp\".")
(defun mojo-target-device ()
"Specify that Mojo commands should target a real device.
Sets `*mojo-target*' to \"usb\"."
(setq *mojo-target* "usb"))
(defun mojo-target-emulator ()
"Specify that Mojo commands should target a real device.
Sets `*mojo-target*' to \"tcp\"."
(setq *mojo-target* "tcp"))
(defun mojo-emulator-running-p () (defun mojo-emulator-running-p ()
"Determine if the webOS emulator is running or not. "Determine if the webOS emulator is running or not.

View file

@ -1,6 +1,6 @@
{ {
"title": "mojo.el", "title": "mojo.el",
"filename": "../mojo.el", "filename": "../mojo.el",
"version": "0.9.4", "version": "0.9.5",
"template": "template.el" "template": "template.el"
} }