Saturday, February 23, 2019

#1 2019-01-13 02:48:53 pm

technomorph
Member
Registered: 2017-12-14
Posts: 96

Encoding an Array that has Script Object instances

I'm trying to encode the follow array:
(from console log)

aLibrary  is: (
        {
        libDateAdd = "19-13-01 12:29:32";
        libDateMod = "19-13-01 12:29:32";
        libFilePathURL = "file:///Users/kerry/Documents/DJK-Tel%20Traktor%20Tools/Search%20History/lib8.xml";
        libInclude = YES;
        libName = lib8;
        libPlaylists =         (
            "<BAGenericObject @0x608001030b20: OSAID(577) ComponentInstance(0x810000)>",
            "<BAGenericObject @0x600000833c20: OSAID(1065) ComponentInstance(0x810000)>"
        );
        libType = "NML Playlists";
    }
)

but of course it's hanging on the libPlaylists.
How do I make them adopt NSCoding?

thanks

Offline

 

#2 2019-01-13 04:56:19 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5573

Re: Encoding an Array that has Script Object instances

Unfortunately you can't.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

#3 2019-01-14 03:36:14 pm

technomorph
Member
Registered: 2017-12-14
Posts: 96

Re: Encoding an Array that has Script Object instances

Dang after I just refactor my library to try to
Act more like a regular Class with instancing.

I went thru and refactored it all
So I created my Object in main code (using shared jersey)
And then passed that object on thru to the library.

I was still having problems serializing to XML.
It wasn't until I actually logged the error that I found out
It contained a NSURL which a Nono.
(Again after I had adopted all
My code to use NSURL paths rather than string paths!!!)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)