Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth Mac > Re: Shared libr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 13 Topic 74 of 159
Post > Topic >>

Re: Shared libraries

by n_sacra@[EMAIL PROTECTED] (Nao Sacrada) Aug 19, 2004 at 08:41 AM

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
 




 13 Posts in Topic:
Shared libraries
surrel@[EMAIL PROTECTED]   2004-08-13 15:48:28 
Re: Shared libraries
Mike Hore <mikehoreREM  2004-08-16 07:46:35 
Re: Shared libraries
n_sacra@[EMAIL PROTECTED]  2004-08-17 09:11:02 
Re: Shared libraries
n_sacra@[EMAIL PROTECTED]  2004-08-17 09:14:04 
Re: Shared libraries
surrel@[EMAIL PROTECTED]   2004-08-18 00:13:46 
Re: Shared libraries
n_sacra@[EMAIL PROTECTED]  2004-08-19 08:41:49 
Re: Shared libraries
surrel@[EMAIL PROTECTED]   2004-08-21 01:29:59 
Re: Shared libraries
ward@[EMAIL PROTECTED] (  2004-08-21 07:00:36 
Re: Shared libraries
surrel@[EMAIL PROTECTED]   2004-08-23 01:39:33 
Re: Shared libraries
ward@[EMAIL PROTECTED] (  2004-08-23 16:43:39 
Re: Shared libraries
surrel@[EMAIL PROTECTED]   2004-08-24 02:02:03 
Re: Shared libraries
ward@[EMAIL PROTECTED] (  2004-08-24 05:52:41 
Re: Shared libraries
Mike Hore <mikehoreREM  2004-08-25 11:47:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 22:26:30 CDT 2008.