multiple loops?

Feb 15, 2011 at 4:33 PM

Hi, i am trying to make a gui in my OS and i have the main class (VGA.cs) and another class (dialog.cs) that displays a window on the screen.

I got it working, but im stuck trying to get mouse click to work with it :/

 

In VGA.cs I have a static uint that stores mouse x and mouse y upon click. I am trying to get to that in dialog.cs for a button on the window but I cant :@

I would need to use a loop to keep checking the mouse x and mouse y, but my problem is i can only use one loop at a time.

if i have the loop in dialog.cs to check for the mouse click X and Y, the mouse doesnt work!

 

can someone help me please?

thanks a ton! :)

Feb 20, 2011 at 5:48 PM

I had the same problem. Most people dont realize this but you cant compare a int to a uint so in your if statement (Like if (mouse.y > widow.top) Convert all your variables to a int like if ((int

)mouse.y > (int)widow.top)

Feb 24, 2011 at 3:37 PM

i recomend not using to many class files.....

just sayin

Coordinator
Feb 24, 2011 at 4:38 PM
Separation is generally a good thing. regarding the int to uint comparison: is fixed in tfs. was a bug in long/ulong support..


On Thu, Feb 24, 2011 at 4:37 PM, hack3rinc <notifications@codeplex.com> wrote:

From: hack3rinc

i recomend not using to many class files.....

just sayin

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Feb 25, 2011 at 3:47 PM

i agree seperation is a good thing its just dont make a class file for EVERY little thing or cosmos wont compile it.

i learned that the hard way (btw sorry for having my users spam the discusion form about that lol)

(ps if u dont remember the spam then look for around a page of discussions about an "editor error")

Coordinator
Feb 25, 2011 at 3:50 PM
there's no limitation to the number of classes that we know of. testcases appreciated..

please however make isolated tests, where (in this case) we can uncomment 3-4 lines of code which will show the issues..


On Fri, Feb 25, 2011 at 4:47 PM, hack3rinc <notifications@codeplex.com> wrote:

From: hack3rinc

i agree seperation is a good thing its just dont make a class file for EVERY little thing or cosmos wont compile it.

i learned that the hard way (btw sorry for having my users spam the discusion form about that lol)

(ps if u dont remember the spam then look for around a page of discussions about an "editor error")

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Feb 25, 2011 at 4:02 PM

i didnt mean classes. i ment codefiles, i used to have each class in its own codefile and i keep getting them mixed up lol.

Coordinator
Feb 25, 2011 at 4:05 PM
that's one of the best-practices we excercise with cosmos (and in general as well). we do it everywhere, except the debugstub..


On Fri, Feb 25, 2011 at 5:02 PM, hack3rinc <notifications@codeplex.com> wrote:

From: hack3rinc

i didnt mean classes. i ment codefiles, i used to have each class in its own codefile and i keep getting them mixed up lol.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Feb 25, 2011 at 4:07 PM

O.o really???

then how come when i get like 10+ codefiles it wont compile? (dont remember the error it would give me plus im at school right now so i cant compile it intending to give you the error right now)

Coordinator
Feb 25, 2011 at 4:10 PM
we dont even care about codefiles.... we compile il assemblies..



On Fri, Feb 25, 2011 at 5:07 PM, hack3rinc <notifications@codeplex.com> wrote:

From: hack3rinc

O.o really???

then how come when i get like 10+ codefiles it wont compile? (dont remember the error it would give me plus im at school right now so i cant compile it intending to give you the error right now)

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Feb 25, 2011 at 4:11 PM

ok now im confused again xD sorry