반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형
Posted on . Written by


화요일의 Tutorial이 다시 돌아왔습니다. 오늘의 튜토리얼은

Brent Sorrentino 가 작성한 건데요. Northern Colorado 에서 Corona Ambassador 로 활동하고 있습니다. Brent는 2년여 코로나 커뮤니팅서 활발히 활동하고 있습니다. 그는 프리랜서 여행사진작가이고 코로나 개발자이며 그래픽 디자이너 입니다. 그만의 앱을 개발하기 위해 코로나를 사용하고 있습니다. 또한 정기적으로 포럼에서 여러사람에게 도움을 주고 있고 여러 이슈들을 해결해 주고 있습니다 그의 웹사이트를 보시려면 여기를 클릭하세요.



오늘의 튜토리얼은 어떻게 animated sprite를 implement 할 것인가와 그와 관련된 API 들에 관한 겁니다. 아마 이전 튜토리얼에서 다룬 내용도 있을 겁니다. 올해 초 현재의 스프라이트 시스템이 소개 된 이후 몇가지 주요 개선사항이 있었습니다. 그리고 많은 개발자들이 아직도 코로나에서 어떻게 sprite를 implement 하는지에 대해 혼동을 하고 있습니다. 이 sprite를 사용하는 방법에는 두가지가 있습니다.


  1. The old (and now depreciated) sprite.* library.
  2. The current sprite APIs that work cohesively with image sheets and the display.* library.


이렇게 코로나의 스프라이트 라이브러리가 변화를 보였는데요. 그 중에서 현재 버전을 사용할 것을 강력히 추천합니다. 현재 방법을 사용하지 않았거나 코로나에서 스프라이트를 한번도 사용해 보지 않았다면 이 튜토리얼이 많이 도움이 될 겁니다.


코로나의 basic animation에 이미 익숙하신 분이라면 이 튜토리얼이 sprite event listeners에 대한 모든 정보를 제공하고 어떻게 implement 할 것인지를 가이드 해 드릴 겁니다.


Tutorial Contents

  1. Configuring a Basic Image Sheet or “Sprite Sheet”
  2. Defining Animation Sequences
  3. Declaring a Sprite Object
  4. Sprite Control Methods — managing playback and sequences
  5. Sprite Properties — accessing and setting various sprite properties
  6. Sprite Event Listeners — detecting sequence events such as “ended”, “loop”, and “next”
  7. Frame Trimming Support


Configuring a Basic Image Sheet or “Sprite Sheet”



정확히 image sheet 이 뭘까요? 한번 상상해 보세요. 여러분들의 animated object 들을 위해 각각 의 프레임들을 그린 한장의 종이가 있다고요. 코로나에서 다른 전문적인 용어로는 texture atlas, image map, or sprite sheet 라고 합니다. 이걸 그냥 간단히 image sheet라고 부를께요. 이것은 static 이든 animated object 이든지 상관없이 활용할 수 있습니다.

graphics.newImageSheet() API에 대한 자세한 사용법과 샘플들은 여기에 있습니다. 이 튜토리얼에서는  그중에서 어떻게 animated sprite를 위해 image sheets를 사용할지에 대해 다루겠습니다.



아래 그림은 running cat 을 표현하는 샘플 image sheet 입니다. 이 튜토리얼을 공부하면서 이 이미지를 사용하시려면 여기에 hi-resolution version 이미지가 있습니다. 이 sheet 에는 8개의 프레임이 순서대로 있습니다. 디폴트로 애니메이션은 top-left frame 부터 시작해서 오른쪽으로 진행하죠. 오른쪽 끝까지 가면 그 다음 줄로 갑니다. 그리고 전체 프레임을 다 돌면 중지합니다.






코로나에서 이 image sheet 을 어떻게 다루는지 보겠습니다. 우선 uniform-sized frame 인 basic image sheet 를 위해 indexed table을 setup 합니다.

local sheetData = {
  width = 512, --the width of each frame
  height = 256, --the height of each frame
  numFrames = 8, --the total number of frames on the sheet
  sheetContentWidth = 1024, --the total width of the image sheet (see note below)

  sheetContentHeight = 1024 --the total height of the image sheet (see note below)

}


IMPORTANT:  sheetContentWidthsheetContentHeightoverall 1:1 dimensions of the image sheet (전체 가로 세로)를 나타냅니다.1:1 content scale 은 여러분이 앱의 config.lua file에 set up 한 내용을 기준으로 합니다.  이렇게 하면 다른 디바이스별로 다른 이미지를 사용할 수 있도록 합니다. 예를 들어 @1 sheet는 original iPad 에 맞는 이미지를 사용하고 high-resolution @2 sheet 는 Retina iPad 에 맞는 이미지를 사용할 수 있습니다. 그러니까 1:1 sheet이 1024×1024 pixels 이라면 2:1 sheet 는 2048×2048 인 이미지가 되는거죠. image sheet setup에는 항상 1:1 dimensions를 사용하세요. config.lua file 세팅이 정확하다면 그 다음부터는 코로나가 알아서 처리할 겁니다.



이제 실제 image sheet 를 정의하세요. 괄호 안에 image file 과 위에 정의한 data table을 넣어주시면 됩니다. 아래처럼 파일이름만 넣으면 그 이미지 파일을 여러분 프로젝트 디렉토리의 root 에서 찾을 겁니다. 


local mySheet = graphics.newImageSheet( "runningcat.png", sheetData )


Defining Animation Sequences


여러분은 두가지 방법으로 animated frame 순서를 정하실 수 있습니다.

  • consecutively using a starting frame index and frame count
  • non-consecutively using a specific order of frames


이 두 가지 방법으로 코로나에서 sprite system 을 아주 flexible 하게 사용하실 수 있습니다. 하나의 image sheet 으로 여러 animation sequences를 사용해서 활용할 수가 있죠. 두 경우 모두 sub-table에서 comma-separated array 로 sequences를 define 하시면 됩니다.


Consecutive frames


local sequenceData = {
  { name = "normalRun", --name of animation sequence

    start = 1, --starting frame index

    count = 8, --total number of frames to animate consecutively before stopping or looping

    time = 800, --optional, in milliseconds; if not supplied, the sprite is frame-based

    loopCount = 0, --optional. 0 (default) repeats forever; a positive integer specifies the number of loops

    loopDirection = "forward" --optional, either "forward" (default) or "bounce" which will play forward then backwards through the sequence of frames

  } --if defining more sequences, place a comma here and proceed to the next sequence sub-table


}



Non-consecutive frames


local
sequenceData = {
  { name = "fastRun",
    frames = { 1,2,4,5,6,7 }, --specific order of frame indexes from the image sheet

    time = 250,
    loopCount = 0
  } --if defining more sequences, place a comma here and proceed to the next sequence sub-table

}

Mixed sequences (both consecutive and non-consecutive sequences)


local
sequenceData = {
{ name="normalRun", start=1, count=8, time=800 },
  { name="fastRun", frames={ 1,2,4,5,6,7 }, time=250, loopCount=0 }

}

 

Declaring the Sprite Object


현재의 sprite method를 사용하려면 display.newSprite() API 로 sprite를 선언하셔야 합니다. 신택스는 간단합니다.


display.newSprite( [parent,] imageSheet, sequenceData )
  • parent = The parent display group in which to insert the sprite (optional).
  • imageSheet = The image sheet which the sprite should utilize.
  • sequenceData = The array of animation sequences which you set up. The sprite will default to the first sequence in the array unless you specify otherwise (see Sprite Control Methods below).


이 튜토리얼에 나온 예제로 한다면 sprite 선언은 아래와 같을 겁니다.

local animation = display.newSprite( mySheet, sequenceData )


이제 이 sprite 는 display object가 됐습니다. 그냥 일반 static image, vector objects 같은 것들과 같게 됐죠. 이제 이 sprite 는 움직일 수도 있고 manipulated 될 수도 있고 physics body 를 입힐 수도 있고... 등등을 할 수 있습니다. 이 sprite object 를 remove 시키려면object:removeSelf()display.remove( object ) 를 사용하시면 됩니다. remove 한 다음에 nil로 세팅하는 것을 잊지 마세요.


Sprite Control Methods


이 스프라이트 시스템은 4가지 주요 control methods를 제공합니다. 여러분들은 이것으로 스프라이트의 playback과 sequence 를 control 하실 수 있습니다.


  • animation:play()
    Start the animation playing. Animations do not begin playing when you create them — you must start each animation manually using this command.
  • animation:pause()
    Pauses the animation. There is no “stop” control method; instead, pause the animation using this method.
  • animation:setFrame( frame )


    Immediately set or skip to the indicated frame index. If you want to “stop and reset” an animation sometime after you have started playing it, use the :pause() and :setFrame( frame ) commands consecutively, setting the frame back to the beginning of the sequence.
  • animation:setSequence( sequence )


    Set the sprite to a specific sequence that you declared in your sequence array. For example, if you want to change your cat animation from “normalRun” to “fastRun”, you would use animation:setSequence( “fastRun” ) and use animation:play() to begin playing it, since the animation will not play automatically after you change the sequence.


Putting It Together


전체 애니메이션을 함께 넣어보죠. 달리는 고양이를 normalRun 과 fastRun 두가지로 셋업할 겁니다. 아래 예제가 있습니다.

local sheetData = { width=512, height=256, numFrames=8,

sheetContentWidth=1024, sheetContentHeight=1024 }

local mySheet = graphics.newImageSheet( "runningcat.png", sheetData )

local sequenceData = {
  { name = "normalRun", start=1, count=8, time=800 },
  { name = "fastRun", frames={ 1,2,4,5,6,7 }, time=250 }
}



local animation = display.newSprite( mySheet, sequenceData )
animation.x = display.contentWidth/2 --center the sprite horizontally
animation.y = display.contentHeight/2 --center the sprite vertically

animation:play()





코로나 시뮬레이터로 테스트 해 보세요. 저 고양이가 화면 중앙에 나올겁니다. 그리고 normalRun sequence로 animating 되겠죠. (sequence를 따로 선언하지 않으면 위에 얘기했던 디폴트 순수대로 진행합니다.)
테스트를 위해 animation:play()앞에 animation:setSequence( “fastRun” )를 넣어 보세요.


Sprite Properties


Corona provides several properties which can yield information about existing sprites. You can even modify the timeScale (relative speed) of a particular sprite. These properties are as follows:

코로나에는 현재의 스프라이트에 적용할 수 있는 몇가지 프로퍼티들을 제공합니다. 특정 스프라이트의 timeScale (relative speed)를 modify 할 수도 있습니다. 아래 프로퍼티들을


  • object.frame
    A read-only property that represents the currently shown frame index of the loaded sequence. This does not set the frame — use the :setFrame() command to explicitly set an animation frame.
  • object.isPlaying
    Returns true if the animation is currently playing; false if it is not.
  • object.numFrames
    A read-only property that represents the number of frames in currently loaded sequence.
  • object.sequence
    A read-only property that returns the name of the currently playing sequence.
  • object.timeScale
    Gets or sets the scale to be applied to the animation time. This is used to control a sprite’s animation speed dynamically. For example, a time scale of 1.0 (default) runs the animation at normal speed. A time scale of 2.0 runs the animation twice as fast. A time scale of 0.5 runs the animation at half speed. The maximum allowed value is 20.0 and the minimum allowed value is 0.05. The value supports up to 2 decimal places.


Sprite Event Listeners


이제 basic sprite 선언과 두개의 sequences (“normalRun” , “fastRun”) 가 생겼습니다. 

이제 sprite event listener를 살펴보죠. 그리고 그것을 어떻게 implement 하는지에 대해 알아보겠습니다. sprite event listener 의 정의는 'sprite의 activity를 "listens" 하고 그 정보를 listener function에 전달하는 것' 입니다.


예를 들어 여러분의 달리는 고양이를 "normalRun" sequence로 4번(4 cycles)를 돌게 한 다음에 "fastRun" sequence로 바꿀 수 있습니다. 이것은 standard timer 로 표현하기에는 불가능한 효과죠. 그래서  그 대신에 sprite event listener를 implement 하는 겁니다.



예제를 보기 전에 sprite에서 사용 가능한 5가지 를 event phases보겠습니다.

이 phases 들은 최근의 코로나 Public Release 인 (2012.894) 버전 이후부터 사용하실 수 있습니다.


  • began = The sprite has started playing.
  • ended = The sprite has finished playing.
  • bounce = The sprite has bounced from forward to backward while playing.
  • loop = The sprite has looped to the beginning of the sequence.
  • next = The sprite has played a subsequent frame that’s not one of the above phases.


이 phases 를 어떻게 listen 할지에 대해 다루겠습니다. 근데 우선 달리는 고양이에 loopCount = 4를 추가해서 normalRun 의 sequence를 바꾸고 시작하도록 하죠. 이렇게 하면 4번의 loop가 끝나면 ended phase를 받을 수 있도록 해 줍니다.


local sequenceData = {
  { name = "normalRun", start=1, count=8, time=800, loopCount=4 }, --add loopCount=4

  { name = "fastRun", frames={ 1,2,4,5,6,7 }, time=250 }
}

 

Now, let’s write the listener function and add the actual event listener to the running cat. You can place this at the end of your sample code, after the sequences are declared and the sprite object placed on the screen.

이제 listener function을 만들어 봅시다. 그리고 달리는 고양이에 실제 event listener를 달아보죠. 아래 내용을 위 샘플 코드의 마지막 부분에 sequence 가 선언된 다음에 추가하시면 됩니다.


