[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
www.undertowsoftware.com • View topic - Sample code is not running
Page 1 of 1

Sample code is not running

PostPosted: Mon Jan 23, 2012 1:38 pm
by LarryWilton
I don't know if I am doing something wrong, but I don't recall this problem. I installed the mappro80 on my new system (win7) using VS-2010 (C#). Everything appeared to go as expected, no errors, or anything. I opened the sample project and tried to run it, but I got an error that some interface is not registered, or such (don't recall the exact wording). I don't remember having this problem with my first install. I checked this forum and the company we site, their documentation, etc. and can't find any info. Can someone here help?

Re: Sample code is not running

PostPosted: Mon Jan 23, 2012 2:26 pm
by FletcherJ
Larry,

I was having the same problem. Was it on the following lines from the designer code on or about line 1182?:
((System.ComponentModel.ISupportInitialize)(this.axGPSPro1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.axMapPro1)).EndInit();

In the code I had, there were more than one axGPSPro1 (axGPSPro2, etc.) references. I found and deleted all the additional references.

The other major change I made was to change the compilation from 64 bit to 32 bit. Given that this is a new computer, you might check to see if you switched to a 64 bit OS.

Now the code runs. Unfortuantely, now I can't get the sample code to show anything useful. It shows a rough layout of my area, but can't get it to show streets, cities, counties, etc.

My next step is to reload the sample code and just try changing the compile settings.

Of course, if this is the problem, we still need a solution as many of our customers might be running 64 bit systems.

Take care,

me

Re: Sample code is not running

PostPosted: Mon Jan 23, 2012 3:20 pm
by UShadow
Hmm, I used it with VS-2010 (and C#), but I don't recall having similar issues. That was a while ago, so I am not sure any longer (age does that to you <smile>). When I get home later today, I will try installing it on my Win7 machine (that has vs-2010) and will let you know if I also have problems. Maybe I did have similar issues and just forgot about it :-)

Will let you know.

One questions, FletcherJ, how did you end up with multiple references to the GPSpro unit? Also, I don't think you can produce a 64 bit app, since this is a 32-bit control, but that DOESN'T mean that your 32 app would not run on your users 64-bit system. Over 75% of the apps on my 64-bit Win7 computer are 32-bit programs :-)

Anyway, I'll keep an eye out to see if I get the same error (or similar) around the same line number.

Will post here to let you know.

Re: Sample code is not running

PostPosted: Tue Jan 24, 2012 1:45 am
by UShadow
Happy to report that everything worked just fine.

I installed the mappro80 on a clean system running Win7. Then I started VS-2010, opened a new project, added the control to my toolbox, then opened the sample code, it was automatically converted to VS-2010 and then run it. Like a charm, no problems at all!

Re: Sample code is not running

PostPosted: Tue Jan 24, 2012 9:37 am
by Gyrotech
UShadow wrote:added the control to my toolbox

Did you mean you added the "controls"? Because it probably shouldn't have worked unless you added bot the MapPro80 and the gpsPro controls to your toolbox, since the sample code uses both.

But the general steps you describe, appear to be correct and agree with what *I* did and it all worked fine.

Re: Sample code is not running

PostPosted: Tue Jan 24, 2012 12:35 pm
by IanRoth
Then it appears that that's what I was doing wrong. I didn't add anything to the toolbox. I just started VS and loaded the sample code. Why would I need to add them to the toolbox? I thought the installation process already registered everything (it even asked me for codes, etc.), so I figured that's all I had to do.

How do I remedy the problem, now? Or, can I?

Re: Sample code is not running

PostPosted: Tue Jan 24, 2012 9:17 pm
by mAlagi
FletcherJ wrote:Larry,

I was having the same problem. Was it on the following lines from the designer code on or about line 1182?:
((System.ComponentModel.ISupportInitialize)(this.axGPSPro1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.axMapPro1)).EndInit();

In the code I had, there were more than one axGPSPro1 (axGPSPro2, etc.) references. I found and deleted all the additional references.

Hmm, where did you find these lines? In which file? I can't find any instance of similar lines in any of the files that came with the sample code.

Re: Sample code is not running

PostPosted: Thu Jan 26, 2012 2:19 pm
by FletcherJ
mAlagi,

When I open the Form1.Designer.cs that is in the sample code on the CD and go to line 1180, I find the lines. Maybe they have a different version that they ship on the CD...

Take care,

me

Re: Sample code is not running

PostPosted: Thu Jan 26, 2012 7:45 pm
by mAlagi
FletcherJ wrote:When I open the Form1.Designer.cs that is in the sample code on the CD and go to line 1180, I find the lines. Maybe they have a different version that they ship on the CD...

Ahh, I see. Yeah, I saw those lines, as well, but I am not sure that they are causing the problems you are describing.

Re: Sample code is not running

PostPosted: Fri Jan 27, 2012 9:15 pm
by ROstmeyer
mAlagi wrote:
FletcherJ wrote:When I open the Form1.Designer.cs that is in the sample code on the CD and go to line 1180, I find the lines. Maybe they have a different version that they ship on the CD...

Ahh, I see. Yeah, I saw those lines, as well, but I am not sure that they are causing the problems you are describing.

They are not. The second line is probably an oversight, you can just delete it, without any ill effects.

Re: Sample code is not running

PostPosted: Mon Jan 30, 2012 6:45 pm
by FletcherJ
mAlagi,

Actually, I think the problem was resolved by my setting the compiler to generate 32 bit code, not 64 bit. That actually fixed many of the problems I was having.

Thanks,

me

Re: Sample code is not running

PostPosted: Mon Jan 30, 2012 9:38 pm
by ROstmeyer
FletcherJ,

you may be right about the 64/32-bit issue, but based on the messages you posted, it sounds as if most of the problems you encountered were caused by not having properly configured the OCX in your development environment, e.g., not having instantiated the control, not having set the Datasource, the data paths, etc.

BTW, did you determine if you can create a 64-bit application using the OCX? I thought I had seen somewhere that you could, but I can't be sure.

I have to say though, that your posts have pointed out that the documentation provided by undertow may not be sufficiently detailed to get the user started. I think that if a lot of us email them and complain, it may convince them to enhance their documentation.

What type of application are you using the OCX for?

Re: Sample code is not running

PostPosted: Mon Jan 30, 2012 11:09 pm
by UShadow
ROstmeyer wrote:I have to say though, that your posts have pointed out that the documentation provided by undertow may not be sufficiently detailed to get the user started. I think that if a lot of us email them and complain, it may convince them to enhance their documentation.

That may be true, but as I said in a different thread, I think that the section "Installing and Using the Control" in their manual has all the information one would need to get started. Have you looked at it?

What is the information that you needed to get started and was not there?

Re: Sample code is not running

PostPosted: Tue Jan 31, 2012 9:12 am
by mAlagi
UShadow wrote:That may be true, but as I said in a different thread, I think that the section "Installing and Using the Control" in their manual has all the information one would need to get started. Have you looked at it?

Well, I don't know about ROstmeyer, but I have to confess that I din't really look at the book all that carefully. That's not how I learn things. I learn by hands-on, i.e., trying to do things, rather than by reading a book. I think most programmers function that way. Taking another look at the section you mentioned, it does appear to have most of the basic information one would need to get started.

But, other than the first few sections of the book, the rest of it is "reference" material, that I would go to when needing to know *how* a function worked. It's not something one can read through. What's probably needed is a reference document on "what function to use for what you are trying to do".

Re: Sample code is not running

PostPosted: Tue Jan 31, 2012 1:48 pm
by FletcherJ
UShadow,


UShadow wrote:
ROstmeyer wrote:I have to say though, that your posts have pointed out that the documentation provided by undertow may not be sufficiently detailed to get the user started. I think that if a lot of us email them and complain, it may convince them to enhance their documentation.

That may be true, but as I said in a different thread, I think that the section "Installing and Using the Control" in their manual has all the information one would need to get started. Have you looked at it?

What is the information that you needed to get started and was not there?


I actually did go through that section as it is about the only usefull documentation in the book for people new to the control. The problem is that it does not address any issues related to development environments nor the sample code that comes with the control. And, in my case, many of the problems dissappeared when I changed VS 2010 to only generate 32 bit code.

Now why do I say that the rest of the manual is useless? Good question. It is simply a listing of the various methods and functions. This is good if I know what method or function I need. But how do I know which one to use when? Say I want to put on an overlay that shows the local little league areas so that people know which league they can enroll their kids. Simple, right? Not if you look at the book. I would have to read through all the various calls, figure out if it can help or not and, if not, jump to the next.

Another issue. I found the method I needed (with some help from a friend who said - oh yeah, just look at page 191.) Ok, after some work and help here (when I converted their VB to C#, I didn't realize I needed a ref keyword in the method call), I got it working. Cool. So now I look at the data I have to draw the polygon and guess what? It's in a whole number format:
...
<latitude>37230576</latitude>
<longitude>-121806830</longitude>
...
But the examples are using decimal notation for the points. And there is no reference in the docs about what to do when I get values in that format. So now it's back to either posting here or going through the list of methods and seeing if any of them can help (very time consuming...)

I can go on, but I think you get the idea.

me

Re: Sample code is not running

PostPosted: Tue Jan 31, 2012 3:28 pm
by Gyrotech
FletcherJ wrote:Another issue. I found the method I needed (with some help from a friend who said - oh yeah, just look at page 191.) Ok, after some work and help here (when I converted their VB to C#, I didn't realize I needed a ref keyword in the method call), I got it working. Cool. So now I look at the data I have to draw the polygon and guess what? It's in a whole number format:
...
<latitude>37230576</latitude>
<longitude>-121806830</longitude>
...
But the examples are using decimal notation for the points. And there is no reference in the docs about what to do when I get values in that format. So now it's back to either posting here or going through the list of methods and seeing if any of them can help (very time consuming...)


Sorry to say this, but if you need help converting some Lat/Lon values you got from "somewhere" to decimal values, I think you'll have a lot of trouble using this control, and many other controls... It's called division :-(

Re: Sample code is not running

PostPosted: Tue Jan 31, 2012 5:09 pm
by IanRoth
Gyrotech wrote:Sorry to say this, but if you need help converting some Lat/Lon values you got from "somewhere" to decimal values, I think you'll have a lot of trouble using this control, and many other controls... It's called division

Get off your high horse, Gyrotech. I guess we are not all as smart as you are. What an attitude!

Re: Sample code is not running

PostPosted: Tue Jan 31, 2012 9:49 pm
by Gyrotech
IanRoth wrote:
Gyrotech wrote:Sorry to say this, but if you need help converting some Lat/Lon values you got from "somewhere" to decimal values, I think you'll have a lot of trouble using this control, and many other controls... It's called division

Get off your high horse, Gyrotech. I guess we are not all as smart as you are. What an attitude!

I am not on a high horse! Read my response carefully. The conversion that the OP was looking for was a division by 1,000,000. I don't think that a special function is needed for that. So, I stand by what I said, although I guess I could have worded it more carefully to avoid hurting people's feelings. And, I don;t think I'm smarter than anyone else in here. To the contrary, I know I am not so I make sure I read whatever information is available and try to understand what I am doing. If I were as smart as everyone else, I wouldn't have to do that ;-)

Sorry if I offended you. Honestly, that was not my intent.

Re: Sample code is not running

PostPosted: Wed Feb 01, 2012 9:11 am
by mAlagi
Guys, guys... no need to argue. Sure, what the other poster was asking for, might have been something very simple, but I think he was trying to point out the fact that better, or additional documentation would go a long way towards eliminating the problems and frustration of new users. I don't think anyone can argue with that (about this or ANY other product).

It's not a matter of who is smarter, or not. It's a matter of style. Some people like to do it all without ever looking at any documentation. They like the challenge of figuring out themselves. Others, prefer to be able to go to a specific page and be shown how to do it, and others yet, like a combination of the two.

I actually long for the old days, where a product like this would come with 3-4 different books, a reference manual, a getting started manual, etc. I think undertow would do a great service to its customers by doing something similar. They have a great product and if they made it easier to understand and use, they'd actually be a real contender.

Re: Sample code is not running

PostPosted: Wed Feb 01, 2012 7:51 pm
by FletcherJ
Gyrotech wrote:
FletcherJ wrote:Another issue. I found the method I needed (with some help from a friend who said - oh yeah, just look at page 191.) Ok, after some work and help here (when I converted their VB to C#, I didn't realize I needed a ref keyword in the method call), I got it working. Cool. So now I look at the data I have to draw the polygon and guess what? It's in a whole number format:
...
<latitude>37230576</latitude>
<longitude>-121806830</longitude>
...
But the examples are using decimal notation for the points. And there is no reference in the docs about what to do when I get values in that format. So now it's back to either posting here or going through the list of methods and seeing if any of them can help (very time consuming...)


Sorry to say this, but if you need help converting some Lat/Lon values you got from "somewhere" to decimal values, I think you'll have a lot of trouble using this control, and many other controls... It's called division :-(


Gyrotech,

You are quite right. Once it was pointed out to me that all I needed to do was divide, I was quite happy. In another system I had to use (for a very limited time) I had to convert from degrees/minutes to decimal values. When I saw a very large integer, I thought I would have to again break out the individual parts. Since the book doesn't explain and I am new to all this, I had to ask.

Thanks,
me