User Profile

Collapse

Profile Sidebar

Collapse
rb0135
rb0135
Last Activity: Feb 19 '10, 11:24 PM
Joined: Jan 14 '10
Location: Sydney, Australia
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Redson,

    Thanks for trying to help, and it would be easy if your saw the code, but are you following that ALL the code, and where the error is occuring is in the MS SDK Sample Code.

    All I do is:

    Code:
    using Microsoft.WindowsMobile.Samples.Location;
    
    .....
    
    Gps mygps = new Gps();
    I then setup the handlers and open the GPS as per the MS example...
    See more | Go to post

    Leave a comment:


  • Ok.. spoke too soon..

    Tried it twice today and it failed the second time.

    Tried the MS sample and it fails (just takes longer).

    So, it isnt my code after all that (by the looks of it)...

    Any ideas to check?

    Thanks,
    Rob
    See more | Go to post

    Leave a comment:


  • Yep, your right... I still cant see why they would make that much a difference, but I am no expert on this.

    It seem to go OK with the test so far...I am not trusting it just yet until I have used the app a fair few more times, but so far, so good.

    Thanks,
    Rob
    See more | Go to post

    Leave a comment:


  • Ok, I think I might have found the issue, but as the error occurs randomly (usually within the first 5 minutes of operation), I have my fingers crossed as it has been running for a hour so far.

    I found another sample using the same code. The original code (which I thought was from the SDK example, wasnt), had one of the routines (gps_LocationCh anged) as public void. Thi other sample I found buried in the SDK folders had the same routine...
    See more | Go to post

    Leave a comment:


  • But, the DLL seems to be throwing the error in the routine when it is getting the information after the GPS event has fired. Would you say that is true (going by the error information provided)???

    The app doesnt need to do anything other than call the gps.Open command, so I cant understand why anything in the app could cause this issue.

    I will go over my stuff again.

    Thanks,
    Rob
    See more | Go to post

    Leave a comment:


  • Hi Redson,

    Thanks for the reply, but I have exactly the same code as per the example. It is very simple code as most of the work is done by the DLL. (I have double checked).

    I have also created a new simple app, with the code from the example and I get the same error. The app doesnt display the values as per the sample (thats the only difference). I just load up a variable with the information, then display it when I...
    See more | Go to post

    Leave a comment:


  • GPS Erroring when using the Windows Mobile 6 SDK

    Hi all (and Mark).

    As I have posted a few times the last few weeks about my GPS application, I have got to the point of adding the GPS stuff in. I am using the Windows Mobile 6 SDk and used the Microsoft.Windo wsMobile.Sample s.Location project code for my project.

    Now, the problem is I am getting an error, sometimes straight away (once the GPS is initialised) or during the use of it.

    I get an "unexpected "...
    See more | Go to post

  • I Got it... Amazing what a sleep does.

    In my code in the Static Class, for some reason I was thinking my Players was an array of players, when in fact, this was the single class after a player is selected elsewhere in the program.

    So, I removed the array references, and everything just clicked in.

    Code:
    namespace GolfCaddy 
    { 
        public static class MPlayers 
        {
    ...
    See more | Go to post

    Leave a comment:


  • Actually, I quickly tried it, but failed.

    The code
    Code:
    namespace GolfCaddy
    {
        public static class MPlayers
        {
            private Players[] player;
    
            public Players[] MyPlayer
            {
                get { return player; }
                set { player = value; }
            }
    
        }
    }
    I get a compiler error on the private...
    See more | Go to post

    Leave a comment:


  • Thanks for the tip.

    I think I did something similar with the CLUBS class within the Players class (but not static).

    Will give it a go soon. Probably post back tomorrow.

    Thanks,
    Rob
    See more | Go to post

    Leave a comment:


  • Thanks Mark

    The good thing in my case, is that the first form setups the Players info. The form I need access the info on, only needs to READ it (and there are no other forms that need this info) but the first form DOESNT call the second form where I need the data... it is the form after which is called by the second form. This may sound strange, but the steps are Select Player and that form shows the players stats/info, then select...
    See more | Go to post

    Leave a comment:


  • Accessing Class once intialized from another form

    I have one form that initializes a class, called Players.

    But, I need to access these initialized values in another form.

    Obiously, if I do Players player = new Players(); it creates a new instance of the Players class, but has all variables set to defaults, not the previous values when the first form was run.

    I have tried just Players player; the compile compiles OK, but then I get an NULL REFERENCE error when...
    See more | Go to post

  • rb0135
    replied to Should I use a STRUCT?
    Hi again,

    I have been playing around a bit and found (hopefully) the code structure needed. I have set my green class up and it has worked perfect so far..

    Thanks,
    Rob
    See more | Go to post

    Leave a comment:


  • rb0135
    replied to Should I use a STRUCT?
    Mark,

    Just wanted to check something. First of all, I load each hole as I go from xml files, so I am thinking of only have one "HOLE" object.

    You say:

    So are you suggesting something like:

    Code:
    namespace xyz
    {
        public class Course
        {
             object[] hole = new object[5];
    
             hole[0] = ....;
            etc.. etc..
    ...
    See more | Go to post

    Leave a comment:


  • rb0135
    replied to Should I use a STRUCT?
    I just have to get out of the VB mindset and think OOP again..

    I was hacking the C# just to get a proof of concept as to whether my idea was going to work or not and more importantly, interfacing the GPS (which ended up the easiest). Now, it has got to a point that yes, this will work and then I realised, even though the app is mine, I should do it "properly" and to do so, the structure of my variables was like VB.. just...
    See more | Go to post

    Leave a comment:


  • rb0135
    replied to Should I use a STRUCT?
    Thanks for the reply.

    I used to do a lot of OOP back in the days of Pascal, and C++, but switched to VB for ease of getting the job done. I prefer to use OOP but I've lost most of the talent there. I have done small C# programs, but nothing complicated.

    This isnt business critical, just a fun project, mainly to create a complicated C# program for my own and a friends use.

    I like your idea and appreciate...
    See more | Go to post

    Leave a comment:


  • rb0135
    started a topic Should I use a STRUCT?

    Should I use a STRUCT?

    Hi,

    Creating an app for a C# windows mobile device for my golfing.

    I normally use VB.NET and it seems easier working with global vars, etc. but I prefer to switch to C#.

    Anyway, I need to "group" about 10-15 vars (mixture of double, int and string) for the hole I am playing.

    Shoud I use a struct and group these vars? I need to access them globally and at the moment the few vars...
    See more | Go to post

  • Thanks for the advice.

    I only have three controls.

    BUT

    I wanted to do this right, and by refreshing the label only does produce the same results are refreshing the whole form...

    That is: getting it to display.

    Thanks again,
    Robert
    See more | Go to post

    Leave a comment:


  • Thanks for the help.

    When I first read your response, i was going to reply that I am not even seeing the form and was wondering why the refresh would work.

    However, I went and tried the code, but I mistyped and put

    this.refresh();

    rather than refreshing the label.

    Well, this.refresh(); worked for the form and seems to show it, and, when I am updating the label, it works a...
    See more | Go to post

    Leave a comment:


  • Form Load and showing form while it is loading

    Hi,

    I am writing a C# mobile 6 (dot.net 3.5) application.

    On the form, I have a label. I update this label with text as my initalizing routines are running (from the form load event), such as initializing the database, setting variables, setting up the GPS, etc.

    That is why I want the form to display first,so that when my routines (in the form load event) run, I want the label to update with text such...
    See more | Go to post
No activity results to display
Show More
Working...