Writing to the resource fork

stephen barncard stephenREVOLUTION2 at barncard.com
Sun May 30 15:30:28 EDT 2010


Perhaps the problem is Snow Leopard -
We should assume the old resource fork is officially unsupported and not
working in SN. They've been planning on removing resource forks from files
for a decade.
Back in the hypercard days, one could use the resource fork like today's
custom properties in Rev. I would store text, sounds, binaries, images as
resources.
I remember the resource system wasn't as robust as Rev as far as file
integrity; there would be occasional problems with resources, but it worked
pretty well.

Have you tried this on another machine, perhaps one running Tiger or below?

On 29 May 2010 23:56, Joe F. <joef1 at mac.com> wrote:

> Right, empties all.
> Also interesting, I could only getResources from the files I created with
> Rev.
>
> I was pretty sure I had seen all those working in someone else's stack.
> I thought maybe "open for binary read" might work, but no.
>
> Could this be something that was once working and is now broken in 4.5-dp2?
>
> On May 29, 2010, at 3:53 AM, Mark Schonewille wrote:
>
> > Hi Joe,
> >
> > As I explained in my original e-mail, your example creates the resources,
> but doesn't write the actual data.
> >
> > --
> > Best regards,
> >
> > Mark Schonewille
> >
> > Economy-x-Talk Consulting and Software Engineering
> > Homepage: http://economy-x-talk.com
> > Twitter: http://twitter.com/xtalkprogrammer
> >
> > Economy-x-Talk is always looking for new projects. Contact me for a quote
> http://economy-x-talk.com/contact.html
> > Download Clipboard Link http://clipboardlink.economy-x-talk.com and
> share the clipboard of your computer over the local network.
> >
> > On 29 mei 2010, at 04:58, Joe F. wrote:
> >
> >> I don't know about all that. I just moved to snow leopard so I don't
> even know if I have a hex editor available.
> >> If I open the file it looks empty; but I wouldn't know about resource
> fork reading on OS X, they all look like flat files to me.
> >>
> >> Here's the script I used in a button that creates the file with 2
> resources,then retrieves them to a field named "Notes":
> >>
> >> on mouseUp
> >>
> >>  -- Create file first
> >>  put empty into URL "binfile:~/desktop/resource test.dat"
> >>  get setResource("~/desktop/resource
> test.dat","TEXT",999,"Test","U","Hello World")
> >>  get setResource("~/desktop/resource
> test.dat","MARK",999,"Test","U","Hello World2")
> >>  put getResources("~/desktop/resource test.dat") into fld "Notes"
> >> end mouseUp
> >>
> >> Maybe they're not "real" resources; only some kind of special "rev"
> resources?
> >
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
-------------------------
Stephen Barncard
San Francisco



More information about the use-livecode mailing list