[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

Sample code is not running

A forum made available for users of the MapPro OCX SDK to exchange ideas, ask each other questions, etc.

Sample code is not running

Postby LarryWilton » Mon Jan 23, 2012 1:38 pm

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?
User avatar
LarryWilton
Active User
Active User
 
Posts: 26
Joined: Thu Aug 25, 2011 9:23 am

Re: Sample code is not running

Postby FletcherJ » Mon Jan 23, 2012 2:26 pm

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
User avatar
FletcherJ
Active User
Active User
 
Posts: 36
Joined: Fri Jan 20, 2012 5:33 pm

Re: Sample code is not running

Postby UShadow » Mon Jan 23, 2012 3:20 pm

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.
Imagination is greater than detail - Albert Einstein
User avatar
UShadow
Frequent User
Frequent User
 
Posts: 61
Joined: Fri May 28, 2010 11:49 am

Re: Sample code is not running

Postby UShadow » Tue Jan 24, 2012 1:45 am

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!
Imagination is greater than detail - Albert Einstein
User avatar
UShadow
Frequent User
Frequent User
 
Posts: 61
Joined: Fri May 28, 2010 11:49 am

Re: Sample code is not running

Postby Gyrotech » Tue Jan 24, 2012 9:37 am

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.
User avatar
Gyrotech
Frequent User
Frequent User
 
Posts: 52
Joined: Mon May 03, 2010 11:23 pm

Re: Sample code is not running

Postby IanRoth » Tue Jan 24, 2012 12:35 pm

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?
User avatar
IanRoth
Active User
Active User
 
Posts: 49
Joined: Thu Feb 24, 2011 9:17 pm

Re: Sample code is not running

Postby mAlagi » Tue Jan 24, 2012 9:17 pm

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.
"640K ought to be enough for anybody." - Bill Gates, 1981
User avatar
mAlagi
Active User
Active User
 
Posts: 28
Joined: Fri Aug 12, 2011 11:09 am

Re: Sample code is not running

Postby FletcherJ » Thu Jan 26, 2012 2:19 pm

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
User avatar
FletcherJ
Active User
Active User
 
Posts: 36
Joined: Fri Jan 20, 2012 5:33 pm

Re: Sample code is not running

Postby mAlagi » Thu Jan 26, 2012 7:45 pm

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.
"640K ought to be enough for anybody." - Bill Gates, 1981
User avatar
mAlagi
Active User
Active User
 
Posts: 28
Joined: Fri Aug 12, 2011 11:09 am

Re: Sample code is not running

Postby ROstmeyer » Fri Jan 27, 2012 9:15 pm

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.
User avatar
ROstmeyer
Active User
Active User
 
Posts: 16
Joined: Thu Aug 18, 2011 11:26 am

Re: Sample code is not running

Postby FletcherJ » Mon Jan 30, 2012 6:45 pm

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
User avatar
FletcherJ
Active User
Active User
 
Posts: 36
Joined: Fri Jan 20, 2012 5:33 pm

Re: Sample code is not running

Postby ROstmeyer » Mon Jan 30, 2012 9:38 pm

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?
User avatar
ROstmeyer
Active User
Active User
 
Posts: 16
Joined: Thu Aug 18, 2011 11:26 am

Re: Sample code is not running

Postby UShadow » Mon Jan 30, 2012 11:09 pm

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?
Imagination is greater than detail - Albert Einstein
User avatar
UShadow
Frequent User
Frequent User
 
Posts: 61
Joined: Fri May 28, 2010 11:49 am

Re: Sample code is not running

Postby mAlagi » Tue Jan 31, 2012 9:12 am

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".
"640K ought to be enough for anybody." - Bill Gates, 1981
User avatar
mAlagi
Active User
Active User
 
Posts: 28
Joined: Fri Aug 12, 2011 11:09 am

Re: Sample code is not running

Postby FletcherJ » Tue Jan 31, 2012 1:48 pm

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
User avatar
FletcherJ
Active User
Active User
 
Posts: 36
Joined: Fri Jan 20, 2012 5:33 pm

Re: Sample code is not running

Postby Gyrotech » Tue Jan 31, 2012 3:28 pm

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 :-(
User avatar
Gyrotech
Frequent User
Frequent User
 
Posts: 52
Joined: Mon May 03, 2010 11:23 pm

Re: Sample code is not running

Postby IanRoth » Tue Jan 31, 2012 5:09 pm

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!
User avatar
IanRoth
Active User
Active User
 
Posts: 49
Joined: Thu Feb 24, 2011 9:17 pm

Re: Sample code is not running

Postby Gyrotech » Tue Jan 31, 2012 9:49 pm

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.
User avatar
Gyrotech
Frequent User
Frequent User
 
Posts: 52
Joined: Mon May 03, 2010 11:23 pm

Re: Sample code is not running

Postby mAlagi » Wed Feb 01, 2012 9:11 am

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.
"640K ought to be enough for anybody." - Bill Gates, 1981
User avatar
mAlagi
Active User
Active User
 
Posts: 28
Joined: Fri Aug 12, 2011 11:09 am

Re: Sample code is not running

Postby FletcherJ » Wed Feb 01, 2012 7:51 pm

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
User avatar
FletcherJ
Active User
Active User
 
Posts: 36
Joined: Fri Jan 20, 2012 5:33 pm


Return to MapPro OCX

Who is online

Users browsing this forum: No registered users and 1 guest

cron