Lum7671's Weblog

Cocoa, 디버그 log를 NSLog 대신 만들어 사용하기.

Posted in Mac, Programming by lum7671 on 2008/07/25

형식있는 로그를 만들기 위해서 다음과 같이 해봤다.

* common.h
...
#define __FILENAME__ (strrchr(__FILE__,'/')+1)
#define NMLog(msg) NSLog(@"%s(%d) - %@", __FILENAME__, __LINE__, msg)
...

* AppController.m

import "commin.h"
...
NMLog(@"XXX");

* NMSession.m

import "commin.h"
...
NMLog( (@"sendPacket : %@", aPacket) );

주의 : NMLog는 인자를 1개 받기 때문에 “()”를 사용해서 @”sendPacket : %@”, aPacket 를 쌌다. 안싸면 arg가 2개라고 NMLog를 찾을 수 없다는 에러를 낸다.

* 출력결과
...
2008-07-25 18:51:14.629 NateOn[2683] AppController.m(966) - XXX
2008-07-25 18:51:15.237 NateOn[2683] NMSession.m(653) -
...

참고 사이트 :
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=777

Tagged with: , , , ,

LightSMS 바로 띄우기

Posted in Firefox by lum7671 on 2008/05/09
다음을 참조해서 바로 가기 단축 아이콘을 만든다.
바탕화면과 같은곳에 만들어 두면 FF를 따로 띄우지 않고 바로 LightSMS를 사용할 수 있다.
“C:\Program Files\Mozilla Firefox 3 Beta 3\firefox.exe” -chrome chrome://lightsms/content/main.xul

1. 바로가기 만들기 화면

2. “대상”에 잘 적혔는지 확인

3. LightSMS를 띄운 화면

[참고]
* FF 띄우지 않고 lightsms만 띄울 수 있는 바로가기?

Powered by ScribeFire.

Zemanta Pixie