On Sat, 29 Dec 2007 17:40:09 +0100
Melchior FRANZ <[EMAIL PROTECTED]> wrote:

> 
> First of all, sorry for my -- once again -- harsh posting. I was just
> a bit overwhelmed by an "AARGH" feeling.  ;-)
> 

No problem , Ive been around long enough  ;) 
 
> 
> And yet another problem was, that the code was wrong. It doesn't save the
> view index, but the index of the view in the getChildren() vector:
> 
> ! var view = props.globals.getNode("/sim").getChildren("view");
> !     for(var i=0; i<size(view); i+=1){
> !         
> append(view_list,"sim/view["~i~"]/config/default-field-of-view-deg");
> !         }
> 
> You should have written something like:
> 
>   foreach (var v; view.views)    # it's safe to grab the vector from view.nas 
>       aircraft.data.add(v.getNode("config/default-field-of-view-deg"));
> 
> or at least use v.getIndex() rather than the counter i. The difference is
> that i will be 7 for <view n="100">. Or 8 after adding a new system view,
> or 9 etc. v.getIndex(), on the other hand, should always be 100, unless
> you change that in your *-set.xml file, of course.
> 

I did use getIndex after I realized my mistake (second commit )...
> 
> 
> 
> > If a user wants to change the default FOV for their system, i have no 
> > problem
> > with making that easy to do, and no problem with saving that out somewhere,
> > but just not in aircraft specific save files please.
> 
> Agreed. I don't know how well Maik's suggestion works (calculating FOV from
> height/width), but some widget in the "View Options" dialog and a 
> "userarchive"
> flag for the property would be fine with me. But I think this should only be
> done for the cockpit view. If a slider isn't precise enought, then make
> an input-field *and* [+] and [-] button or something. We can still improve
> that later if necessary.
> 
> m.

Well Ive removed the save function , and yes , the cockpit view was really the 
only view I actually need set every time .Im using Stuart's add-on , but 
actually all I really need/have is a button that writes the current-view's FOV 
to the appropriate sim/view/config/... the rest can be done with the X key. 
I've also added fov changes to my .fgfsrc , but that appears to be overridden 
anyway. Not a big problem , I was aiming for convenience ...

The frustrating part for me is I got a few "good idea" replies and when I 
commit something , well, this happens ...
The reason I don't want to modify the set files is because I know I'll commit 
some aircraft updates and forget about it , and cause problems for users ....
But I still think the user should be able to save the fov somewhere ...

Cheers


> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Flightgear-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel


-- 
Syd&Sandy <[EMAIL PROTECTED]>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to