Hi Yves,
surrel@[EMAIL PROTECTED]
(Yves Surrel) wrote in message
news:<4fe1a34c.0408172313.384f6cb7@[EMAIL PROTECTED]
>...
>[snip]
> I am running Mac OS X (10.3.4). I used to know ResEdit on Mac OS 9,
> what is the equivalent in X?
>
If you have classic environment, ResEdit can run on it
without problem, as far as I know. Using ResEdit is the
easiest way, I think.
But I am sorry, I don't know any resource fork editor
equivalent to ResEdit that runs natively on Mac OS X,
especially if "equivalent" includes "being a freeware" ;-).
> Maybe there is a way to do the fix from within PowerMops using a file
> class method?
>
Well, yes, it is possible to correct resource forks with PowerMops,
but not by using a file class method because the file class is
supposing the file object is a data fork file. Instead, we can use
Resource class to edit resource forks on PowerMops.
Anyway, if you please, you could try following code on PowerMops
(excuse me without source code comment)
[code-begin]
variable frefnum
res+ tempcfrg
syscall CloseResFile
syscall RemoveResource
: openresfork ( addr len -- )
0 mopsRsrcDirID 2swap str255 0 HOpenResFile frefnum w! ;
: getcfrgdata
'type cfrg 0 set: tempcfrg
getnew: tempcfrg ;
: changecfrg
get: tempcfrg RemoveResource
0 ptr: tempcfrg 54 + c! \ clear Usage flag
nullOSStr addres: tempcfrg
;
: closeResFork
frefnum w@[EMAIL PROTECTED]
CloseResFile ;
: Modifycfrg ( addr len -- )
openresfork
getcfrgdata
changecfrg
closeresfork ;
[code-end]
How to use:
1. put "MySharedLib" in Mops folder
2. load this file into PowerMops. and
3. type on PowerMops
" MySharedLib" Modifycfrg<enter>
This will correct cfrg resource of "MySharedLib".
But there is left another bug I referred to in previous post.
I think this bug resides in a shared library created by
PowerMops, so the AppleEventHandler problem will generally
appear, that is, it will occur also on LabView when
linking to a shared libray generated with PowerMops.
(though, sorry, I know almost nothing about LabView).
Unfortunately I don't know any easy way to fix this
bug without rebuilding PowerMops, which requires,
at least, a classic environment of Mac OS X.
Sincerely,
Nao Sacrada
> Yves


|