Re: writeExternal() , readExternal()

Steven Yi <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CANtcCs58sdbRvt9H3Jk1HtoMsy5U0NyLhxFuOtY0DhpJSW5yFQ@mail.gmail.com>
Hi Mark,

Are you upgrading an older application to use a newer NB Platform? Or
are you creating new TopComponents within an older application? I had
problems myself when moving to a newer NB a while ago when the
properties stuff was introduced.  I'm trying to remember it exactly,
but my guess is to check if your TopComponent is annotated with
ConvertAsProperties [1]. If so, that would explain your code not
touching readExternal/writeExternal. I think the default these days
when using the wizard to create new TopComponents is to use
ConvertAsProperties.  There's a tricky aspect when updating an older
TopComponent to use that annotation as the older properties from the
binary stream can be hard to migrate correctly.

Hope that helps!
steven


[1] - http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-settings/org/netbeans/api/settings/ConvertAsProperties.html

On Wed, Apr 20, 2016 at 2:28 PM, Mark Wade <[email protected]> wrote:
> On 04/20/2016 12:51 PM, Mark Wade wrote:
>>
>> I'm not understanding.
>
>
> I could call writeExternal/readExternal from writeProperties/readProperties
> but that would be just way too nasty, eh?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.