local function mySpriteListener( event )
if ( event.phase == "ended" ) then
    local thisSprite = event.target --"event.target" references the sprite
    thisSprite:setSequence( "fastRun" ) --switch to "fastRun" sequence
    thisSprite:play() --play the new sequence; it won't play automatically!
  end

end

animation:addEventListener( "sprite", mySpriteListener ) --add a sprite listener to your sprite

 
sprite listener 가 이제 모든 phases를 listener 함수에 전달하게 됩니다. if-then 구문을 사용해서 이 phases를 사용하는 것은 개발자가 코딩해야 할 부분입니다. 특정 시점에 우리는 ended phase를 listen 하게 됩니다. sequence의 loopCount parameter에 의해 4번의 루프가 끝나면 이 ended phase가 발생하도록 했죠. 이 ended phase 를 받으면 이 cat animation을 fastRun sequence로 바꾸고 play 하게 됩니다.

하나의 sprite listener를 모든 sprite 에 대해 사용하실 수 있습니다. listener 함수에서 event.target을 사용해서 원하는 스프라이트를 catch 해서 사용하실 수 있는겁니다.


Frame Trimming Supported



최근의 Public Build (2012.894) 에서는 frame trimming 도 지원합니다. 3rd-party sprite utilities 인 SpriteLoqTexturePacker 같은 곳에서 이 기능을 제공하고 있습니다. 그리고 코로나에서도 이 어플리케이션과 호환성 있게 이 기능을 사용할 수 있도록 하고 있습니다.

frame trimming 예제는 current sprite methods 를 사용하고 있는데 이것은 여러분 시스템의 코로나 어플리케이션에 있는 “HorseAnimation” sample project에서 확인 하실 수 있습니다.


CoronaSDK → SampleCode → Sprites → HorseAnimation



이와 관련해서는 다음 튜토리얼에서 다뤄지게 될 것 같습니다. 그동안 여러분은 샘플 프로젝트를 보셔도 되고 여기에서 imageSheet documentation를 보시면 많은 도움이 되실 겁니다.


In Summary


이 튜토리얼은 current sprite methods 의 대부분을 다뤘습니다. 여기에 basic image sheets, animation sequences 정의하기, sprite playback 다루기, 다양한 sprite property들 다루기 그리고 sprite event listener 사용하기 등을 추가로 다루고 있습니다. 모쪼록 이 튜토리얼이 개발자 여러분에게 스프라이트를 이용해서 앱을 만드는데 도움을 드릴 수 있기를 바라겠습니다. 특히 이전 버전의 sprite library 를 사용하시던 분들에게 새로 바뀐 sprite library 를 사용하시는데 도움이 되기를 바라구요.


반응형


반응형
Posted on . Written by


존 레논이 말했죠, life는 네가 다른 plan을 만들 때 일어난다고요. 그런 비슷한 일들이 최근 저희들에게 일어났었습니다. Kindle HD/NOOK HD 에 대해 관심을 많이 가진 이후로요. 이런 디바이스들에 대한 Corona’s support 를 하기 위해 Kindle HD에 대한 지원을 진행했고 NOOK HD 에 대한 지원도 많이 진행 됐습니다.


한가지 우리가 찾아낸 것은 여러분의 ‘build.settings’ file 에 어떤 Lua syntax 에러가 있으면 여러분의 APK는 NOOK pre-flight submission tests에 통과하지 못할 거라는 겁니다. 여러분의 편으를 위해서 저희들이 약간의 변화를 주려고 합니다. 그래서 그 파일에 에러가 있더라도 그 APK 가 제대로 동작할 수 있도록요.


이런 critical 한 이슈들에 대해 정리하는 동안 daily build 929 버전부터 가능하도록 한 이슈들이 몇가지 있습니다.



그 중 하나가 맵뷰를 로딩할 때 배경색을 흰색에서 회색으로 바꾼건데요. 이렇게 하면 activity indicator를 보는것이 훨씬 더 쉽습니다. 또한 native activity indicator 가 전체 스크린에 나오는 버그도 수정했습니다. 이 두 이슈는 NOOK HD 가 다른 안드로이드 디바이스와는 다르게 그들의 default를 세팅하지 않았기 때문에 일어나는 것 같습니다. 또한 NOOK HD 에서 맵뷰가 redrawing 하지 않는 버그도 찾아냈는데요. 운 좋게도 이와 관련된 작업을 standard와 custom android 디바이스에서 하고 있었거든요. 그래서 쉽게 고칠 수 있었습니다.

그리고 여러분 중에 인터페이스에 관심 있는 분들은 다음 내용이 흥미로울 겁니다. new NOOK HD 에서 제공되는 alert box의 default theme 이 별로 좋지가 않습니다. 그래서 이 것을 Jellybean(4.1) 의 디폴트 theme 인 (“Holo Dark”) 을 사용하기로 했습니다. 디폴트 인 왼쪽 이미지와 Jellybean theme 인 오른쪽 이미지를 비교해 보세요.






daily build 929 에서는 안드로이드 디바이스에는 이 4.1 theme을 적용할 겁니다. 이것은 standard Android (Google Play) 이든 custom Android devices 이든 (Kindle HD, NOOK HD) 모두에 적용 됩니다. 이렇게 함으로서 전체 안드로이드 스펙트럼에 걸쳐 여러분 앱의 일관성이 유지되도록 할 겁니다.


위 내용은 Android 3.x 이상의 디바이스에 적용 됩니다. 만약에 여러분 앱이 더 오래된 디바이스에서 run 된다면 alerts의 older look을 제공할 겁니다. (older Kindles와 NOOKs 도 마찬가지 입니다.)



아래 왼쪽은 old one 이고 오른쪽은 new one 입니다. 보시면 OK, Cancel 버튼의 위치가 바뀐것을 보실 수 있을 겁니다.




반응형


반응형

Posted on . Written by




Corona daily build 928에 적용될 내용을 공지합니다. 저희들은 스토리보드와 widget library들의 여러 버그들을 반견하고 수정했습니다. 또한 차세대 widgets 를 위한 기반작업으로 widget library에 여러 작업들을 진행하고 있습니다.



이 라이브러리에 대한 어떤 기능들이 퇴보하거나 한 사항들은 없음을 말씀 드리고 싶습니다. 예를 들어 한 버그를 없애기 위해 그 기능을 제한한다든가 하는 것들요. 그래서 이렇게 heads up  정보를 알려 드립니다.



아래가 저희들이 수정한 버그들의 리스트들입니다.

Storyboard

  • 15040 – Storyboard overlayEnded stack overflow when calling gotoScene
  • 17590 – Storyboard immediate scene transitions cause simulator to hang when using Runtime::addEventListener in enterScene.
  • 15384 – modal overlays let touch events through if x < 0
  • 15264 – Storyboard: overlayEnded being called infinitely
  • 15781 – Storyboard transition when using letterbox and universal app
  • 15257 – Memory Leak with storyboard.printMemUsage()
  • 16540 – enterScene called multiple times
  • 14794 – effect time in storyboard.hideOverlay()

