• No results found

Beginner's Guide. LiveCode Mobile Development. LiveCode. Create fun-filled, rich apps for Android and ios with. Colin Holgate PUBLISHING

N/A
N/A
Protected

Academic year: 2021

Share "Beginner's Guide. LiveCode Mobile Development. LiveCode. Create fun-filled, rich apps for Android and ios with. Colin Holgate PUBLISHING"

Copied!
7
0
0

Loading.... (view fulltext now)

Full text

(1)

LiveCode Mobile

Development

Beginner's

Guide

Create

fun-filled,

rich apps for

Android

and iOS with

LiveCode

Colin

Holgate

[

PUBLISHING

BIRMINGHAM-MUMBAt

]

(2)

Table of Contents

Preface

1

Chapter

1:

LiveCode

Fundamentals 7

Background history

and

metaphors

8

You do have

LiveCode,

don't

you?

9

Learning

the

lay

ofthe land 9

Main windows 10

Timefor action-it'sa

drag,

but

you'll

like it!

11

Creating

a

hierarchy

13

Stackstructure 14

Where codegoes 14

Timeforaction-

making

and

navigating

between cards 15

Making

a

simple

calculator

application

18

Inspector

clues,

oh... 18

Time for action-

making

the calculatorbuttons

19

Verbosity,

synonyms, and "me" 20

Adding

the card handlers 22

Variable

types

in LiveCode 24

Extending

the calculator 27

Other interfacecontrols 28

Video

player

control 28

Still

image

control 28

Rollover buttons 28

Many

MoreControls... 30

Debugging

30

RunRev's online tutorials 32

Summary

32

Chapter

2:

Getting

Started with LiveCode

Mobile

35

(3)

Table

of

Contents

Becoming

anAndroid

developer

36

Android Market 36

Amazon

Appstore

40

Downloading

the AndroidSDK 44

Installing

AndroidSDKon MacOSX(Intel) 45

Installing

Android SDKonWindows 46

Pointing

LiveCode tothe Android SDK 47

Becoming

aniOS

developer

49

Installing

Xcode 57

Pointing

LiveCodeto the iOS SDKs 59

Beforewe canmakeourfirstmobile app 60

Getting ready

to testfor Android 60

Timefor action-

starting

anAndroid virtual device 60

Connecting

a

physical

Android device 61

UsingaKindle Fire 61

Timefor action-

adding

a Kindle FiretoADB 62

Getting

ready

to testfor iOS 64

Timeforaction-

using

the iOS simulator 64

Appiness

atlast! 64

Time for action

-testing

a

simple

stack in the simulators 65

Time for action-

testing

a

simple

stackondevices 66

Further

reading

67

Summary

68

Chapter

3:

Building

User interfaces 69

Setting

upatest bed mobile app 70

Timeforaction-

making

thetest bedstack 70

Invoking

the

desktop

e-mail

application

72

Time for

action-calling

the native e-mail

application

72

Installing

the e-mail test ontodevices 72

Timeforaction-

trying

testbed stackondevices 73

Opening

a webpage 75

Timeforaction-

calling

the native browser

application

75

Mobile-only,

date

picker

76

Time for action-

showing

adate

picker

77

Mobile-only, loading pictures

77

Time for action-

loading pictures

78

Making

OS

styled

buttons 79

Using

bitmaps

80

Timeforaction-

using Photoshop

to preparebutton states 80

MobGUItotherescue! 83

Time for action

(4)

Test bed app, the MobGUI way 86 Time for action

-using

MobGUItomake a testbed app 86

MobGUI native controls 88

Timeforaction-

using

native controls from MobGUI 89

Adjusting things

for differentscreensizes 91

Layout using

a resize handler 91

Time for action

-simple

code

layout

example

92

Layout using

the LiveCode

Geometry

Manager

93

Timeforaction-

using

the

Geometry

Manager

to

position

buttons 94

Layout using

MobGUI 95

Time for action-

using

MobGUItoremember

