- WESTERN DIGITAL WD30EZRX-1TBP [3TB SATA600]
500GBの中身を丸ごとコピーした。
500GBの中身を丸ごとコピーした。
だいたいShooさんのPull Requestです。
DFL64はビルドがうまくいかなくて検証できず。
久しぶり。
import dfl; pragma(lib, "dfl.lib"); class MainForm : Form { private Button _button; private ListBox _listbox; private MainMenu _menu; this() { _button = new TestButton(); _button.text = "ok"; _button.parent = this; _button.location = Point(100, 100); _listbox = new ListBox(); _listbox.parent = this; _listbox.size = Size(60, 150); _listbox.items.add("foo"); _listbox.items.addRange(["hoge", "piyo"]); _listbox.click ~= (Control c, EventArgs ea) { msgBox(_listbox.selectedItem.toString()); }; _menu = new MainMenu(); MenuItem item = new MenuItem(); item.text = "File"; MenuItem subItem = new MenuItem(); subItem.text = "Open"; auto menuClickHandler = (MenuItem mi, EventArgs ea){ msgBox("open the door"); }; subItem.click ~= menuClickHandler; item.menuItems.add(subItem); _menu.menuItems.add(item); this.menu = _menu; } } class TestButton : Button { override void onClick(EventArgs ea) { // delegateでもoverrideでもおk msgBox("hi"); } } void main() { Application.run(new MainForm()); }
今週の新技術
import std.stdio; class A { void f() { writeln("f()") ;} void f(int) { writeln("f(int)"); } void f(T)(T a){ writeln("f(", typeid(T), ")"); } } void main() { A a = new A; a.f(); a.f(1); a.f("str"); }
f() f(int) f(immutable(char)[])