Omnis Studio - Datafiles name
Stephane Pras
stephane.pras at noos.fr
Tue Jan 13 11:42:33 EST 2015
Mischa,
Thanks to you and everybody for all this information. I remembered you
posted something on the subject, but I couldn't find it back. Now I know
what I have to try :-(
But Georges' suggestion of organizing an utility file of it's own for the
same purpose sounds quite simple and brilliant to me !
Stephane
From: Mischa <mischa at omnislab.com>
Reply-To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Date: Tuesday, January 13, 2015 2:48 PM
To: 'OmnisDev List - English' <omnisdev-en at lists.omnis-dev.com>
Subject: Re: Omnis Studio - Datafiles name
Hi Kelly,
>>
Calculate binPart as bytecon(zeros,bytemid(classBin,9,9)) ;; Get length
byte from class data
Calculate pathLength as bintolong(binPart)
Calculate binPart as bytemid(classBin,10,9+pathLength) ;; Get measured
path following length byte
Now I remember ;) - didn't we find out, that on Macs the offset is 1 higher
than on Windows?
Best greetings
Mischa
---------------------------------------------------
T H E O M N I S L /\ B www.omnislab.com
---------------------------------------------------
-----Ursprüngliche Nachricht-----
Von: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] Im Auftrag von Kelly
Burgess
Gesendet: Dienstag, 13. Jänner 2015 12:11
An: OmnisList
Betreff: Re: Omnis Studio - Datafiles name
Hi Mischa,
> I have written an object for such binary functions, but I hope you got the
idea how to do it on your own.
Using your info, before I noticed Daniel's repost of your old code, I wrote
this (in Studio 4.2):
Calculate class as 256 ;; ident of master library 'class'
Calculate classBin as $clib.$classes.[class].$classdata
Calculate zeros as chr(0,0,0)
Calculate binPart as bytecon(zeros,bytemid(classBin,9,9)) ;; Get
length byte from class data
Calculate pathLength as bintolong(binPart)
Calculate binPart as bytemid(classBin,10,9+pathLength) ;; Get measured
path following length byte
Calculate datafilePath as utf8tochar(binPart)
Quit method datafilePath
Thanks for the tricks,
Kelly
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list