Howdy folks. I have an OSX app that was written by a 3rd party for the company I work for and it has worked fine for a number of years. The app allows a user to view video content on a DVD and it lists out chapters and links to movies etc. It is driven by an XML file that describes the particular content for a given DVD title.
One of the things that this app does is it allows the user to fill out a survey online to provide feedback. They click a button in the UI of the app and it launches the default browser and takes them to the web survey.
Recently, we changed the way that the feedback survey is done and the URL for it has changed. In the past, the URL would look like this:
http://www.somesurveyprovider.com?ldp=5432dasa4321tt543121
And that worked fine with the application. This survey data was read by the app from the XML file setup like this:
<survey>http://www.somesurveyprovider.com?ldp=5432dasa4321tt543121</survey>
Now, with the change to the survey, the URL is more like this:
https://www.somesurveyprovider.com/se.ashx?s=7A596FE76ACA99E1&CourseID=48369&AuthorName=Some Dude&CourseName=Some Course Name
So I changed the XML generator to encode this like this:
<survey><![CDATA[https://www.somesurveyprovider.com/se.ashx?s=7A596FE76ACA99E1&CourseID=48369&AuthorName=Some Dude&CourseName=Some Course Name]]></survey>
Now, however, the user clicks the button and nothing happens. No error message - nothing.
Now, I should prefix this by saying that I am NOT and xCode developer. I am a .NET dev using C#. Regardless of that, my boss asked me to look at this and see if I can figure out why this fails (we also have a Windows version of the same app that uses the same XML file and it still works fine).
So, after getting xCode on a Mac here, loading up the application source into that, then going back and re-installing xCode to add the 10.4 support and then setting the GCC compiler to version 4.0, I am able to compile, run and test the app. So far, so good
Looking in the code, it would appear that this line is what executes the survey button push:
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:
[trainingMgr surveyAddress]]];
At first I suspected that the XML parsing might have had an issue with the CDATA section so I added this:
NSLog([trainingMgr surveyAddress]);
And the output it produced was this:
Running
(gdb) continue
Current language: auto; currently objective-c
2010-11-02 09:27:34.334 lynda.com player[3261:a0f] https://www.somesurveyprovider.com/se.ashx?s=7A596FE76ACA99E1&CourseID=48369&AuthorName=Some Dude&CourseName=Some Course Name
(gdb) continue
So based on that, I am assuming that it parsed the URL correctly.
Can anyone shed any light here on why this might fail with this URL but not with the previous one?
TIA!
One of the things that this app does is it allows the user to fill out a survey online to provide feedback. They click a button in the UI of the app and it launches the default browser and takes them to the web survey.
Recently, we changed the way that the feedback survey is done and the URL for it has changed. In the past, the URL would look like this:
http://www.somesurveyprovider.com?ldp=5432dasa4321tt543121
And that worked fine with the application. This survey data was read by the app from the XML file setup like this:
<survey>http://www.somesurveyprovider.com?ldp=5432dasa4321tt543121</survey>
Now, with the change to the survey, the URL is more like this:
https://www.somesurveyprovider.com/se.ashx?s=7A596FE76ACA99E1&CourseID=48369&AuthorName=Some Dude&CourseName=Some Course Name
So I changed the XML generator to encode this like this:
<survey><![CDATA[https://www.somesurveyprovider.com/se.ashx?s=7A596FE76ACA99E1&CourseID=48369&AuthorName=Some Dude&CourseName=Some Course Name]]></survey>
Now, however, the user clicks the button and nothing happens. No error message - nothing.
Now, I should prefix this by saying that I am NOT and xCode developer. I am a .NET dev using C#. Regardless of that, my boss asked me to look at this and see if I can figure out why this fails (we also have a Windows version of the same app that uses the same XML file and it still works fine).
So, after getting xCode on a Mac here, loading up the application source into that, then going back and re-installing xCode to add the 10.4 support and then setting the GCC compiler to version 4.0, I am able to compile, run and test the app. So far, so good
Looking in the code, it would appear that this line is what executes the survey button push:
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:
[trainingMgr surveyAddress]]];
At first I suspected that the XML parsing might have had an issue with the CDATA section so I added this:
NSLog([trainingMgr surveyAddress]);
And the output it produced was this:
Running
(gdb) continue
Current language: auto; currently objective-c
2010-11-02 09:27:34.334 lynda.com player[3261:a0f] https://www.somesurveyprovider.com/se.ashx?s=7A596FE76ACA99E1&CourseID=48369&AuthorName=Some Dude&CourseName=Some Course Name
(gdb) continue
So based on that, I am assuming that it parsed the URL correctly.
Can anyone shed any light here on why this might fail with this URL but not with the previous one?
TIA!