Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Curtis, I'm actually trying to have null values for just the DisplayRealType and not the ScalarType. I want the possibility for an input field to be mapped to a null value as one possible visualization instead of *always* mapping every single input field in the data set to a VisAD parameter. However, as I dig further and further into the original code, I'm finding that I would have to modify many classes to avoid null pointer exceptions. Am I correct that there would be no simple way to wrap a null DisplayRealType without getting null pointer exceptions? Thanks, -----Original Message----- From: Curtis Rueden [mailto:curtis@xxxxxxxxxxxxx] Sent: Thursday, July 17, 2003 2:40 PM To: User Subject: Re: null scalary type in ScalarMap Hi, Intuitively, a ScalarMap with null ScalarType or null DisplayRealType would serve no purpose when added to a display. I see no reason to create such ScalarMaps. What are you trying to accomplish? -Curtis At 03:50 PM 7/17/2003, you wrote: >Hello, > >I am trying to construct a ScalarMap with a null value as one or both of the parameters passed in to ScalarMap(ScalarType scalar, DisplayRealType display_scalar). I tried commenting out the following code in the ScalarMap constructor: > > /* > if (scalar == null && needNonNullScalar) { > throw new DisplayException("ScalarMap: scalar is null"); > } > if (display_scalar == null) { > throw new DisplayException("ScalarMap: display_scalar is null"); > } >*/ > >However, I will get a null pointer later in that constructor if "scalar" or "display_scalar" are passed in as null. Is there a way to wrap a null value for "display_scalar" or "scalar" before it is passed in to create a ScalarMap? > >Thanks,
visad
archives: