From: Foster T. B. <fbr...@ad...> - 2005-04-29 18:29:24
|
This function should only be called once, as it's an initialization routine. The reason the view is static is so the assemblage stays around for the lifetime of the application (and hence the editor dialog stays around that long, too). We can dispose of the stream as soon as the dialog has been created, so it need not be static. Another problem with the stream being static is that eve definition is "open" as long as the application is running, which isn't the behavior you want. Blessings, Foster On Apr 29, 2005, at 11:24a, David Catmull wrote: > On Apr 29, 2005, at 11:15 AM, Foster T. Brereton wrote: >> The line wouldn't compile on Metrowerks, either. I put in a similar >> fix to David's (except I didn't have my stream as static) and >> everything is working fine for me. I've checked it in to the >> repository. > > I was thinking that if it's being used to initialize a static > variable, then it ought to be static too. I suppose it's a trade-off > between having it never get disposed vs being unnecessarily > constructed on subsequent calls. > > -- > David Catmull > unc...@un... > http://www.uncommonplace.com/ > > -- Foster T. Brereton <}}}>< Romans 3:21-26 A d o b e S o f t w a r e T e c h n o l o g y L a b "What 99 percent of programmers need to know is not how to build components but how to use them." -- Alexander Stepanov |