[C#/Mono/Gtk-Sharp] fatalt fel?

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

[C#/Mono/Gtk-Sharp] fatalt fel?

första problemet löst...

andra: kolla sista posten...

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Bromma
Registrerad
Aug 2008

Ser ut som du borde initiera GTK först?

Syftar på att de skriver om "IA__g_type_init()" i debuggen

Asus Striker II Extreme / XFX Geforce GTX 280 / Q9450 @ 3.6GHz/ TRUE Noctua 120/ 4x1GB Corsair TWIN3X2048-1333C9DHX / X25-M G2 80gb Velociraptor / Win 7 Ultimate x64/ Antec P190

MovieDatabase

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

ok nu är det mesta på plats..
nu skall jag bara komma på hur man får den att uppdatera tiden... -_-... några idéer?

using System; using Gtk; using GLib; //behöver jag dig? namespace GTKtest { //das program public class Program { public static void Main(String[] args) { Application.Init(); MainWindow wind = new MainWindow("Stuff"); wind.ShowAll(); Application.Run(); } } //window class MainWindow : Window { public MainWindow(string title) : base(title) { this.SetDefaultSize(250, 100); this.DeleteEvent += new DeleteEventHandler(MainWindow_delete); Label lbTitle = new Label("The Epoch time is now:"); Label lbTime = new Label(); lbTime.Text = timeToEpoch.toEpoch().ToString(); VBox boxxer1 = new VBox(); boxxer1.Add(lbTitle); boxxer1.Add(lbTime); this.Add(boxxer1); } void MainWindow_delete(object sender, DeleteEventArgs args) { Application.Quit(); args.RetVal = true; } } class timeToEpoch { public static int toEpoch() { int eTime; TimeSpan t = (DateTime.UtcNow - new DateTime(1970,1,1)); eTime = (int) t.TotalSeconds; return(eTime); } } }

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Bromma
Registrerad
Aug 2008

I vanligt c# hade du gjort en timer med 1000 ms.
Vet ej om det går att använda vanliga timers i Gtk, sök på system.timers.timer

Asus Striker II Extreme / XFX Geforce GTX 280 / Q9450 @ 3.6GHz/ TRUE Noctua 120/ 4x1GB Corsair TWIN3X2048-1333C9DHX / X25-M G2 80gb Velociraptor / Win 7 Ultimate x64/ Antec P190

MovieDatabase

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

mjo, men hur ritar jag om?

jag la till en knapp som jag tänkt att använda för att rita om tiden, och en eventhandeler

{ //stuff// btnTick.Clicked += entTimeRedraw; //tryck på knappen för att rita om entTime //mer skit// } void entTimeRedraw(object sender, EventArgs e) { //vet inte... }

(språkmässigt är det ingen sklinad, oberoende på vilden CLI man använder...)

[edit]
om du vill testa på hur mono är: http://www.go-mono.com/mono-downloads/download.html
gtk-sharp finns även till .Net

[edit2]
monodevelop RC till windows: http://monodevelop.com/Download/Windows_Preview

[edit3.....]
ett litet roligt demo som visar vad man kan göra med mono: http://www.mono-project.com/CsharpRepl

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Borlänge
Registrerad
Jul 2001

Är det inte bara att sätta värdet på textfältet igen? Så är det i vanliga .net, där behöver du inte explicit ropa på RePaint()

lbTime.Text = timeToEpoch.toEpoch().ToString();

"May God stand between you and harm in all the empty places you must walk"

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

trodde det, men jag kommer inte åt entTime från entTimeRedraw-metoden..

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Borlänge
Registrerad
Jul 2001

jaha, antar att du menar lbTime... Du måste lyfta ut deklarationen av den variablen till en klassvariabel... såhär:

namespace GTKtest { //das program public class Program { public static void Main(String[] args) { Application.Init(); MainWindow wind = new MainWindow("Stuff"); wind.ShowAll(); Application.Run(); } } //window class MainWindow : Window { private Label lbTime; public MainWindow(string title) : base(title) { this.SetDefaultSize(250, 100); this.DeleteEvent += new DeleteEventHandler(MainWindow_delete); Label lbTitle = new Label("The Epoch time is now:"); lbTime = new Label(); lbTime.Text = timeToEpoch.toEpoch().ToString(); VBox boxxer1 = new VBox();

Då kommer du sen åt den i entTimeRedraw

"May God stand between you and harm in all the empty places you must walk"

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

tack. det fungerad...

men nu har jag ett annat problem, hur skall jag göra för att få tiden att uppdatera automatiskt?
att skapa en ticker metod, men jag vet inte hur en sådan skall se tu...

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Borlänge
Registrerad
Jul 2001

Som kurre var inne på, timers. Läs på lite på msdn

http://msdn.microsoft.com/en-us/library/system.timers.timer.a...

"May God stand between you and harm in all the empty places you must walk"

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

så här set i alla fall exemplet på mono documentation ut:

using System; using System.Timers; public class TimerExample { private static System.Timers.Timer ourTimer; public static void Main() { ourTimer = new System.Timers.Timer(); // attach to the Elapsed event. ourTimer.Elapsed += new ElapsedEventHandler(OnTimerElapsed); // make our timer interval 1 second ourTimer.Interval = 1000; // don't forget to enable the timer! // we could also call ourTimer.Start() here; they both have the same effect // (starting the timer). ourTimer.Enabled = true; Console.WriteLine("Waiting 10 seconds before exit..."); System.Threading.Thread.Sleep(10000); } private static void OnTimerElapsed(object sender, ElapsedEventArgs e) { Console.WriteLine("Timer elapsed at: " + e.SignalTime.ToLongTimeString()); } }

och min kod:

using System; using System.Timers; using Gtk; using GLib; namespace GTKtest { //das program public class Program { public static void Main(String[] args) { Application.Init(); MainWindow wind = new MainWindow("Stuff"); wind.ShowAll(); Application.Run(); } } //window class MainWindow : Window { private Entry entTime; public MainWindow(string title) : base(title) { this.SetDefaultSize(250, 100); this.DeleteEvent += new DeleteEventHandler(MainWindow_delete); Label lbTitle = new Label("The Epoch time is now:"); entTime = new Entry(); // Button btnTick = new Button("tick"); // btnTick.Clicked += entTimeRedraw; //tryck på knappen för att rita om entTime entTime.Text = timeToEpoch.toEpoch().ToString(); System.Timers.Timer tiimeer = new System.Timers.Timer(); tiimeer.Interval = 666; tiimeer.Enabled = true; tiimeer.Elapsed += ElapsedEventHandler(entTimeRedraw); // <------ här är det fel?!?! <------ VBox boxxer1 = new VBox(); HBox boxxer2 = new HBox(); boxxer2.Add(entTime); //boxxer2.Add(btnTick); boxxer1.Add(lbTitle); boxxer1.Add(boxxer2); this.Add(boxxer1); } private static void entTimeRedraw(object sender, ElapsedEventArgs e) { entTime.Text = timeToEpoch.toEpoch().ToString(); } void MainWindow_delete(object sender, DeleteEventArgs args) { Application.Quit(); args.RetVal = true; } } // stuff.... and p0|2|\| class timeToEpoch { public static int toEpoch() { int eTime; TimeSpan t = (DateTime.UtcNow - new DateTime(1970,1,1)); eTime = (int) t.TotalSeconds; return(eTime); } } }

det felmedeandet som jag får är:

[Task:File=/home/username/mono-projects/GTK test/GTK test/Main.cs, Line=55, Column=44, Type=Error, Priority=Normal, Description=Expression denotes a `type', where a `variable', `value' or `method group' was expected(CS0119)]

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Bromma
Registrerad
Aug 2008

du har inte med "new"

Asus Striker II Extreme / XFX Geforce GTX 280 / Q9450 @ 3.6GHz/ TRUE Noctua 120/ 4x1GB Corsair TWIN3X2048-1333C9DHX / X25-M G2 80gb Velociraptor / Win 7 Ultimate x64/ Antec P190

MovieDatabase

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

*head desk*
*head desk*
*head bleed*

0_o ... nu vill programmet kompilera... det körs i några sekunder.... och så dör det ned fel kod:

mono: ../../src/xcb_io.c:242: process_responses: Försäkran "(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)" falsk. Stacktrace: at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x0004d> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> at Gtk.Application.Run () <0x0000b> at GTKtest.Program.Main (string[]) [0x00016] in /home/gego/mono-projects/GTK test/GTK test/Main.cs:21 at (wrapper runtime-invoke) GTKtest.Program.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff> Native stacktrace: /usr/bin/mono [0x429e65] /lib/libpthread.so.0 [0x7fcfb8dfd080] /lib/libc.so.6(gsignal+0x35) [0x7fcfb8829fb5] /lib/libc.so.6(abort+0x183) [0x7fcfb882bbc3] /lib/libc.so.6(__assert_fail+0xe9) [0x7fcfb8822f09] /usr/lib/libX11.so.6 [0x7fcfb54b8a9b] /usr/lib/libX11.so.6(_XEventsQueued+0x35) [0x7fcfb54b9345] /usr/lib/libX11.so.6(XPending+0x5d) [0x7fcfb54a1e4d] /usr/lib/libgdk-x11-2.0.so.0 [0x7fcfb68287b5] /usr/lib/libglib-2.0.so.0(g_main_context_check+0x2c2) [0x7fcfb9452ed2] /usr/lib/libglib-2.0.so.0 [0x7fcfb94537c9] /usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1cd) [0x7fcfb9453dad] /usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xa7) [0x7fcfb6bb1bc7] [0x4200700d] Debug info from gdb: (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 0x7fcfb9ad1730 (LWP 9231)] [New Thread 0x7fcfad8ac950 (LWP 9238)] [New Thread 0x7fcfadaad950 (LWP 9237)] [New Thread 0x7fcfaedea950 (LWP 9236)] [New Thread 0x7fcfb75ce950 (LWP 9235)] [New Thread 0x7fcfb9ada950 (LWP 9234)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) 0x00007fcfb8dfbedb in read () from /lib/libpthread.so.0 6 Thread 0x7fcfb9ada950 (LWP 9234) 0x00007fcfb8dfc7e1 in nanosleep () from /lib/libpthread.so.0 5 Thread 0x7fcfb75ce950 (LWP 9235) 0x00007fcfb8df92e9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 4 Thread 0x7fcfaedea950 (LWP 9236) 0x00007fcfb8df956d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 3 Thread 0x7fcfadaad950 (LWP 9237) 0x00007fcfb88d5742 in select () from /lib/libc.so.6 2 Thread 0x7fcfad8ac950 (LWP 9238) 0x00007fcfb88d3496 in poll () from /lib/libc.so.6 1 Thread 0x7fcfb9ad1730 (LWP 9231) 0x00007fcfb8dfbedb in read () from /lib/libpthread.so.0 Thread 6 (Thread 0x7fcfb9ada950 (LWP 9234)): #0 0x00007fcfb8dfc7e1 in nanosleep () from /lib/libpthread.so.0 #1 0x0000000000503be2 in ?? () #2 0x00007fcfb8df53ba in start_thread () from /lib/libpthread.so.0 #3 0x00007fcfb88dcfcd in clone () from /lib/libc.so.6 #4 0x0000000000000000 in ?? () Thread 5 (Thread 0x7fcfb75ce950 (LWP 9235)): #0 0x00007fcfb8df92e9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x0000000000506815 in ?? () #2 0x0000000000508f8f in ?? () #3 0x000000000052123d in ?? () #4 0x0000000000496d33 in ?? () #5 0x00000000004b52d3 in ?? () #6 0x000000000051d81b in ?? () #7 0x000000000053a1c2 in ?? () #8 0x00007fcfb8df53ba in start_thread () from /lib/libpthread.so.0 #9 0x00007fcfb88dcfcd in clone () from /lib/libc.so.6 #10 0x0000000000000000 in ?? () Thread 4 (Thread 0x7fcfaedea950 (LWP 9236)): #0 0x00007fcfb8df956d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x00000000005067f0 in ?? () #2 0x0000000000508f8f in ?? () #3 0x0000000000521128 in ?? () #4 0x00000000004b284b in ?? () #5 0x0000000042006dd8 in ?? () #6 0x0000000001998aa0 in ?? () #7 0x00007fcfb75d2398 in ?? () #8 0x00007fcfb825d0e0 in ?? () #9 0x00000000420068ac in ?? () #10 0x00007fcfaede9fc8 in ?? () #11 0x00007fcfaede9ef0 in ?? () #12 0x00007fcfaede9e40 in ?? () #13 0x00007fcfb9968000 in ?? () #14 0x0000000000000000 in ?? () Thread 3 (Thread 0x7fcfadaad950 (LWP 9237)): #0 0x00007fcfb88d5742 in select () from /lib/libc.so.6 #1 0x00007fcfb339e1ae in ?? () from /usr/lib/libxcb.so.1 #2 0x00007fcfb339f91a in xcb_wait_for_event () from /usr/lib/libxcb.so.1 #3 0x00007fcfb54b8688 in ?? () from /usr/lib/libX11.so.6 #4 0x00007fcfb54b8a3d in ?? () from /usr/lib/libX11.so.6 #5 0x00007fcfb54b92f9 in _XReadEvents () from /usr/lib/libX11.so.6 #6 0x00007fcfb5497c39 in XIfEvent () from /usr/lib/libX11.so.6 #7 0x00007fcfb6828414 in gdk_x11_get_server_time () from /usr/lib/libgdk-x11-2.0.so.0 #8 0x00007fcfb6cd9ee9 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #9 0x00007fcfb6cdb20d in gtk_clipboard_clear () from /usr/lib/libgtk-x11-2.0.so.0 #10 0x00007fcfb6b43690 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #11 0x00007fcfb6b43b03 in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #12 0x00007fcfb39c527d in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #13 0x00007fcfb39dab1e in ?? () from /usr/lib/libgobject-2.0.so.0 #14 0x00007fcfb39dc432 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #15 0x00007fcfb39dc74c in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #16 0x00007fcfb6b3c7ec in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #17 0x00007fcfb6b41ccf in gtk_entry_set_text () from /usr/lib/libgtk-x11-2.0.so.0 #18 0x0000000042004c83 in ?? () #19 0x0000000001d82690 in ?? () #20 0x00007fcfadaacdc0 in ?? () #21 0x00007fcfadaacbd0 in ?? () #22 0x00007fcfb75da300 in ?? () #23 0x00007fcfb825d0e0 in ?? () #24 0x00007fcfadaacdc0 in ?? () #25 0x00007fcfadaacbf0 in ?? () #26 0x00007fcfb75da300 in ?? () #27 0x0000000001d8eba0 in ?? () #28 0x0000000001ac8010 in ?? () #29 0x00007fcfb75d0ae0 in ?? () #30 0x000000000000000b in ?? () #31 0x00007fcfb75d0de0 in ?? () #32 0x0000000042004c04 in ?? () #33 0x00007fcfb825d0e0 in ?? () #34 0x00007fcfb825d0e0 in ?? () #35 0x0000000001ac8010 in ?? () #36 0x00007fcfb75dcfc0 in ?? () #37 0x00007fcfadaacdc0 in ?? () #38 0x0000000042007a40 in ?? () #39 0x00007fcfb825d0e0 in ?? () #40 0x000000004a7eabf1 in ?? () #41 0x00007fcfb75dcfc0 in ?? () #42 0x0000000041920799 in ?? () #43 0x00007fcfadaacdc0 in ?? () #44 0x0000000042007904 in ?? () #45 0x0000000001b67790 in ?? () #46 0x00000000005fd770 in ?? () #47 0x0000000000000001 in ?? () #48 0x0000000001b67790 in ?? () #49 0x0000000000000000 in ?? () Thread 2 (Thread 0x7fcfad8ac950 (LWP 9238)): #0 0x00007fcfb88d3496 in poll () from /lib/libc.so.6 #1 0x00007fcfb945377f in ?? () from /usr/lib/libglib-2.0.so.0 #2 0x00007fcfb9453dad in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #3 0x00007fcfafe30b00 in ?? () from /usr/lib/libORBit-2.so.0 #4 0x00007fcfb9479ae4 in ?? () from /usr/lib/libglib-2.0.so.0 #5 0x00007fcfb8df53ba in start_thread () from /lib/libpthread.so.0 #6 0x00007fcfb88dcfcd in clone () from /lib/libc.so.6 #7 0x0000000000000000 in ?? () Thread 1 (Thread 0x7fcfb9ad1730 (LWP 9231)): #0 0x00007fcfb8dfbedb in read () from /lib/libpthread.so.0 #1 0x0000000000429f6c in ?? () #2 <signal handler called> #3 0x00007fcfb8829fb5 in raise () from /lib/libc.so.6 #4 0x00007fcfb882bbc3 in abort () from /lib/libc.so.6 #5 0x00007fcfb8822f09 in __assert_fail () from /lib/libc.so.6 #6 0x00007fcfb54b8a9b in ?? () from /usr/lib/libX11.so.6 #7 0x00007fcfb54b9345 in _XEventsQueued () from /usr/lib/libX11.so.6 #8 0x00007fcfb54a1e4d in XPending () from /usr/lib/libX11.so.6 #9 0x00007fcfb68287b5 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #10 0x00007fcfb9452ed2 in g_main_context_check () from /usr/lib/libglib-2.0.so.0 #11 0x00007fcfb94537c9 in ?? () from /usr/lib/libglib-2.0.so.0 #12 0x00007fcfb9453dad in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #13 0x00007fcfb6bb1bc7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #14 0x000000004200700d in ?? () #15 0x00000000018e14c0 in ?? () #16 0x0000000000000001 in ?? () #17 0x00000000000000f0 in ?? () #18 0x00000000018e14c0 in ?? () #19 0x0000000000000000 in ?? () #0 0x00007fcfb8dfbedb in read () from /lib/libpthread.so.0 ================================================================= Got a SIGABRT while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. =================================================================

gör jag det med knappen istället så fungerar det...
så.... det måste vara något med timer funktion....??

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Bromma
Registrerad
Aug 2008

borde du inte skriva typ boxxer2.Items[0].Text?

Asus Striker II Extreme / XFX Geforce GTX 280 / Q9450 @ 3.6GHz/ TRUE Noctua 120/ 4x1GB Corsair TWIN3X2048-1333C9DHX / X25-M G2 80gb Velociraptor / Win 7 Ultimate x64/ Antec P190

MovieDatabase

Trädvy Permalänk
Medlem
Plats
Borlänge
Registrerad
Jul 2001

prova att sätta eventet innan du säter tiimeer.Enabled = true;

"May God stand between you and harm in all the empty places you must walk"

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

om jag nu bara hade vetat vad du menade med att "sätta eventet innan"...

kan någon förklara det hade jag varit glad...

//många tack i förhand.

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Registrerad
Jul 2001

Kan metoden ens vara static?

Jag sover bäst under bord

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

I sådana här tillfällen önskar jag att jag kommer håg mina programmerings lektioner.
försig, så var det java, men jaja...

Terminologi är inte min starka sida, logik är mer min sak...

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Borlänge
Registrerad
Jul 2001

prova att ändra:
tiimeer.Enabled = true;
tiimeer.Elapsed += ElapsedEventHandler(entTimeRedraw); // <------ här är det fel?!?! <------

till:
tiimeer.Elapsed += ElapsedEventHandler(entTimeRedraw); // <------ här är det fel?!?! <------
tiimeer.Enabled = true;

sånt där kan ställa till det ibland...

"May God stand between you and harm in all the empty places you must walk"

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

det har jag testat...
no change.

ok nu fungerar det, när jag ta till tiimeer.Start();

men ibland charschar det om jag trycker för att stänga ner fönstret...

Citat:

Ursprungligen inskrivet av raw
Kan metoden ens vara static?

i dont know...

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix

Trädvy Permalänk
Medlem
Plats
Borlänge
Registrerad
Jul 2001

hmm, det kan vara så att du inte får uppdatera komponenter som ligger i "GUI-tråden" med en annan tråd än "huvud-tråden". Har dessvärre inget lösningsförslag på det då jag aldrig jobbat med GTK. Kolla monos forum eller nått sånt...

"May God stand between you and harm in all the empty places you must walk"

Trädvy Permalänk
Medlem
Plats
Tibro[ ] Strömstad [X]
Registrerad
Mar 2004

hittade problemet -_- .....
var så att man kunde inte ha en
entTime.Text = timeToEpoch.toEpoch().ToString();
samtidigt som man uppdaterade tiden... -_-

[edit]
0_o...
nu chrachar den om jag dubbel klickar i Entry rutan ?!?!?

@gegoxaren på identi.ca
min personliga Blag ^_^
#python #cSharp #php #sqlite #freetard #loonix