Friday, May 25, 2018

#1 2018-01-17 07:58:11 am

ame
Member
Registered: 2011-06-28
Posts: 166

Apple Event Error

Hi, anyone has experienced with this error:

AppleEvents: received mach msg which wasn't complex type as expected in getMemoryReference.

Xcode 9.2 and macOS 10.13.2 (High Sierra)

The message appears on a simple button that invokes Finder

Applescript:

on finestraPuliziaMostra_(sender)
       
       tell application "Finder"
           set numeroOriginali to count files in folder pPathOriginali
           set numeroAlteNormalizzate to count files in folder pPathAlteNormalizzate
           set numeroBasseNormalizzate to count files in folder pPathBasseNormalizzate
           set numeroGlobale to numeroOriginali + numeroAlteNormalizzate + numeroBasseNormalizzate
       end tell
       
       --pCounterOriginali's setStringValue:numeroOriginali
       --pCounterAlte's setStringValue:numeroAlteNormalizzate
       --pCounterBasse's setStringValue:numeroBasseNormalizzate
       --pCounterGlobale's setStringValue:numeroGlobale
       
       --pWindowMain's orderOut:me
       --pWindowPulizia's makeKeyAndOrderFront:me
   end finestraPuliziaMostra:

I have commented some line but error appear in the console.
Has anyone an idea? It's a bug or can generate troubles when the app is running?

Thanks in advance

Stefano

Model: MacBook Pro
Browser: Safari 604.4.7
Operating System: Mac OS X (10.13 Developer Beta 3)

Offline

 

#2 2018-01-18 12:50:18 am

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

Re: Apple Event Error

I've seen reports of it, but I'm yet to hear of it causing problems.


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

Offline

 

#3 2018-01-30 05:25:16 pm

robdut
Member
Registered: 2009-09-02
Posts: 302

Re: Apple Event Error

Hi All,

I filed a bug months ago and eventually heard back that there were others filed on the issue. It's still there. For me it is a problem because it fills up my logs - ok not life or death but it makes them much less readable. I also get complaints from users who worry about seeing this in console. I have substituted do shell script and OBJc methods in place of "tell application Finder" in most cases. But there is no substitute for "tell application someApp to do someThing." I wonder if this is even on the slate to be fixed. Does Apple care about AppleScript issues these days?

But no, it doesn't seem to cause any serious problems for me.

you could use something like:

Applescript:

set numOfFiles to do shell script "ls someDirectory | wc -l"

Cheers, Rob

Last edited by robdut (2018-01-30 05:29:11 pm)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)