Re: [nbos] [AS2][AS3] SetDefaultSystemDataConfig
Alan Bartholet
Sun Sep 23rd, 2012
Thanks Ed, that did it.

I assumed that because the SetDefaultSystemDataConfig method takes a
SystemDataConfigHolder object as an argument that I would have to pass
it back to the Sector object for it get set as the default for the
sector.

-Alan

On Sun, Sep 23, 2012 at 12:18 AM, NBOS Support <support2-at-nbos.com> wrote:
>
> Try just this:
>
>
> sector = GetCurrentSector()
> config = CreateSystemDataConfig()
> config.AddField "The spectral class is", "spectral", "", False
> holder = sector.GetSystemDataConfigHolder()
> holder.SetConfigForType config, BODY_TYPE_STAR
>
> You dont need SetDefaultSystemDataConfig - that actually resets the the
> system data fields back to their defaults.
>
>
>
>
> At 04:38 PM 9/22/2012, Alan Bartholet wrote:
>>Hello Everyone,
>>I'm working on some updating of my GURPS plugin and I've run into an
>>issue I haven't been able to resolve.
>>
>>Instead of setting the display of the fields on a per body basis I
>>want to set them in the sector defaults.
>>
>>Unfortunately I haven't been able to make it work so either I'm
>>missing something or it's a bug, I've tried this in both AS2 and AS3.
>>Here is a basic example of what I am trying to accomplish:
>>
>>----------start code----------
>>
>>sector = GetCurrentSector()
>>
>>config = CreateSystemDataConfig()
>>config.AddField "The spectral class is", "spectral", "", False
>>
>>holder = sector.GetSystemDataConfigHolder()
>>holder.SetConfigForType config, BODY_TYPE_STAR
>>sector.SetDefaultSystemDataConfig holder
>>
>>----------end code----------
>>
>>Anybody have any ideas?
>>
>>Best Regards,
>>Alan Bartholet
>>_______________________________________________
>>Nbossoftware mailing list
>>
>>
>
> _______________________________________________
> Nbossoftware mailing list
>
>
_______________________________________________
Nbossoftware mailing list


Copyright © 2003-2007, NBOS Software. All rights reserved. 'Fractal Mapper', 'ScreenMonkey', 'Character Sketcher', 'Inspiration Pad', 'Fractal World Explorer', 'Goblin API', 'AstroSynthesis' are trademarks of NBOS Software. 'Dwarven Beserker' art by V. Shane.
Member contributed resources