Wednesday, September 24, 2008

.NET FormのDrag and Drop

.NETのフォームアプリケーションで,ただ単にFormのプロパティでAllowDropを許可しても,イベント発生時に呼び出される関数の引数,DragEventArgsのエフェクトの値がDragDropEffects::Noneのままでは,DragDropがコールされない。 DragDropEffects 列挙体に記述されているように, DragEnter()がcallされた時に,エフェクトの値をNone以外の値に変更しておく。 例えばファイルがDrag and Dropされた場合はこんな手順。
  1. フォーム上に到達したときに,DragEnter()がcallされる。
  2. DragEnter()内ででDragEventArgsのエフェクトの値をAllに変更する
  3. この状態でドロップした際にDragDrop()がcallされるので,適当な処理をする。

Saturday, August 09, 2008

Building emacs-current by VC8

Now I am trying to build emacs-current by VC8. 1. invoke vcvars32.bat to set environment for VC8
C:\archives\devel\src\emacs\nt>"c:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"

C:\archives\devel\src\emacs\nt>"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
2. install GifLib, Jpeg, LibPng, Tiff, Xpm and Zlib from GnuWin32 project When you intall LibPng, you need to modify zconf.h as following:
#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
since we don't have unistd.h. Also you need to install simx.h from xpm source archives though I don't see the reason. 3. invoke configure.bat as following:
 > configure --prefix c:\emacs-current --with-msvc
4. In making process, resouce compiler complains for icons\emacs.ico.
C:\archives\devel\src\emacs\nt>rc -Foobj-spd/i386/emacs.res emacs.rc
emacs.rc(1) : error RC2176 : old DIB in icons\emacs.ico; pass it through SDKPAINT
This discussion deals with the root cause. So I edit icons\emacs.ico as uncompressed options by IrfanView. But now I am facing on the following missing:
Essential Lisp files seem to be missing. You should either
do 'make bootstrap' or create 'lisp/abbrev.elc' somehow

Wednesday, August 06, 2008

Mercurial using memo

Mercurialではじめる分散構成管理 第1回 「分散」への第一歩〜ローカルでの複製参照。 Visual Studio 2005で開発している際,SimpleWin32.cpp を追加した。
$ hg status
M SimpleWin32.ncb
M SimpleWin32.suo
M SimpleWin32/SimpleWin32.vcproj
? SimpleWin32/SimpleWin32.cpp
? SimpleWin32/Windows Mobile 6 Professional SDK (ARMV4I)/Debug/BuildLog.htm
? SimpleWin32/Windows Mobile 6 Professional SDK (ARMV4I)/Debug/vc80.pdb
SimpleWin32/SimpleWin32.cppをレポジトリに追加。
$ hg add SimpleWin32/SimpleWin32.cpp 

Sunday, July 27, 2008

Mercurial

redmineは,SCMと統合して運用できる。そのSCMとして,CVSやSVNだけでなく,GitやMercurial,BazzarそしてDarcsが利用できるが,どのように連携させればいいのかよくわからないので,試しに新しいプロジェクトを作成して確認した。

新しいプロジェクトを作成すると,どのようなSCMと統合できるか指定する箇所がある。 そこで,添付の画像の通りSCMを指定する箇所があるので,そこでMercurialを指定して該当するレポジトリの場所を指定すればいい。

redmine試し中

http://abekatsu.air-nifty.com/diary/2008/06/redmine_a996.htmlより転載。

redmine試し中。doc/INSTALLを読みながら,DB SQLite3で動かす設定を行う。

訳するほど暇じゃないんで,Noteだけ。3.のconfig/database.xmlはこんな感じ。

  
production:
  adapter: sqlite3
  dbfile: db/producion.db
  

本格運用するならば,5.のpermissionの設定。redmineを動かすための専用ユーザを作っておくのが吉。

で,データベースの構築。

  
hayate% rake db:migrate RAILS_ENV="production"            [~/src/redmine-0.7.2]
(in /usr/home/abekatsu/src/redmine-0.7.2)
== 1 Setup: migrating =========================================================
-- create_table("attachments", {:force=>true})
   -> 0.0210s
(snip)
== 92 ChangeChangesFromRevisionToString: migrated (0.0685s) ===================

hayate%                                                   [~/src/redmine-0.7.2]
  

起動。

  
hayate% ruby script/server -e production                  [~/src/redmine-0.7.2]
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
  

わからないところ(たぶんRailsで解決するんだろうな)。なんで,IPv4ソケットしか開かないのだろう。

で,こんな風にアクセスできる。
Ws000001

この後のToDo。

  • Mercurialとの連携。
  • Apacheとの連携。
  • SMTPサーバどうしよう。
  • SQLite3からMySQL or PostgreSQL への移行。
  • 宍道湖との連携。