Widget

  • 16094 – tableView methods scrollToY() not taking topPadding property into account, and scrollToIndex() not working.
  • 15293 – Inconsistent size property of Button widget’s label) – By adding method setLabelSize( newSize ) method
  • 17029 – tableViews/scrollView widgets scrolling does not stop on tap
  • 16605 – listener not working in newTableView




반응형

Kurogo Tutorial 24 - People Module -

2012. 10. 10. 21:23 | Posted by 솔웅


반응형

People Module



people 모듈은 directory 로 어떤 mobile access 기능을 제공하는 겁니다. 간단한 configuration으로 모바일 device 에서 유저에 대한 searching 과 detail 한 정보 보기 등을 가능하도록 할 수 있습니다. LDAP base directory와 database backed directories 모두 지원합니다.


Configuring the Server Connection



이 모듈의 configuration은 Administration Module 이나 SITE_DIR/config/people/feeds.ini file을 edit 하셔야 합니다. 여러분의 directory 시스템에 connect 하기 위해서는 여러 방법들이 사용될 수 있습니다.


  • RETRIEVER_CLASS allows you to determine the mechanism for retrieving the data. Current options include:
    • LDAPPeopleRetriever - uses a standard LDAP server. You can configure the various fields if your values differ from defaults
    • ADPeopleRetriever - a subclass of the LDAP retriever that has preconfigured mappings for Active Directory
    • DatabasePeopleRetriever - connects to an external database server. This controller assumes that people are mapped to a single row and that the various fields are stored in single (definable) columns
  • PERSON_CLASS allows you to set a different class name for the returned user objects when searching. This class must be a subclass of the Person class. This allows you to write custom behavior to handle the data in your directory service.


Options for LDAPPeopleRetriever and ADPeopleRetriever


  • HOST - should match the address of your server. Keep in mind that this server must be accessible from the web server the framework is hosted on. Managing network and firewall settings is the responsibility of your network administrator.
  • SEARCH_BASE - should manage the LDAP search base of your directory. You can get this value from the administrator of your LDAP directory. Examples would include “dc=example,dc=com”
  • PORT - Optional (Default 389) The port to connect. Use 636 for SSL connections (recommended if available)
  • ADMIN_DN - Some servers do not permit anonymous queries. If necessary you will need to provide a full distinguished name for an account that has access to the directory. For security this account should only have read access and be limited to the search bases to which it needs to access.
  • ADMIN_PASSWORD - The password for the ADMIN_DN account.





다음 값들은 controller에게 searching 할 때 어떤 attributes들을 사용할 것인지를 알려 줍니다. 이 값들은 디폴트값고 다를 경우 사용할 필요가 있을 겁니다.


  • LDAP_USERID_FIELD (uid, samaccountname for AD)- Stores the unique user name for this user. Do not choose an attribute that is sensitive as they are easily viewed by users
  • LDAP_EMAIL_FIELD (mail) - The attribute of the user’s email address
  • LDAP_FIRSTNAME_FIELD (givenname) - The attribute of the user’s first name
  • LDAP_LASTNAME_FIELD (sn) - The attribute of the user’s last name
  • LDAP_FULLNAME_FIELD (blank) - If you wish to use a single field for name (like cn), include this here.
  • LDAP_PHONE_FIELD (telephonenumber) - The attribute of the user’s phone number

Options for DatabasePeopleRetriever


DatabasePeopleRetriever 에는 사용할 수 있는 여러 configuration value들이 있습니다. 모두 optional 이죠. 데이터베이스 connection에 대한 configuration에 대해 자세히 알고 싶으시면 Database Access를 보세요.

만약 이중에 어떤 value 라도 생략되면은 디폴트를 세팅할 겁니다. (Configuring Database Connections)

아래 value는 데이터가 있는 테이블의 위치를 controller에게 알려 줍니다.


  • DB_USER_TABLE - (users) The name of the table that stores the user records. This table should at least have fields for userID, name and email. Each row should contain a single user entry.


아래 값들은 controller 에게 주요 field 에 대한 정보를 줍니다. 이 값들은 디폴트값과 그 값이 다를 경우에 적용되게 됩니다.


  • DB_USERID_FIELD (userID)- stores the userID in the user table. You can use any unique column for the userID field. Do not use sensitive values as they are easily viewed by users.
  • DB_EMAIL_FIELD (email) - stores the email in the user table
  • DB_FIRSTNAME_FIELD (firstname) - stores the first name of user.
  • DB_LASTNAME_FIELD (firstname) - stores the last name of user.
  • DB_PHONE_FIELD (no default) - stores the user’s phone number. If empty then the search will not use the phone number


다른 필드들은 아래 configuring the detail fields 에서 설명됩니다.


Configuring the Detail Fields


서버 세팅이 끝났으면 여러분 서버와 detail view 와의 field mapping을 해야 합니다. 디폴트로는 LDAP으로 세팅 돼 있습니다. 만약에 nonstandard directory를 사용하신다면 혹은 자체 필드들을 가지고 있는 데이터베이스와 연결하신다면 이것들이 어떻게 display 될지에 대해 customize 하셔야 합니다.

이 필드들은 SITE_DIR/config/people/page-detail.ini file 에 configured 됩니다. 각 필드는 섹션별로 configured 됩니다. (섹션 이름은 unique 해야 합니다.) 섹션의 순서는 detail view의 순서와 같습니다. 각 섹션안에는 어떻게 display 될지에 대해 설정할 수 있는 여러 value들을 넣을 수 있습니다.


  • label - (required) A text label for the field. Can include HTML tags.
  • attributes - (required) Array of fields to put in the contents (should map the the field names in your backend system)
  • format - (optional) A string for vsprintf to format the attributes. Only needed if more than one attribute is provided.
  • type - (optional) One of “email” or “phone”. Used to format and generate links.
  • module - (optional) Creates a link to a another module and uses that module’s linkForValue method to format the result. See the section on Module Interaction for more details.
  • section - (optional) If this field belongs to a section, the name of that section
  • parse - (optional) A function which will be run on the value before display. Generated with create_function. Gets the argument “$value” and returns the formatted output.


Configuring Display Options


아래 있는 옵션들은 people 모듈을 appearence 하는데 관련된 것들입니다.

  • BOOKMARKS_ENABLED - (optional) If set to true, a link to bookmarked entries will appear. Note that if you have not bookmarked any entries, this link will not appear until an entry is bookmarked. Defaults to true.
  • CONTACTS_SUBTITLE_NEWLINE - (optional) Set to true to display contacts subtitles on a new line. Defaults to false.
  • SEARCH_TIP - (optional) A string to be shown near the search bar providing a tip about searching. By default this string is empty, and not shown.


