blog vipa
mój dzień to 3 filiżanki kawy

blog vipa

You are Browsing the Maj 2009 Archive:

Gtk is NOT thread safe

Posted on 23 maja, 2009 by vip

Thanks. I’ve lost few days for searching bug. I didn’t know, that the signal sent from the Posix Thread and received by Gtk application isn’t executed in Gtk thread. If you wan’t to write software, and you’re sure, you want to write it in C#/Gtk# (if not, choose Qt) and you will use threads, read […]

Anonymous delegates in C#

Posted on 17 listopada, 2008 by vip

Beware of anonymous delegates in C#! You’ve to instanize new variable to have them in own delegate instances. If not, you’ll get the last value of variable in loop. Short snippet for Gtk#. It creates dynamic buttons and actions from DataTable (e.g. database). Pay attention to line // [1], when „variable capturing” is used. [csharp] […]

Cztery godziny z życia

Posted on 25 października, 2008 by vip

Uwielbiam coś pisać (tu: wywoływanie i przechwytywanie zdarzeń), i nagle, zupełnie przypadkiem, dostać wyjątkiem w twarz. A potem szukać, debugować, przez kilka godzin, żeby się na końcu okazało, że przecież wszystko jest napisane w dokumentacji! „Once a class has declared an event, it can treat that event just like a field of the indicated delegate […]

SQLite .Net + Xulrunner = MISUSE evil

Posted on 17 stycznia, 2008 by vip

If You’re developing Sqlite.NET application with Gecko# using Xulrunner libs, and got: Unhandled Exception: Mono.Data.Sqlite.SqliteException: Library used incorrectly library routine called out of sequence at Mono.Data.Sqlite.Sqlite3.Open (System.String strFilename) [0x00000] at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] or MISUSE (Library used incorrectly) errors, here’s the resolution…