Couldn't register XXX with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”.


아무 이상도 없는데 디버그로 실행하다 보면 발생한다.
소스코드를 눈씼고 찾아봤고 다 뒤져봤는데 결국 못찾았다.
구굴링한 결과 리부팅이 직빵이라고 한다.

ps. 리부팅 하지 않아도 Xcode를 Command+Q로 종료하고 다시 실행하면 정상적으로 작동한다.

 
posted by 뚱2
간단 합니다. 주석처리할 영역을 선택하고 Command + / 해주시면 됩니다.
토글 버튼 입니다.

 
posted by 뚱2
참고 : .h .m 전환하는 단축키



Go Back : ctrl + command + ←              (이전 문서 이동)
Go Forward : ctrl + command + →          (다음 문서 이동)
Jump to Definition : ctrl + command + D ( command + 마우스 왼쪽 클릭과 같은 기능) 
posted by 뚱2

위 중에서 많이 사용하는 건

Step Over : F6    -> 현재 디버깅 라인을 한줄 한줄 내려간다.
Step Into   :  F7  -> Step Over와 같지만 함수(메소드, 메세지)를 만나면 해당 함수로 점프한다.
Step Out  : F8    -> 현재 함수를 빠져나온다 (메세지를 호출한 쪽으로 점프)

Continue : ctrl + command + Y  -> 다음 브레이킹포인트까지 이동
Add/Remove Breapoint at Current Line  : command + \  -> 브레이킹 포인트 토클 버튼
 
posted by 뚱2
출처 : http://stackoverflow.com/questions/5287600/build-app-with-xcode-4-it-always-show-some-error-about-png-image 



While reading /Users/jun/iPhone_Works/BeautyOfKorea/BeautyOfKorea/images/contentBG@2x.png pngcrush caught libpng error:
   Not a PNG file..

Could not find file: /Users/jun/Library/Developer/Xcode/DerivedData/BeautyOfKorea-bunrqwaogvcyjmcesrodvvpjjpus/Build/Products/Debug-iphoneos/BeautyOfKorea.app/contentBG@2x.png

책보고 예제좀 돌려보는데 이 알수 없는 에러는 뭔지 Not a PNG file ... 분명히 파일 있는데
결국 알아낸건 해당 PNG 파일에 문제가 있는 것이다.
조치 방법은 해당 PNG 파일을 이미지 편집툴(Photoshop이나 그와 유사한)로 열고 다시 새로운 이름으로 저장하고
다시 빌드하면 경고 없어진다. 정말 별것 아닌걸로 삽질 참 많이하게되네... 


posted by 뚱2
XCode 3에서는 "Frameworks" -> "Add" -> "Exsting Frameworks"에서 추가하면되었는데

XCode 4에서는 "프로젝트" -> "Build Phases" -> "Link Binary Width Libraries" -> "+" 버튼을 클릭하고 추가하면 된다.

이것때문에 한참 삽질했네 ㅡㅡ; 


1. 프로젝트 선택

2. Bulid Phases 선택

3. Link Binary With Libraries 에서 "+" 클릭 하고 추가
 
posted by 뚱2
출처 : http://msdn.microsoft.com/ko-kr/library/sa69he4t.aspx 

조금 늦었지만 Visual Studio 2010 기능도 알아볼겸 설치를 했습니다.

아무리 찾아보아도 기존의 Windows Mobile 개발환경이 안보여서 찾아보니 2010 부터는 지원을 안하네요.

MS의 행보로 어느정도 예상은 했지만 너무 일찍 지원 중단을 하는건 아닌지 결국 Visual Studio 2008과 2010 둘다

설치해서 사용해야 할 듯 싶습니다. 
posted by 뚱2

Visual Studio 에서는 Visual Assist X라는 Add-In 프로그램이 있습니다.

이 프로그램을 사용하면 .h .cpp 파일간의 이동을 ALT+O로 편하게 이동할 수 있습니다.

xcode에서도 지원하는게 없나 찾아봤더니 있네요 ^^;

Xcode4.XX : command+control+↑ 

ps. 참고로 클래스나 델리게이트 문서를 보고 싶다면 해당 클래스에 커서를 놓고 option+더블클릭하시면 됩니다.
     , 디버깅 단축키는 command+option+Y 입니다.

 
posted by 뚱2
package com.google.android.webviewdemo;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.webkit.JsResult;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;

/**
 * Demonstrates how to embed a WebView in your activity. Also demonstrates how
 * to have javascript in the WebView call into the activity, and how the activity 
 * can invoke javascript.
 * 
 * In this example, clicking on the android in the WebView will result in a call into
 * the activities code in {@link DemoJavaScriptInterface#clickOnAndroid()}. This code
 * will turn around and invoke javascript using the {@link WebView#loadUrl(String)}
 * method.
 * 
 * Obviously all of this could have been accomplished without calling into the activity
 * and then back into javascript, but this code is intended to show how to set up the 
 * code paths for this sort of communication.
 *
 */
public class WebViewDemo extends Activity {

    private static final String LOG_TAG = "WebViewDemo";

    private WebView mWebView;

    private Handler mHandler = new Handler();

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
        mWebView = (WebView) findViewById(R.id.webview);

        WebSettings webSettings = mWebView.getSettings();
        webSettings.setSavePassword(false);
        webSettings.setSaveFormData(false);
        webSettings.setJavaScriptEnabled(true);
        webSettings.setSupportZoom(false);

