[futurebasic] Re: [FB] FOLDER() function

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2003 : Group Archive : Group : All Groups

From: Jay Reeve <jayreeve@...>
Date: Fri, 16 May 2003 08:46:14 -0500
>Hello FB'rs
>
>I am trying to update my old FB II engineering application 'Quench' to FB^3
>Carbon. I have been using the Program Generator for the windows and the
>menus etc. I am using a Mac 7300/Sonnet G3/500 MacOS 9.1, Carbonlib 1.6
>
>
>I experience problems in my next function (unchanged from FBII)
>
>In 'Quench.GLBL':
>
>DIM @DataFolder%
>
>
>In 'Quench.INCL':
>
>CLEAR LOCAL
>DIM appVol%
>LOCAL FN GetDataFolder%
>'~'2
>appVol% = SYSTEM (_aplVol)'Volume Application is on
>DataFolder% = FOLDER (" Quench Data Files", appVol%)
>END FN
>
>
>The problem remains when I code:
>DataFolder% = FOLDER (" Quench Data Files", 0)
>
>
>When I Cmd-doubleClick on FOLDER in order to jump to the definition
>I come in 'Subs Files.Incl' at the code:
>
>//------- long = FOLDER(gFBStr&.FBStrAcc$,volume&) ----------//
>
>LOCAL
>DIM PBlk&,OsErr
>RUNTIME Folder(volume&)
>'
>gFBStr&           = gFBStr& - 256'Pop String
>PBlk&             = FN NewPtrClear(128)
>PBlk&.ioVRefNum%  = volume&'Try Folder Vol
>'
>#if CarbonLib'Date { 10/28/01 }
>fn FBWDtoPBWD(PBlk&)
>#endif'Date { 10/28/01 }
>'
><big snip>
>END FN
>
>
>It looks like kind of type mismatch; the string is missing in the definition
>Am I doing something wrong?
>
>
>Thank you in advance for any comment
>Jan

Jan,

I can't tell you where your problem is, but I don't expect it will be 
the string var that appears to be missing. Most FB runtime fns use a 
string-stack pointer for passing strings (gFBStr). They don't work 
exacly like Local Fns, but the compiler knows where to put the data, 
so you don't have to worry about it.

Now over to someone (Alain?) who can tell you why it isn't working for you.

  e-e
  =J= a  y
   "