ill.die.trying Posted April 15, 2009 Report Share Posted April 15, 2009 so i'll declare that in model_variables.ui?and in the scrip how should it look like? should i just change the speedlimitcustvar to vSeedlimitCustomDisp.set? Aha. Since the new variable isn't a model, you could declare in in navigatemap itself, doesn't really matter... added this variable to navigatemap,ui and then changed this runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"' end result, still the same should i replace the code from above to this? runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"' Quote Link to post Share on other sites
GTIMatt Posted April 15, 2009 Report Share Posted April 15, 2009 so i'll declare that in model_variables.ui?and in the scrip how should it look like? should i just change the speedlimitcustvar to vSeedlimitCustomDisp.set? Aha. Since the new variable isn't a model, you could declare in in navigatemap itself, doesn't really matter... added this variable to navigatemap,ui and then changed this runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"' end result, still the same should i replace the code from above to this? runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"' I wouldn't the first line looks fine, I have code running that's formatted that way. Quote Link to post Share on other sites
BorisM Posted April 15, 2009 Report Share Posted April 15, 2009 added this variable to navigatemap,ui and then changed this runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"' end result, still the same should i replace the code from above to this? runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"' Strange... May bew remove the '%'? I'll try a few things in the meanwhile... Quote Link to post Share on other sites
BorisM Posted April 15, 2009 Report Share Posted April 15, 2009 Strange... May bew remove the '%'? I'll try a few things in the meanwhile... OK, fixed! Here's the deal: in model_variables: vSpeedLimit.valuemodel "navigation.current_speed_limit.value" vSpeedLimit.onchange "sc_SpeedLimit" In navigatemap.ui in : And in the st_NavigateMap somewhere add a script with something like this: Obviously adjust speeds and what you want to show... And finally in navigatemap_800_480.ui find the text element that shows the speed and do something like Never mind fonts and all -- I was testing this on an HP IPAQ emulator for the PC, and it does work there. Quote Link to post Share on other sites
ill.die.trying Posted April 15, 2009 Report Share Posted April 15, 2009 Strange... May bew remove the '%'? I'll try a few things in the meanwhile... OK, fixed! Here's the deal: in model_variables: vSpeedLimit.valuemodel "navigation.current_speed_limit.value" vSpeedLimit.onchange "sc_SpeedLimit" In navigatemap.ui in : And in the st_NavigateMap somewhere add a script with something like this: Obviously adjust speeds and what you want to show... And finally in navigatemap_800_480.ui find the text element that shows the speed and do something like Never mind fonts and all -- I was testing this on an HP IPAQ emulator for the PC, and it does work there. one last thing, why is it that there's two text elements in the code above? Quote Link to post Share on other sites
BorisM Posted April 15, 2009 Report Share Posted April 15, 2009 one last thing, why is it that there's two text elements in the code above? Bad cut and paste There's a text element that shows units there... Quote Link to post Share on other sites
ill.die.trying Posted April 15, 2009 Report Share Posted April 15, 2009 one last thing, why is it that there's two text elements in the code above? Bad cut and paste There's a text element that shows units there... ok then, evermind the 2nd text element as i don't want it to show up anyways Quote Link to post Share on other sites
ill.die.trying Posted April 16, 2009 Report Share Posted April 16, 2009 got everything set up but still not able to get it to display the the new assigned value, Quote Link to post Share on other sites
BorisM Posted April 16, 2009 Report Share Posted April 16, 2009 got everything set up but still not able to get it to display the the new assigned value, Strange... Can you put something in the onchange script that you would immediately notice? Quote Link to post Share on other sites
ill.die.trying Posted April 16, 2009 Report Share Posted April 16, 2009 got everything set up but still not able to get it to display the the new assigned value, Strange... Can you put something in the onchange script that you would immediately notice? something like? Quote Link to post Share on other sites
GTIMatt Posted April 16, 2009 Report Share Posted April 16, 2009 got everything set up but still not able to get it to display the the new assigned value, Strange... Can you put something in the onchange script that you would immediately notice? something like? maybe hide one of your buttons? I'm guessing Boris is just trying to make sure your onchange script is actually running so if the first thing you do in the script is hide a button then if that button disappears you will at least know the script is running. Quote Link to post Share on other sites
BorisM Posted April 16, 2009 Report Share Posted April 16, 2009 maybe hide one of your buttons? I'm guessing Boris is just trying to make sure your onchange script is actually running so if the first thing you do in the script is hide a button then if that button disappears you will at least know the script is running. Indeed. This code does work on other iGo incarnations, and ours does appear to have OnChange, so I'd try debugging it piece by piece to see which piece does not work. Also, for giggles, may be add a button on screen that will call sc_SpeedLimit script directly. If that does update speed limit display, this will narrow the field down quite a bit... Quote Link to post Share on other sites
ill.die.trying Posted April 16, 2009 Report Share Posted April 16, 2009 maybe hide one of your buttons? I'm guessing Boris is just trying to make sure your onchange script is actually running so if the first thing you do in the script is hide a button then if that button disappears you will at least know the script is running. Indeed. This code does work on other iGo incarnations, and ours does appear to have OnChange, so I'd try debugging it piece by piece to see which piece does not work. Also, for giggles, may be add a button on screen that will call sc_SpeedLimit script directly. If that does update speed limit display, this will narrow the field down quite a bit... added a button to run the script but it still does nothing, Quote Link to post Share on other sites
BorisM Posted April 16, 2009 Report Share Posted April 16, 2009 added a button to run the script but it still does nothing, Hmmm... This tells me that the script is not setting something correctly. Try doing this: since the button is initially defined as unknown, have the first statement of the script setting it to something else: tMySpeedLimit.text "Testing 1,2,3" Then run all the statements that set speed limit sign to something else. Manually setting text value of a text element should always work, regardless of anything models, OnChange etc. do. I just tried it in the emulator, and it works here, too... Quote Link to post Share on other sites
ill.die.trying Posted April 16, 2009 Report Share Posted April 16, 2009 i'm caliing it quits, have spent so many hours just on this one, if anyone wants to continue working on this one please do, as for me it's time to move on to a project i'm working on, BTW thanks for the help Borism Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.