        mWebView.setWebChromeClient(new MyWebChromeClient());

        mWebView.addJavascriptInterface(new DemoJavaScriptInterface(), "demo");

        mWebView.loadUrl("file:///android_asset/demo.html");
    }

    final class DemoJavaScriptInterface {

        DemoJavaScriptInterface() {
        }

        /**
         * This is not called on the UI thread. Post a runnable to invoke
         * loadUrl on the UI thread.
         */
        public void clickOnAndroid() {
            mHandler.post(new Runnable() {
                public void run() {
                    mWebView.loadUrl("javascript:wave()");
                }
            });

        }
    }

    /**
     * Provides a hook for calling "alert" from javascript. Useful for
     * debugging your javascript.
     */
    final class MyWebChromeClient extends WebChromeClient {
        @Override
        public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
            Log.d(LOG_TAG, message);
            result.confirm();
            return true;
        }
    }
}



원본

'Mobile > Android' 카테고리의 다른 글

[Android] YUV420 Format  (0) 2013.08.26
[dex] Android Decompile  (0) 2013.05.10
[Json] 안드로이드 Json 처리  (0) 2012.06.15
[Android] 테트리스  (0) 2010.12.06
posted by 뚱2

[Android] 테트리스

Mobile/Android 2010. 12. 6. 21:57


회사 교육으로 한달간 안드로이드 학원을 다니고 나서 
이번 주말에 테스트로 만들어본 테트리스 입니다.
레벨업 안되고 다음판 안되고 그냥 시작 종료만 되는 미완성의 테트리스
내부는 Bitmap과 커스텀뷰를 이용해서 일일이 다 그리고 칠한 노가다의 결과 ^^;

ps. 테트리스 알고리즘은 저도 예전에 봤던 책에서 참고 했습니다.

'Mobile > Android' 카테고리의 다른 글

[Android] YUV420 Format  (0) 2013.08.26
[dex] Android Decompile  (0) 2013.05.10
[Json] 안드로이드 Json 처리  (0) 2012.06.15
WebView.addJavascriptInterface 활용  (0) 2010.12.11
posted by 뚱2
원본 : http://support.microsoft.com/default.aspx?scid=kb;en-us;891667

  1. Click Start, click Run, type sysdm.cpl, and then click OK.
  2. In the System Properties dialog box, click the Advanced tab.
  3. Under Start and Recovery, click Settings.
  4. In the Startup and Recovery dialog box, click Edit.
  5. Disable PAE mode by removing the /pae option if it exists.
  6. If you are using Windows XP SP2, remove the /noexecute option if it exists, and then add the /execute option.
  7. On the File menu, click Save.
  8. To exit Notepad, click Exit on the File menu.
  9. To close System Properties, click OK two times.
  10. Restart your computer.
posted by 뚱2

Windows 2008 Server Standard + Visual Studio 2005 에서 Window Mobile 5.0로 크로스 컴파일 하는데
계속 해서 위와 같은 메세지 Warring이 뜨네요...
너무 신경쓰여서 구글링 한 결과 무시하면 된다고 합니다.
그렇지만 굳이 신경쓰이는 걸 안보이게 하려면

"프로젝트 --> 속성 --> 구성 속성 --> C/C++ --> 코드 생성 --> 버퍼 보안 검사 "에서 "예"를 "아니오"로
해주심 Warring 메세지가 없어집니다.

posted by 뚱2

오늘 제대로 삽질 한번 했습니다.

WinCE+EVC 로 어플리케이션을 개발하고 있습니다.

클라이언트 요구사항이 숫자필드는 오른쪽 정렬을 원하더군요

숫자 보여주는 컨트롤을 CEdit를 서브글래싱해서 사용하고 있었습니다.

그런데 아무리 해도 오른쪽 정렬이 안되는 것입니다.

리소스뷰에서 설정해도 안되고

서브클래싱한 PreSubclassWindos에서도 안되고..

그래서 결국 구글링한 결과 WinCE에서는 Singleline으로 하면은

왼쪽 정렬만 먹고

오른쪽 정렬, 가운데 정렬을 할려면 Multiline으로 해야한다고 하네요 ㅠㅠ

Win32에서는 모든 속성이 정상적으로 먹습니다.

MS가 오늘 제대로 삽질하게 만들었네요...


http://www.codeguru.com/forum/showthread.php?p=186903
posted by 뚱2

이번에 하는  PDA 프로젝트에서는 특이하게 다이알로그 기반으로하여
메인 다이알로그에 여러가지 다이알로그를 차일드로 동적 생성하여
화면을 교체(SW_HIDE, SW_SHOW)하면서 MDI같은 효과를 주었습니다.

이럴경우 화면이 바뀔때 마다 셋팅해 주어야 하는 경우 어디에서
해야 할찌 난감하더군요~~~
이리 저리 찾아보니 WM_SHOWWINDOW 메세지가 있어서 열심히 코딩
하고 테스트 해보니 메세지가 안먹습니다. ㅠㅠ
이러 저리 해보다가 정 안돼서 Spy++로 메세지를 살펴보니 이런~~~~
메세지가 안날라오는 이런 X떡같은 일이.....
그래서 할 수 없이 다른 메세지 WM_WINDOWPOSCHANGED라는 메세지를
잡았더니 잘~~~~~ 되네요....
이거 초보는 정말 매일 매일 삽질을 합니다.
posted by 뚱2