Configuring the Fixed Entries


이 모듈은 모듈 인덱스 페이지에서 directory entry들의 리스트를 보이게 할 수 있습니다. 그리고 SITE_DIR/config/people/contacts.ini를 수정함으로서 이 리스트의 content를 update 하실 수 있습니다. 각 entry는 섹션의 0-indexed 형식으로 숫자화 되서 다뤄집니다. 각 섹션은 4개의 value들이 있습니다. 이것들은 listItem template 과 매핑돼 있죠. 이것들은 URL 리스트를 표시하기 때문에 phone number 를 가지지 못합니다. 다만 어떤 URL 이라도 올 수 있습니다.


  • title - The Name of the entry as it’s shown to the user
  • subtitle - The subtitle, typically the phone number for phone entries.
  • url - The link it should point to, use tel:XXXXXXXX links for phone numbers
  • class - The CSS class of the item, such as phone, map, email


Creating groups of contacts

  • NOTE - Creation of contact groups is not supported in the admin console at this time.


만약에 여러 contacts 를 카테고리로 묶어야 한다면 여러분들은 그것을 group으로 묶어야 합니다. contact group들을 만드시려면 아래와 같이 하시면 됩니다.


  1. If it does not exist, create a file named SITE_DIR/config/people/contacts-groups.ini
  2. Add a section to contacts-groups.ini with a short name of your group. This should be a lowercase alpha numeric value without spaces or special characters
  3. This section should contain a “title” option that represents the title of the group. Optionally you can include a description value that will show at the top of the contacts list for the group
  4. Create a file named SITE_DIR/config/people/contacts-groupname.ini where groupname is the short name of the group you created in contacts-groups.ini. This file should be formatted like contacts.ini with each entry being a numerically indexed section
  5. To use this group, assign it to a entry in contacts.ini. Do not include a url, but rather add a value group with a value of the short name of the group. You can optionally add a title that will be used instead of the group title indicated in contacts-groups.ini


아래는 SITE_DIR/config/people/contacts-groups.ini의 예제입니다. 각 그룹은 섹션으로 표현되는데 그 안에는 title 이 있고 옵션으로 description 이 있습니다. 여러분이 원하는 만큼의 그룹을 만드실 수 있습니다.


[admissions]
title = "Admissions"


SITE_DIR/config/people/contacts-admissions.ini. 아래는 admissions group의 예제입니다. contacts.ini file과 같은 형식입니다.


[0]
title    = "Admissions Main Number"
subtitle = "(617-555-0001)"
url      = "tel:6175550001"
class    = "phone"

[1]
title    = "Admissions Hotline"
subtitle = "(617-555-0002)"
url      = "tel:6175550002"
class    = "phone"


SITE_DIR/config/people/contacts.ini. 그룹을 보이기 위해 group value가 있습니다. url value는 없습니다.


[0]
title    = "Static Entry 1"
subtitle = "(617-555-0001)"
url      = "tel:6175550001"
class    = "phone"

[1]
title    = "Admissions"
group    = "admissions"


반응형

Kurogo Tutorial 23 - Links Module -

2012. 10. 10. 03:43 | Posted by 솔웅


반응형



========= o ============ o ========== o ========== o ================


이 부분은 Tutorial 이 잘 못 되었네요.


Links 모듈 설명하다가 갑자기 People 모듈로 건너 뛰었습니다.

저 위에 이미지 다음 부터는 people 모듈 관련 내용입니다.


Kurogo 쪽에 얘기해야겠어요... ^^;

반응형

Kurogo Tutorial 22 - Content Module -

2012. 10. 10. 01:44 | Posted by 솔웅


반응형

Content Module


content module은 다른 소스로부터 자유롭게 content를 모으고 display 할 목적으로 만들어 졌습니다. Content Module은 다른 HTML site 나 RSS feed 로부터 display 된 곳으로부터 content를 모아서 display 할 수 있습니다. 또한 configuration file이나 administration module을 사용해서 static content configured 를 display 하도록 할 수 있습니다.

디폴트로 content 모듈은 리스트에 그 feed 를 display 합니다. 그리고 나서 유저가 feed를 선택하면 그 feed 의 content가 보여지게 되는 겁니다. 만약에 feed 가 1개만 있다면 리스트 대신 그 feed 가 보여집니다. 옵션으로 group화 할 수 있습니다.


Configuring Content Feeds


SITE_DIR/config/MODULE/feeds.ini file에 원하는 만큼의 feed 를 정의 하세요. 각 feed 는 section에 의해 표현됩니다. 그 섹션의 이름은 모듈의 page를 의미합니다. 이곳에는 configure 할 몇가지 property들이 있습니다.


  • TITLE - The title of the feed. This is shown in the list and in the navigation bar
  • CONTENT_TYPE - the type of content. Values include:
    • html - Static html text that is included in the CONTENT_HTML property
    • html_url - Fetch HTML content from the BASE_URL property.
    • rss - Fetch RSS content from the BASE_URL property. Will retrieve the content from the first item in the feed. Good for CMS’s that expose their content via RSS. Ensure that this feed contains the full content and not just a link



Creating Groups of Content


  • NOTE - Creation of content groups is not supported in the admin console at this time.

You can create groups of content in order to organize similar content into categories. Creating content groups involves the following steps:

유사한 콘텐트를 하나의 카테고리에 묶기 위해 콘텐트의 group을 만들 수 있습니다. 아래와 같이 group을 생성하시면 됩니다.

  1. SITE_DIR/config/MODULE/feedgroups.ini 파일을 생성한다.
  2. 그룹 이름을 feedgroups.ini 의 section 안에 넣는다. 스페이스나 특수문자가 없는 alpha numeric 소문자이어야 한다.
  3. 섹션에는 TITLE option이 있어야 한다. 이것은 그룹의 title을 나타낸다. 옵션으로 DESCRIPTION value를 넣을 수 있다. 이것은 그룹의 리스트 top에 보여질 내용이다.
  4.  SITE_DIR/config/MODULE/feeds-groupname.ini  파일을 만든다. groupname is the short name of the group you created in feedgroups.ini. This file should be formatted like feeds.ini with each entry being a uniquely indexed section.
  5. 이 그룹을 사용하기 위해 eeds.ini. 안에 entry를 할당한다. 그룹의 short name 값으로 GROUP 값을 넣는다. 옵션으로 TITLE을 넣을 수 있다. 이것은 eedgroups.ini 안에서 group title 대신에 쓰이게 된다.

feeds.ini file에는 groups와 content entry 들이 있을 겁니다. 이것들은 section의 순서대로 display 될 겁니다. 만약 1개의 그룹만이 있다면 그 그룹이 display 될 겁니다.

