Hi Blair,
CompiledMethod>>getSourceChunk has disappeared. What should I use instead? This is for Migrate's loose method file-out feature. Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
"Bill Schwab" <[hidden email]> wrote in message
news:[hidden email]... > Hi Blair, > > CompiledMethod>>getSourceChunk has disappeared. What should I use instead? > This is for Migrate's loose method file-out feature. Sorry about that. It should have been deprecated rather than removed, since it was a public method. You should use a ChunkSourceFiler. Regards Blair |
Hi Blair,
> Sorry about that. It should have been deprecated rather than removed, since > it was a public method. No harm done. I noticed it only after realizing that I could capture the exact set of loose methods that I file in to a D5 image rather than working at it each time. Migrate now helps with transferring options perferences. At some point, I'll have to stop fiddling with it and update it for D5. One remaining problem is whether to file in loose methods before or after installing packages. A couple of my physiologic monitor interface packages do some binary stream I/O using methods that I have kept loose because they might collide with the base system. The end result is that the packages don't load happily unless the methods are present. The bad news is that some of my loose methods alter classes that don't exist until after I load packages =:0 Zooming out, this sounds a lot like a need for conditionally filing in code; somebody posted something recently that sounded promising, but, I didn't have time to look at it when I saw it.. I _think_ what I want is a way to have code iterate a bunch of chunks to see whether or not they collide and file them in if they don't, and probably open up something like Ian's chunk browser on the ones that have problems. Of course, there's still the before/after load problem; things that don't collide and file in early might cause problems loading packages later. > You should use a ChunkSourceFiler. Something like this?? | out | out := String writeStream. (ChunkSourceFiler on: out) fileOutMessages: (Array with:#asBSTR ) ofBehavior:String. out contents. Speaking of public vs. private, have a look at SourceFiler>>fileOutExpression: and some methods near it - they say they are private (in their comments) but are categorized as public ~:0 Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
"Bill Schwab" <[hidden email]> wrote in message
news:[hidden email]... >[re: How to file out a method in chunk source format] > Something like this?? > > | out | > out := String writeStream. > (ChunkSourceFiler on: out) > fileOutMessages: (Array with:#asBSTR ) > ofBehavior:String. > out contents. > Yes, although normally you will be passing around the filer as the target onto which everything you are filing out is directed. The Package class serves as a good reference for how to file out the different types of source object. > > Speaking of public vs. private, have a look at > SourceFiler>>fileOutExpression: and some methods near it - they say they are > private (in their comments) but are categorized as public ~:0 Thanks, #635. Normally the method comment is more likely to be correct, but in this case they should be public. Regards Blair |
Hi Blair,
> >[re: How to file out a method in chunk source format] > > Something like this?? > > > > | out | > > out := String writeStream. > > (ChunkSourceFiler on: out) > > fileOutMessages: (Array with:#asBSTR ) > > ofBehavior:String. > > out contents. > > > > Yes, although normally you will be passing around the filer as the target > onto which everything you are filing out is directed. The Package class > serves as a good reference for how to file out the different types of > object. Hanging on to one filer sounds great for efficiency's sake. Is there more to it? In particular, are you thinking of things that won't work correctly if multiple things are filed out using multiple filers? Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
"Bill Schwab" <[hidden email]> wrote in message
news:[hidden email]... > .... > Hanging on to one filer sounds great for efficiency's sake. Is there more > to it? In particular, are you thinking of things that won't work correctly > if multiple things are filed out using multiple filers? > It won't be a problem for a ChunkSourceFiler, but there might be some types of source format that need to 'batch' things up, or which are nested in such a way that you can't just append bits of source together in a file and create a valid source file. Therefore it makes sense to use a single filer for a single file. Later if one wants to create a different source format, one can simply substitute a different type of filer. At least that is the theory, I suspect there may be some issues to be worked out with the filer interfaces so that it really can support a wide range of source formats in an efficient way. Flushing out those issues really requires implementing filers for more formats, but we haven't had time to do that yet since it is not a critical path task. Regards Blair |
Free forum by Nabble | Edit this page |