[futurebasic] Re: [FB] buggy DCOD?

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

From: "Pete" <furbies@...>
Date: Mon, 10 May 1999 14:57:49 +1000
>>I can't get it to work...
>>When ever I call the DCOD my app crashes, so I'm assuming that there's
>>something wrong with the DCOD
>
> Pete:
>
> I've only used DCODs in code resources and not in apps, so take some of the
> following accordingly:
>
> 1.  Try looking in the Project Manager Code at the file PM.DCOD to see how
> Staz sets up DCODs.  Look in the file PMSelector.incl at the fn doDCOD to
> see how he calls DCODs.
>
> 2.  When you call your DCOD, do you put a % sign in front of the integer
> variable?   I'm not sure why this is required, but it is.  The doDCOD fn
> mentioned above shows how to do this.
>
> 3.  I've never seen a DCOD return an integer.  Try having it return a long
> instead.
>
> 4.  Staz seems to use a trick with records to save typing. ( This would
> only apply if you only had one instance of your record, but that's what you
> seem to have. )  Try changing:
>   DIM END RECORD .SMGrec
> to DIM END RECORD _SMGrec
> Then you can change the following;
> LOCAL FN getModuleSpecs
>   gSMGblk.SMGreturn1& = _"TEST"                   'module ident
>   gSMGblk.SMGreturn2& = 1                         'version
>   gSMGblk.SMGreturn3& = [_time]                   'compile date
> END FN
> to
> LOCAL FN getModuleSpecs
>   SMGreturn1& = _"TEST"                   'module ident
>   SMGreturn2& = 1                         'version
>   SMGreturn3& = [_time]                   'compile date
> END FN

I did have my global vars set as you describe but when I was looking for the
problem(s) that caused the crash I changed to the above

> 5.  My DCODs seem to work nicely without the RETURN statement at the end,
> as do Staz's.  It's probably not necessary.

So do DCODs etc need the RETURN after the EXITPROC% ??????????????????

> Hope this helps.
>
> Mark

Thanks Mark

P...