아래는 SITE_DIR/config/MODULE/feedgroups.ini 예제입니다. 각 그룹은 TITLE이 있는 section 입니다. 여러분이 원하는 만큼의 그룹을 만들 수 있습니다.


[applying]
TITLE = "Applying to Universitas"
DESCRIPTION = ""

[visiting]
TITLE = "Visiting"
DESCRIPTION = ""


SITE_DIR/config/MODULE/feeds-applying.ini.  아래는 applying group 예제입니다. feeds.ini file처럼 format 됐습니다.


[admissions]
TITLE = "Admissions"
SUBTITLE = ""
SHOW_TITLE = 0
CONTENT_TYPE = "html_url"
BASE_URL = "http://universitas.modolabs.com/admissions"
HTML_ID = "node-2"


SITE_DIR/config/MODULE/feeds.ini


[applying]
TITLE = "Applying to Universitas"
GROUP = "applying"

[visiting]
TITLE = "Visiting"
GROUP = "visiting"

[othercontent]
TITLE = "Other Content"
SUBTITLE = ""
SHOW_TITLE = 0
CONTENT_TYPE = "html_url"
BASE_URL = "http://www.example.com/othercontent"
HTML_ID = "html-id"


Options for HTML Content


HTML document에서 data를 추출하기 위해서는 몇가지 옵션이 추가로 있습니다. 대부분의 경우 HTML, HEAD 태그 같은 것들은 건너뛰고 header와 footer 들도 remove 할 겁니다. 그리고 그 HTML 문서의 일부분만 사용하길 원하겠죠. 어떤 content 를 포함 시킬것인지 결정하는 방법에는 두가지가 있습니다.

  • HTML_ID - Use this option to include only a single element (and its child elements) based on its HTML id attribute. This is the simplest, and most recommended option if it is available. The value for this option is case sensitive.
  • HTML_TAG - Use this to include all elements of a certain tag. For instance set it to “table” to include all table elements or “p” to include all paragraph elements. Do not include the surrounding brackets (<, >)


만약 이 옵션을 사용하지 않으면 body tag 전체가 추출될 겁니다.


반응형


반응형
Posted on . Written by


Corona에 몇가지 더 업데이트 된 사항이 적용됐습니다.


첫번째로 Tom 의 iOS 6 FAQ 를 권해드립니다. 애플의 iOS 6와 관련된 아주 많은 버그들이 소개돼 있습니다. 이러한 버그와 관련된 문제를 극복하기 위해 여러방면에서 노력하고 있고 여러분들이 활용할 수 있는 해결 방법들을 소개해 드리고 있습니다.


두번째로 NOOK HD 프로토타입으로 좀 더 많은 테스트를 할 수 있는 기회를 가졌습니다. NOOK team 으로부터 그 기회를 받았죠. NOOK 팀과 같이 해결해야할 많은 이슈들을 찾아냈습니다. 아마 이 문제들은 코로나 뿐만이 아니라 다른 앱에도 적용되는 문제들이 많이 있고 이를 NOOK team 이 해결하기 위해 계속 작업하고 있습니다.


  • The virtual keyboard causes a resize event, causing touches to be incorrectly offset.
  • Resuming an app sometimes shows a black screen if nothing is being animated. This happens rarely — only on specific situations (no animation occurring when app resumes from suspend) — and there’s a simple workaround that I mentioned at the bottom of Monday’s post.
  • The navigation bar half covers a fullscreen video player’s media controls.
  • The native activity indicator is not working


맵뷰에서 맵이 손가락을 따라 움직이지 않는 이슈를 찾아냈습니다. 이것이 NOOK의 문제인지 아니면 우리의 implementation 문제인지 아직 확실하지는 않습니다. (어쨋든 이 맵뷰는 다른 곳에서는 잘 작동합니다. 그리고 NOOK의 old 버전에서도 잘 작동하구요.)


그리고 WebView/WebPopup 이 JNI 와 충돌하는 것도 찾았구요. 이 이슈는 해결을 했구요. daily build 927 부터 적용이 될 겁니다.


우리는 이러한 버그들을 해결하기 위해 NOOK 팀과 계속 작업을 해 나가고 있습니다.


* * *


이 이슈들과 관련해서 이 블로그에 우리의 roadmap 과 어디까지 진행되고 있는지에 대해 공지해 드리겠습니다.


오늘 아침에 이러한 내용들과 또 CoronaGeek 관련된 내용들에 대해 얘기 했습니다. 아래 video를 보시면 그 내용을 보실 수 있습니다.



반응형

FAQ Wednesday: iOS 6 버그들

2012. 10. 9. 21:08 | Posted by 솔웅


반응형
Posted on . Written by


It’s Wednesday and time for another FAQ session. Here are some frequently asked questions (FAQ) about current iOS 6 bugs.

수요일의 FAQ 시간인데요. 오늘은 요즘 많이 질문되는 iOS 6 bug들과 관련한 내용을 다루겠습니다.


1. Why does GameCenter crash my app on iOS 6?


이전 FAQ에서 말씀 드렸듯이 이미 알려진 iOS 6 Apple bug 가 있습니다. landscape 모드인 앱에서 일어나는데요. GameCenter 의 로그인 화면이나 photo picker 가 나올 때 충돌하는 현상이 있습니다.

아이폰 디바이스의 이 두가지 네이티브 object들은 portrait mode 만 있거든요. landscape 앱에서 이 두 네이티브 object 들이 display 될 떄 crash 가 일어납니다. iPad 에서는 문제되지 않아요. 이미 애플 버그로 등록된 내용입니다.


2. I see a number of GameCenter work-arounds on StackOverflow.com. Why can’t you include those fixes in Corona?


인터넷이나 애플 개발자 포럼등에 있는 work-around를 저희들도 보고 있습니다. 그리고 그 해결책들을 찾기 위해 노력하구 있구요. GameCenter와 관련한 이슈에 대한 해결책과 이것을 어떻게 portrait 모드인 이 화면을 landscape인 앱에서 작동되게 하느냐 같은 문제들이 있죠.  그리고 GameCenter 에 대해 Portrait mode로 display 하도록 하면 그와 더불어서 UIViewController objects 들 즉 TextField, TextBox, webViews같은 Native objects 들도 GameCenter object 와 같이 Portrait, Landscape 모드에 맞춰서 돌아가는 문제도 있습니다.

그러면 Landscape 에 맞춰서 앱을 만들었는데 그 layout 이 이상하게 돌아가게 되겠죠.



지난 며칠간 저희들은 GameCenter 객체가 portrait 모드로 돌아가도록 하면서 다른 native object들은 돌아가지 않도록 하는 방법들을 연구했습니다. 애플에서 제공하는 API로는 이를 해결할 방법을 찾지 못했습니다. 애플 private API 로는 그것을 해결하는 방법을 찾았습니다만 애플은 이 private API를 사용하는 것을 금지하고 있습니다. 아마 그 방법을 사용하면 앱스토어에서 심사할 때 reject 될 겁니다. 그러니까 그 방법은 해결책이 될 수 없게 됐습니다.