layouts for

us 95

Further

reading

96

Summary

97

Chapter

4:

Using

Remote Data

and Media

99

Stackstructure 100

Code driven and

manually

created

layouts

100

Locations for code 101

Loading

and

saving

external data 103

Querying

a URL 103

Reading

and

writing

to atextfile 105

Using

another stackto store data 107

Time for action

-creating

adatasavestack 107

Creating

a web

"scraper"

app 110

Time foraction-

setting

uptab

navigation

110

The Browser card 112

Time foraction-

adding

the browser controls 113

The Links card 114

Time for action -

making

alinksextractionfunction 115

Themissinglinks 118

Onemorething... 118

Time for action

-adding

the Links card "init" handler 118

The Text card 120

Time for action-

setting

upthe Textcard 120

The Media card 121

Timefor action-

extracting

alist of media links 121

Time for action

-setting

up the Media card

scripts

123

The

Keepers

card 125

Time for Action -

setting

up the

Keepers

card 126

What now? 129

(5)

TableofContents

Chapter

5:

Making

a

Jigsaw/

Puzzle

Application

Image

data format

Mystery byte...

Misusing

imageData!

Timefor action-

testing

a

getPixel

function

Simulating

lots and lots of buttons Time for action

-making

a mapof the United States

Using

maskData for collision detection Timefor action-

making

a racecourse

Time foraction-

making

a race car

Making

a

jigsaw puzzle

Going

to

pieces...

Timefor action-

creating

the

pieces

and

choosing

an

image

Timefor action-

transferring imageData

Adding interactivity

Timefor action-

setting

uptouchevents

Summary

Chapter

6:

Making

a

Reminder

Application

159

Whatisa "reminder"?

When?

Date andtime

pickers

Timefor action-

creating

date and time

pickers

Where?

Time foraction-

trying

outnative location

tracking

Calculating

the distance between two

points

on Earth

What?

Making

the reminders app

Laying

outthe cards

Timefor action

-creating

the reminderappscreens

Stack level

scripts

Timefor action-

adding

Stack level functions

Homecard

scripts

Time for

action

-

making

the Home cardbuttonswork

Creating

a location card

Time for action-

making

the location card work

Reminder

entry

form

Time for action-

taking

in information about the reminder

Summary

Chapter

7:

Deploying

toYour Device Standalone

Application

Settings

(6)

General 188

Stacks 189

Copy

Files 189

iOS 189

Build for 190

BasicApplicationSettings 191

Icons 192

Splash Screens 193

OrientationOptions 194 Custom URL Scheme 194

Requirementsand Restrictions 194

StatusBar 195

Android 196

BasicApplication Settings 196

RequirementsandRestrictions 198

Application Permissions 198

UserInterfaceOptions 199

Building

Apps

for Beta Testers 199

Sending

anAndroid

App

to testers 199

Preparing

an iOS

App

so

that

itcanworkon someone else's device 200

Creating

"overthe air" installers for iOS 202

AirLaunch 202

BetaBuilder 203

TestFlightApp.com

204

Creating

anapp storesubmission file 204

Finding

and

using

the Android

Keytool

application

204

Creating

a distribution certificate for iOS 206

Uploading

tothe app stores 208

What's similar 209

What's different 209

Bottom line 209

Summary

210

Appendix: Extending

LiveCode 211

The

story

sofar... 211

Extending

LiveCode 212

MobGUI 212

tmControl 213

DropTools Palette

214

mergExt

215

Creating

your ownadd-ons 216

Custom controls 216

(7)

Table

of

Contents

Pop

Quiz

Answers . . 219

Chapter

1,

LiveCode Fundamentals 219

Chapter

2,

Getting

Started with LiveCode Mobile 220

Chapter

3,

Building

User

Interfaces

220

Chapter

4,

Using

Remote Data and Media 221

Chapter 5, Making

a

Jigsaw

Puzzle

Application

221

Chapter 6,

Making

aReminders

Application

222

References

Related documents