hartkopf@tramp.Colorado.EDU (Jeff Hartkopf) (12/01/89)
I posted this question several days ago but received no replies to it, so I assume something went wrong, and I'm posting it again: ------------------- Question about the new Standard File calls and the SFReplyRec2 record: What is the format of the nameDesc and pathDesc fields of an SFReplyRec2 after calling SFGetFile2()? I assumed they were Pascal-type strings as in the SFReplyRec, but I seem to be wrong. Thanks a lot for any help. Jeff Hartkopf Internet: hartkopf@tramp.Colorado.EDU
jazzman@claris.com (Sydney R. Polk) (12/01/89)
From article <14385@boulder.Colorado.EDU>, by hartkopf@tramp.Colorado.EDU (Jeff Hartkopf): > I posted this question several days ago but received no replies to it, so > I assume something went wrong, and I'm posting it again: > ------------------- > > Question about the new Standard File calls and the SFReplyRec2 > record: > > What is the format of the nameDesc and pathDesc fields of an SFReplyRec2 > after calling SFGetFile2()? I assumed they were Pascal-type strings as > in the SFReplyRec, but I seem to be wrong. > > Thanks a lot for any help. > > > Jeff Hartkopf > > Internet: > hartkopf@tramp.Colorado.EDU Well, I thought somebody from Apple would answer this, but I guess not. It depends on a couple of values. There is a field labeled "pathVerb". You have to supply a value. Depending on what this value is, the "pathDesc" field will be one of the following: - a pointer to a Class 1 GS/OS string. You have to supply the pointer. - a handle to a Class 1 GS/OS string. You have to supply the handle. - a handle to a Class 1 GS/OS string. Standard File allocates it, you have to throw it away. The format of the GS/OS string is as follows: - A length word indicating how much space this is taking up. - A length word indicating how big the pathname is. - The pathname. I would let Standard File allocate the handle. If you are on an AppleShare volum, it could get quite large. (HFS doesn't have any 64-byte partial pathname limitations or 128 full pathname limitations). Look, I don't mean this personally, but I see you asking lots of questions that are answered in the Toolbox Manuals. Do you ever read them? The Standard File stuff is painstakingly clear (I know, I caused one of the sections of documentation to be written!) if you read it and you have a knowledge of GS/OS. I have also seen questions on other tools that could be figured out from the manuals. What I am trying to say is, it is worth investing the time to look up the answers to questions in the Toolbox Manuals. If you can't find it, THEN ask the net. Sorry to get on my soapbox, -- Syd Polk | Wherever you go, there you are. jazzman@claris.com | Let the music be your light. GO 'STROS! | These opinions are mine. Any resemblence to other GO RICE! | opinions, real or fictitious, is purely coincidence.
hartkopf@tramp.Colorado.EDU (Jeff Hartkopf) (12/01/89)
In article <10706@claris.com> jazzman@claris.com (Sydney R. Polk) writes: > >Look, I don't mean this personally, but I see you asking lots of questions >that are answered in the Toolbox Manuals. Do you ever read them? >The Standard File stuff is painstakingly clear (I know, I caused one of >the sections of documentation to be written!) if you read it and you >have a knowledge of GS/OS. I have also seen questions on other >tools that could be figured out from the manuals. What I am trying to >say is, it is worth investing the time to look up the answers to questions >in the Toolbox Manuals. If you can't find it, THEN ask the net. > >Sorry to get on my soapbox, >-- >Syd Polk | Wherever you go, there you are. Thank you. Yes, I do read the toolbox manuals (the first two, that I have) very closely before posting questions to the net. However, unfortunately, I am not able to afford both the Toolbox Reference Volume 3 beta draft and the final draft when it comes out, so I'm waiting for the final draft. Therefore, since I had no other way of finding out about the *new* Standard File calls, that are explained only (I assume) in the 3rd volume, I posted the question to the net. I guess I thought that one purpose of this newsgroup was to ask technical questions that one had no other way of getting answers to. Jeff Hartkopf Internet: hartkopf@tramp.Colorado.EDU
jazzman@claris.com (Sydney R. Polk) (12/02/89)
From article <14405@boulder.Colorado.EDU>, by hartkopf@tramp.Colorado.EDU (Jeff Hartkopf): > Thank you. Yes, I do read the toolbox manuals (the first two, that I have) > very closely before posting questions to the net. However, unfortunately, > I am not able to afford both the Toolbox Reference Volume 3 beta draft and > the final draft when it comes out, so I'm waiting for the final draft. > Therefore, since I had no other way of finding out about the *new* Standard > File calls, that are explained only (I assume) in the 3rd volume, I posted > the question to the net. > > I guess I thought that one purpose of this newsgroup was to ask technical > questions that one had no other way of getting answers to. It is. I am sorry. I work for a rich, fat-cat company and getting things is easy for me. I should have more sympathy for those developers without the resources that I have available to me. However, I think both the GS/OS manuals and the Toolbox Reference 3 will be beta an awful long time, and it is probably not worth the wait, esp. since you need the material now. There is an awful lot of information in these that you really need to program in System 5.0.x. I really don't think that much will change with final draft. Once again, please accept my apology. I did not realize your situation. -- Syd Polk | Wherever you go, there you are. jazzman@claris.com | Let the music be your light. GO 'STROS! | These opinions are mine. Any resemblence to other GO RICE! | opinions, real or fictitious, is purely coincidence.
mattd@Apple.COM (Matt Deatherage) (12/03/89)
In article <10717@claris.com> jazzman@claris.com (Sydney R. Polk) writes: >From article <14405@boulder.Colorado.EDU>, by hartkopf@tramp.Colorado.EDU (Jeff Hartkopf): >> Thank you. Yes, I do read the toolbox manuals (the first two, that I have) >> very closely before posting questions to the net. However, unfortunately, >> I am not able to afford both the Toolbox Reference Volume 3 beta draft and >> the final draft when it comes out, so I'm waiting for the final draft. >> Therefore, since I had no other way of finding out about the *new* Standard >> File calls, that are explained only (I assume) in the 3rd volume, I posted >> the question to the net. >> >> I guess I thought that one purpose of this newsgroup was to ask technical >> questions that one had no other way of getting answers to. >It is. I am sorry. I work for a rich, fat-cat company and getting >things is easy for me. I should have more sympathy for those developers >without the resources that I have available to me. > >However, I think both the GS/OS manuals and the Toolbox Reference 3 will >be beta an awful long time, and it is probably not worth the wait, esp. >since you need the material now. There is an awful lot of information >in these that you really need to program in System 5.0.x. I really >don't think that much will change with final draft. > >Once again, please accept my apology. I did not realize your situation. > > >-- >Syd Polk | Wherever you go, there you are. It's not often that I'm less gracious than Syd, but this could be one of those times. Jeff, you *do* have another way of getting answers to these questions. You can buy the book. The people on this newsgroup are happy to help you with confusing technical issues, but they're not here to retype manuals that you have chosen not to purchase. I know they're not cheap. When I was in college, my budget for such things was *very* limited. However, I didn't lose track of what I consider the Penultimate Rule of Beta Documentation: "You never, never write programs that you show to anyone else unless you have the documentation on all the calls you're using." Guessing at data structures you feed to a new tool is just not a good idea. Sadly, there *is* a cost associated with programming, but we try to keep it low (TB Ref volume 3 costs $35 from APDA for over 800 pages, which is a much better buy than most college texts I can recall). No one has any intent of forcing you to buy documentation to program. But please have the decency and respect for those who use your programs not to use parts of the system you don't have the documentation on. -- ----------------------------------------------------------------------------- Matt Deatherage, Apple Computer, Inc. | "The opinions expressed in this tome Send PERSONAL mail ONLY (please) to: | should not be construed to imply that Amer. Online: Matt DTS | Apple Computer, Inc., or any of its ThisNet: mattd@apple.com | subsidiaries, in whole or in part, ThatNet: (stuff)!ames!apple!mattd | have any opinion on any subject." Other mail by request only, please. | "So there." -----------------------------------------------------------------------------