3. How can I configure my app to work around the GameCenter iOS 6 bug?


만약 여러분의 앱이 Landscape mode에서만 운영이 된다면 그리고 GameCenter 나 Photo Picker 를 사용해야 된다면 build.setting를 portrait mode가 가능하도록 수정해 주시면 됩니다. 그러면 GameCenter와 Photo Picker 시 충돌이 일어나지 않습니다. 단지 Corona content 는 landscape mode 만 되도록 해야 앱을 사용할 수 있겠죠. 이 방법의 단점은 1) 여러분 앱이 landscapeRight 만 가능하게됩니다. 2) textFields, textBoxes, webView 같은 native object 들이 portrait 일 경우 돌아가게 됩니다.  GameCenter 는 rotate 되도록 하면서 다른 native object 들은 rotate 되지 않도록 하는 방법은 없습니다.


settings = {
orientation =
{
default = "landscapeRight",
content = "landscapeRight",
  supported = { "landscapeRight", "portrait" },
},
}



content = “landscapeRight” line을 잘 보세요. landscapeLeft 는 허용이 되지 않습니다. 코로나는 이 부분에 오직 한개의 orientation 만 세팅하기 때문입니다. 그리고 이렇게 하면 Corona content  는 landscapeRight 로 모두 고정이 되지만 supported 에서 landscapeRight와 portrait을 허용했기 때문에 native objects 들은 portrait 모드에서 돌아가게 됩니다. 



build 926 에서는 GameCenter event.type을 추가했습니다. 아마 이것을 활용해서 rotation 이슈를 콘트롤 하실 수 있을 겁니다. GameCenter의 initCallback 에 대해 event.type이 showSignIn 으로 잡히게 됩니다. 이 시점은 GameCenter의 로그인 화면이 막 나타나기 직전 입니다. 이 때 native object 들을 업애거나 hide 혹은 delay showing을 시키실 수 있습니다. 유저가 사인하고 난 이후에는 이 event.type이 없어집니다. 이렇게 되면  initCallback 은 evnet.type == "init" 이 됩니다. 유저가 이미 GameCenter에 로그인 된 상태라면 showSignIn 이벤트가 일어나지 않습니다. 곧바로 init event로 갈겁니다. 


그리고 orientation listener를 추가하는 것이 필요할 겁니다. 유저가 디바이스를 rotate 시켰는데도 native 객체들이 그대로 있을 수 있으니까요. 디바이스가 로테이트 되면 이것을 catch 해서 해당 native objects 들을 hide 시키는 방법도 있겠죠.


local function initCallback( event )
    -- "showSignIn" is only available on iOS 6+
    if event.type == "showSignIn" then
        print( "showSignIn event found" )
-- This is an opportunity to pause your game or do other things you might need to do while the Game Center Sign-In controller is up.
-- For the iOS 6.0 landscape orientation bug, this is an opportunity to remove native objects so they won't rotate.
-- This is type "init" for all versions of Game Center.

     elseif event.data then
print( "init event found" )
loggedIntoGC = true
gameNetwork.request( "loadScores", { leaderboard={ category=leaderBoards[currentBoard], playerScope="Global", timeScope="AllTime", range={1,3} }, listener=requestCallback } )
    else
-- User canceled sign-in
end

end

 

이 방법들이 이상적인 혹은 근본적인 해결책은 아닙니다. 가장 근본적인 방법은 애플이 이 버그를 해결하는 것이죠. 저희들이 버그 리포트를 했지만 여러분들도 애플에 버그 리포트를 해 주시면 좀 더 빨리 해결 될 수 있을 겁니다.



4. My app doesn’t use GameCenter but does use PhotoPicker and it crashes too. What can be done about that?


위에서와 같이 build.settings을 수정하면 GameCenter와 PhotoPicker 모두에서 동작합니다. (몇가지 제한사항도 마찬가지구요) 물론 sign-in listener event.type은 GameCenter에만 해당이 되는겁니다. 이 문제를 근본적으로 해결하려면 애플에 버그리포트를 하고 그런 버그 리포트가 많이 쌓이게되면 애플에서 우선순위를 두어서 수정을 할 겁니다. 애플에 버그 리포트를 해 주세요.



5. Why does my iOS 6 app crash when I use network.request?


애플은 iOS6에서 network delegate에 대한 약간의 변화를 주었습니다. 그런데 아주 짧은 시간에 많은 network.request가 일어날 경우 iOS 6 앱이 충돌하는 현상이 발생하고 있습니다. 저희들은 그 해결 방법을 찾았구요 다음 Daily Build 에 반영할 예정입니다. (build 926 이후부터) 맥 시뮬레이터에서도 비슷한 이슈가 있었는데요. 이것도 build 926 부터 수정이 될 겁니다.


6. Why can’t I see my print message in the Xcode Console?


몇주 전에 이와 관련해서 알려드렸었는데요. iOS 6 애플에서 애플리케이션에 있는 메세지를 capture 하는 방법이 그 이전과 다르게 진행됩니다. 그래서 print 메세지가 Xcode Console 로 가는 부분이 제대로 작동이 되지 않고 있습니다. (Xcode 에 연결된 디바이스) 이와 관련된 좋은 소식은요 해결방법을 찾았다는 거구요 Daily Build 925 버전부터는 제대로 작동하게 됐습니다.



여기까지가 오늘의 질문과 답변들입니다.



반응형


반응형

Construction of the window by the PHP server


이전 글에서 다룬 예제에서 조금 더 나아가서 디스플레이 될 윈도우를 생성하는 소스를 가지고 있는 (같은 서버 내에서) PHP page로 링크럴 걸 경우에 대해 알아보겠습니다.


Index.html file that contains the first window


<!DOCTYPE html>

<html> 

<head> 

  <meta name=viewport content="user-scalable=no,width=device-width" />

  <link rel=stylesheet href=jquery.mobile/jquery.mobile.css />

  <script src=jquery.js></script>

  <script src=jquery.mobile/jquery.mobile.js></script>

</head> 


<body> 


<div data-role=page id=home>

  <div data-role=header>

    <h1>Home</h1>

  </div>


  <div data-role=content>

    <p> Window content 1 </p>

    <a href=action.php> Goto window 2 built with action.php </a>

  </div>

</div>


</body>

</html>



action.php file constructing the second window


<?
  $html = "";
  $html .= "<div data-role=page data-add-back-btn=true>";
  $html .=   "<div data-role=header>";
  $html .=     "<h1>Window 2</h1>";
  $html .=   "</div>";
  $html .=   "<div data-role=content>Window content 2</div>";
  $html .= "</div>";
  echo utf8_encode ($html);
