kkuzil.own@gmail.com

Posted
Filed under Development/Delphi

  PEntry = ^TEntry;
  TEntry = packed record
    case Integer of
    0 : (Head: TEntryHead);
    1 : (Data: array [0..511] of AnsiChar);
  end;
이런 구조체가 있을때,
...
..

var
  e: TEntry;
begin
  ReadData(...., ...., @e);
end;

이 경우 포인터가 잘못 되었다는 메시지가 뜨면서 에러가 발생한다.
코드상.. 아무런 잘못도 없는거 같아서..
ReadData(...., ...., @e.Data[0]);

머 이렇게 해도 안되고..

그래도 계속 트라이 하는중에 알아냈다.

 TEntry = packed record

여기서 packed  빼 주니깐 된다는..

기본 바이트 정렬을 사용하지 않고 packed를 해주면
컴파일러가 내부 포인터를 어떻게 써야하는지 헷갈리나보다..

아무튼 다음에도 이런문제가 생기면 기억나도록 이렇게 기록함.
2012/07/31 16:00 2012/07/31 16:00
Posted
Filed under Development/Delphi

Delphi에서 JSON 을 사용하려고 예제를 찾아보고.. 나름 랩핑을 하려고 준비하는데..
내가 생각하는게 구현되어 있는 라이브러리를 발견했다;;;


RTTI 이용해서 클래스 데이터를 그대로 JOSN으로 내보내고 불러올 수 있는;;
암튼 앞으로의 개발에 많은 발전이 생길거 같다는!!!


이것도 써보고 내 입맛에.. 흐흐


JSON – SuperObject


Features:
- Fastest JSON parser for Delphi.
- XML to JSON parser.
- Easy to use.
- JSON Validator.
- JSON-RPC.
- Can write JSON format to be human readable.



http://www.progdigy.com/?page_id=6

svn 주소는 아래와 같다.

# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://superobject.googlecode.com/svn/trunk/ superobject-read-only
2012/07/02 22:48 2012/07/02 22:48
Posted
Filed under Development/Delphi

계속 brcc32.exe를 이용하여 파일을 리소스에 포함하여 생성하려는데
"VBuff allocation error" 이런 에러가 나면서 계속 실패했다.
재부팅을 해도 안되고.. 다른 파일들은 리소스로 생성이 잘되는데..

문제가 뭔고 하니.. 특정 Define을 주면서 (-d옵션)  특정 파일 용량이 올 경우 안되는 문제..


그냥 파일용량을 변경하니깐 잘되더라는..


정확한 문제는 모르고 이렇게 그냥 해결.


끝.
2012/06/21 17:00 2012/06/21 17:00
Posted
Filed under Development/Delphi

1. 우리나라 날짜 포맷
ShortDateFormat := 'YYYY-MM-DD';
DateSeparator   := '-';

2. 일본 날짜 포맷
ShortDateFormat := 'YYYY/MM/DD';
DateSeparator   := '/';


TimeSeparator := ':';
LongTimeFormat := 'hh:mm:ss';




function StrToDateTimeDef2(const S: string; const Default: TDateTime): TDateTime;
var
FormatSettings: TFormatSettings;
begin
FormatSettings.DateSeparator := '-';
FormatSettings.ShortDateFormat := 'yyyy-mm-dd';
FormatSettings.TimeSeparator := ':';
FormatSettings.LongTimeFormat := 'hh:mm:ss';

if not TryStrToDateTime(S, Result, FormatSettings) then
Result := Default;
end;
2012/05/21 11:17 2012/05/21 11:17
Posted
Filed under Development/Delphi
XE 이상 soft get 사이트에서 다운로드가 없어서 업데이트가 중단 된 줄 알았는데..
개발 사이트가 따로 존재했다...



Virtual Treeview is a Delphi treeview control built from ground up. Many years of development made it one of the most flexible and advanced tree controls available today. Virtual Treeview starts off with the claim to improve many aspects of existing solutions and introduces some new technologies and principles which were not available before.

Note: downloads are available from the project homepage at http://www.soft-gems.net


License: Google Code doesn't now support the display of multiple licenses. So only one is shown in the side bar. Virtual Treeview is published under a double license: MPL 1.1 and GPL 2.0.

http://code.google.com/p/virtual-treeview/



svn 주소는 아래와 같다.

# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://virtual-treeview.googlecode.com/svn/trunk/ virtual-treeview-read-only
2012/05/18 10:53 2012/05/18 10:53