{"id":1684,"date":"2006-01-05T17:37:00","date_gmt":"2006-01-05T06:37:00","guid":{"rendered":"http:\/\/new.radio-active.net.au\/web3\/1684\/"},"modified":"2014-10-10T12:28:30","modified_gmt":"2014-10-10T01:28:30","slug":"1684","status":"publish","type":"post","link":"http:\/\/www.radio-active.net.au\/web3\/1684","title":{"rendered":""},"content":{"rendered":"<p>I have been putting back a task for ages. Basically my mapping system interfaces to the OziExplorer software, and adds text to the text that would normally appear as a &#8216;tool tip&#8217;. Now, each client it seems wants different information in this field. Some want nothing, and others want tons of information. <br \/><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/new.radio-active.net.au\/web3\/wp-content\/uploads\/2006\/01\/one-300x42.png?resize=300%2C42\" data-recalc-dims=\"1\" \/><br \/>Hard coding this data is easy for me as a programmer, but is a real pain if we need to change the information that is displayed. This afternoon I finally worked out how to make this a user configurable option. Basically I place a line like the following ine into the config file. <br \/><i>ID:[VehicleID][CR]Company:[CompanyName] [CR] [TimeLog] [Driver][CR] Spd: [Speed] Hdg: [Heading][CR]<\/i><\/p>\n<p>This converts anything in the square brackets into the variable with that name. A while back I worked out how to use the system.reflection class in VB.NET to extract the paramater names and values for a structure. What I ended up doing was something like:<br \/>    <i>line.replace (&#8220;[VehicleID]&#8221;, &#8220;1234&#8221;)<\/i><\/p>\n<p>This mostly worked. The one thing I forgot was that the .replace is a function and returns the changed string rather than changing it internally. So I actually did something like:<br \/>    <i>line = line.replace (&#8220;[VehicleID]&#8221;, &#8220;1234&#8221;)<\/i><\/p>\n<p>This ended up giving a result like <br \/><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/new.radio-active.net.au\/web3\/wp-content\/uploads\/2006\/01\/new-300x104.png?resize=300%2C104\" data-recalc-dims=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been putting back a task for ages. Basically my mapping system interfaces to the OziExplorer software, and adds text to the text that would normally appear as a &#8216;tool tip&#8217;. Now, each client it seems wants different information &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"http:\/\/www.radio-active.net.au\/web3\/1684\">  Read More &raquo;<\/a><\/p>\n","protected":false},"author":3,"featured_media":3473,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.radio-active.net.au\/web3\/wp-content\/uploads\/2006\/01\/one.png?fit=748%2C107","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s5cfmK-1684","_links":{"self":[{"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/posts\/1684"}],"collection":[{"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/comments?post=1684"}],"version-history":[{"count":0,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/posts\/1684\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/media\/3473"}],"wp:attachment":[{"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/media?parent=1684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/categories?post=1684"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.radio-active.net.au\/web3\/wp-json\/wp\/v2\/tags?post=1684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}