?>


jQuery Mobile은 action.php file안에 include 된 두번째 윈도우를 retrieve 하기 위해 Ajax를 사용할 겁니다. 이를 위해 우리는 반드시 utf8_encode ()를 사용해야 합니다.


만약 server 코드가 여러개의 윈도우를 return 한다면 오직 첫번째 윈도우만 윈도우들의 stream 안에 놓여지게 될 겁니다.


action2.php


convention14.html



Link to another HTML page located on another server


링크를 같은 서버가 아니라 다른 서버로 즉 href attribute 가 external URL이 되는 경우도 있습니다. 이 경우는 full URL 을 사용하겠죠. (http://로 시작하는). 이 경우에는 이전의 페이지 대신에 새로운 페이지가 display 될 겁니다. (jQuery Mobile 의 windows flow 와 맞지 않게 됩니다.)


Link to http://amazon.com


<!DOCTYPE html>

<html> 

<head> 

  <meta name=viewport content="user-scalable=no,width=device-width" />

  <link rel=stylesheet href=jquery.mobile/jquery.mobile.css />

  <script src=jquery.js></script>

  <script src=jquery.mobile/jquery.mobile.js></script>

</head> 


<body> 


<div data-role=page id=home>

  <div data-role=header>

    <h1>Home</h1>

  </div>


  <div data-role=content>

    <p> Window content 1 </p>

    <a href=http://amazon.com> Goto Amazon </a>

  </div>

</div>


</body>

</html>




convention15.html



이 링크를 클릭하면 Amazon.com page가 open 될 겁니다.





Disable the loading of an HTML page with Ajax



디폴트로 href attribute의 value는 jQuery Mobile이 만드는 Ajax call 에서는 같은 서버의 HTML page를 가리킵니다. 이렇게 해서 어플리케이션 윈도우의 flow 안에서 HTML 페이지들을 표시하게 되고 그래서 두번째 페이지에 있는 Back button을 누르면 다시 첫번째 페이지로 돌아갈 수 있게 됩니다.



It is possible, indicating certain attributes in the link, to change this behavior.

이 behavior를 변경하기 위해 링크의 특정 attribute들을 수정 할 수 있습니다.


  • data-ajax="false"로 하면  Ajax call 을 만들지 않습니다. 새로운 HTML 페이지는 이전의 페이지들을 모두 lost 하게 되죠.
  • rel="external"data-ajax="false" 와 비슷합니다.

  • target="a_value"라고하면 새로운 브라우저를 엽니다.


이런 메카니즘을 이용하는것은 아주 드믑니다. 왜냐하면 여러 페이지들을 Ajax 에 의해서 한 HTML page 처럼 사용하는 디폴트 방법이 훨씬 유용하기 때문입니다.


Dialog windows


여기서는 다른 HTML 페이지에서 layered window 가 정의 될 수 있다는 걸 보여 드리겠습니다.


Index.html file containing the first window


<!DOCTYPE html>

<html> 

<head> 

  <meta name=viewport content="user-scalable=no,width=device-width" />

  <link rel=stylesheet href=jquery.mobile/jquery.mobile.css />

  <script src=jquery.js></script>

  <script src=jquery.mobile/jquery.mobile.js></script>

</head> 


<body> 


<div data-role=page id=home>

  <div data-role=header>

    <h1>Home</h1>

  </div>


  <div data-role=content>

    <p> Window content 1 </p>

    <a href=index2.html data-rel=dialog data-transition=pop> 

      Goto window 2 located in an another HTML page </a>

  </div>

</div>


</body>

</html>



Index2.html file containing the second window


<!DOCTYPE html>

<html> 

<head> 

  <meta http-equiv=Content-Type content=text/html;charset=iso-8859-1 />

  <link rel=stylesheet href=jquery.mobile/jquery.mobile.css />

  <script src=jquery.js></script>

  <script src=jquery.mobile/jquery.mobile.js></script>

</head> 


<body> 


<div data-role=page id=win2>

  <div data-role=header>

    <h1>Window 2</h1>

  </div>


  <div data-role=content>

    <p> Window content 2</p>

  </div>

</div>


</body>

</html>



이 dialog window는 첫번째 윈도우에서 링크를 클릭하면 열립니다.





convention161.html


convention162.html


반응형

큰 바위 얼굴을 찾아서....

2012. 10. 9. 04:31 | Posted by 솔웅


반응형

그동안 개발해오던 모바일 앱이 지지난 주 on production 했거든.


토요일에 나와서 근무했었는데 그 대신 지난주 금요일에 쉬었어.

마침 단풍 시즌이라 단풍으로 유명하다는 뉴 햄프셔의 White Mountains 으로 가기로 했어.


White Mountains 에서 제일 높은 산인 Mt. Washington 에는 세계에서 제일 오래된 산악 관광 열차(cog railways)가 있다고 해서 그걸 타러 갔지.


목표는 거기였지만 내 가슴을 더 설레게 만들었던건...

Mt. Washington 근처에 있는 큰바위 얼굴이야.


어렸을 때 교과서에 나온 짧은 소설인데 그거 읽고 많이 감동 받았지...


그 소설의 제목은 영어로 "The Great Carbuncle" 이라고 하던데 작가는 주홍글씨를 썼던 Nathaniel Hawthorne 이었지 아마...


실제 그 바위의 이름은 Old man of the mountain 이야.


아쉽게도 그 큰바위 얼굴은 2003년도에 무너졌어.





알고는 있었지만 꼭 그 바위가 있어야만 되는건 아니야.

어린 내게 큰 감동과 꿈을 주었던 그 곳에 갈 수 있다는게 설레는 일이지...



지금은 무너져서 그때의 얼굴 형체는 사라졌지만....


한번도 보지도 못했던 그 큰 바위를 상상하면서 뭔가 다짐도 해보고 감동도 받아보고 미래도 그려보게 했던 나의 어린 시절하고 더 가까와 지고 싶어...


그래서 가고 싶었어...




지금은 산 밑에 저런 조형물을 세워서 잘 각도를 맞춰 보면 그 때의 큰 바위 얼굴을 볼 수 있도록 해 놨어....


그날 만났던 한 백인 아줌마는 1990년대에 왔을 때는 그 얼굴이 그대로 있었다고 말하면서 아쉬워 하더라구.


거기 갔더니 이 큰바위 얼굴을 기리는 시 한편이 있더라구.


Daniel Webster

Men hang out their signs
indicative of their respective trades.
Shoemakers hang out a gigantic shoe;
Jewelers, a monster watch;
even the dentist hangs out a gold tooth;

but up in the Franconia Mountains
God Almighty
has hung out a sign to show that in New England,
He makes men.




이제 다시 어렸을 때 처럼 큰 꿈을 꿀 수 있을 것 같애...

반응형