Hi all - well I think I am getting better as finding my way around but clearly not there yet. I have a class that generates me a SAR file from a dozen or so categories and a bunch of other stuff. I have been manually doing a fileOut on each category but want to add this to the class so it's more automatic. I followed various paths for fileOut and ended up with so many classes that seem to do the same thing like Browser, Class, PseudoClass, SystemOrganizer etc. None of which I could actually make work. I am not sure how to determine which is the proper class to use and why my attempts to use any of them failed. Thanks again for any help. Bob *** Confidentiality Notice ***
Proprietary/Confidential |
Hi all - well I think I am getting better as finding my way around but clearly not there yet. I have a class that generates me a SAR file from a dozen or so categories and a bunch of other stuff. I have been manually doing a fileOut on each category but want to add this to the class so it's more automatic. I followed various paths for fileOut and ended up with so many classes that seem to do the same thing like Browser, Class, PseudoClass, SystemOrganizer etc. None of which I could actually make work. I am not sure how to determine which is the proper class to use and why my attempts to use any of them failed. Bob: The most easy way is do the following: | myStuff classList | classList := #(RemoteDebugServer Socket MailSender). “Here I pick any class” myStuff := ChangeSet basicNewNamed: 'BobThings'. classList do: [:ea| realClass := (Smalltalk at: ea). myStuff addClass: realClass. (realClass methodDict) do: [: icm| myStuff adoptSelector: icm who last forClass: icm who first]. ( realClass class methodDict ) do: [: ccm| myStuff adoptSelector: ccm who last forClass: ccm who first]]. myStuff fileOut I add a sample of this fileOut, you must change RemoteDebugServer Socket MailSender for you own. Enjoy Edgar BobThings.2.cs (56K) Download Attachment |
In reply to this post by Bob.Cowdery
[hidden email] puso en su mail : Hi all - well I think I am getting better as finding my way around but clearly not there yet. I have a class that generates me a SAR file from a dozen or so categories and a bunch of other stuff. I have been manually doing a fileOut on each category but want to add this to the class so it's more automatic. I followed various paths for fileOut and ended up with so many classes that seem to do the same thing like Browser, Class, PseudoClass, SystemOrganizer etc. None of which I could actually make work. I am not sure how to determine which is the proper class to use and why my attempts to use any of them failed. Thanks again for any help. Bob Edger J. De Cleene wrote: The most easy way is do the following: | myStuff classList | classList := #(RemoteDebugServer Socket MailSender). "Here I pick any class" myStuff := ChangeSet basicNewNamed: 'BobThings'. classList do: [:ea| realClass := (Smalltalk at: ea). myStuff addClass: realClass. (realClass methodDict) do: [: icm| myStuff adoptSelector: icm who last forClass: icm who first]. ( realClass class methodDict ) do: [: ccm| myStuff adoptSelector: ccm who last forClass: ccm who first]]. myStuff fileOut I add a sample of this fileOut, you must change RemoteDebugServer Socket MailSender for you own. Edger Thanks for that, not sure I would have got there any time soon. I have built my SAR file now which pulls in one .cs file as opposed to many .st files. Is this doing an equivalent thing or are there subtle differences? I loaded it on another machine and it seems to work fine. One question, I have a pool dictionary that I was instantiating first in my SAR file because I seemed to need to do that. I have left that file as a .st, and file it in first, is there a better way to do that? Regards Bob *** Confidentiality Notice *** Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply email. |
> Thanks for that, not sure I would have got there any time soon. I have built > my SAR file now which pulls in one .cs file as opposed to many .st files. Is > this doing an equivalent thing or are there subtle differences? I loaded it on > another machine and it seems to work fine. One question, I have a pool > dictionary that I was instantiating first in my SAR file because I seemed to > need to do that. I have left that file as a .st, and file it in first, is > there a better way to do that? Could do in preamble part. I copy this from Ned old StarBrowser.sar , for you could see the idea >> (SARInstaller includesSelector: #fileInPackageNamed:) ifFalse: [ self error: >> 'You need a more recent version of the SARInstaller package to install this >> package properly.' ]. >> >> "StarBrowser" >> self fileInMemberNamed: 'HierListsWithIcon-nk.cs'. >> >> self fileInPackageNamed: 'Classifications.st'. >> >> self fileInPackageNamed: 'SBSqueakCompatibility.st'. >> >> self fileInPackageNamed: 'StarBrowser.st'. >> >> (Smalltalk includesKey: #TestCase) ifTrue: [ >> self fileInPackageNamed: 'ClassificationsTesting.st'. >> ]. >> >> (Smalltalk includesKey: #SMCategory) ifTrue: [ >> self fileInPackageNamed: 'SBSqueakMap.st'. >> ]. >> >> (Smalltalk includesKey: #PackageManager) ifTrue: [ >> self fileInPackageNamed: 'SBDVS.st'. >> ]. >> >> (Smalltalk includesKey: #XMLNode) ifTrue: [ >> self fileInPackageNamed: 'SBXML.st'. >> ]. >> >> (Smalltalk includesKey: #HTMLParser) ifTrue: [ >> self fileInPackageNamed: 'SBHTML.st'. >> ]. >> >> (Smalltalk includesKey: #MailDB) ifTrue: [ >> self fileInPackageNamed: 'SBCeleste.st'. >> ]. And if you need a modified version of SARBuilder what let’s you pack other files like .gif, .morph, etc needed for you projedt, I attach just in case. Edgar, “the concierge” SARBuilder.9.cs.gz (8K) Download Attachment |
Free forum by Nabble | Edit this page |