• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unusual calling script problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unusual calling script problem


  • Subject: Re: Unusual calling script problem
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 23 Dec 2014 09:38:34 +1100


Thanks Shane, but I’m still struggling with trying to get my head around calling a Class, and calling an Instance.

All I know is that when I used…

set temp to current application's MainProcessingLoops's mainLoop:{mailManagerDesktopFolderPath, MailBoxProcessName, MailBoxStoreName, MailBoxReCycleName, ReCycleFlag, sayEveryErrorMessage, theMailManagerState, MMWorkingDate, theLastMidnight, ftpPrintFlag, serverFolder, dailyServerFolder, yearlyEmailOrdersServerFolder, didItPrint, serverBackupState, RunForOz, mainMessagesView, dailyName, theZeroedDate, dailyServerEmailStorage, theMailManagerErrorMessages}


It worked, (and most of the variables are properties), but when I use…

set temp to current application's OddsNSods's setPathToMMFolder:{mailManagerDesktopFolderPath} # Note this property is being used successfully in the method above


or

set temp to current application's OddsNSods's setPathToMMFolder:{my mailManagerDesktopFolderPath}
I get exactly the same result for both, an empty string return, even though the handler is being called, the handler is displaying the correct value to return immediately before the return, but zilch returns.

The called handler exit…

tell application "System Events" to display dialog "OddsNSods " & mailManagerDesktopFolderPath as text
return {mailManagerDesktopFolderPath as text}
end setPathToMMFolder:

You’ve taught me to use...

on SetAndPrintTextEdit()
current application's NSApp's delegate()'s SetAndPrintTextEdit:{}
end SetAndPrintTextEdit


when calling from a second script back to the main AppDelegate script (and I haven’t been able to test it), but as the above line seems illogical to me (how can I call a script ‘delegate’ when the script is called ‘AppDelegate’????), I’m at a complete loss as how to correctly call any of my 5 extra scripts from my ‘AppDelegate’ script, especially as the use of a ‘my’ instance seems to imply the need for calling as an instance method, with which I’ve spent most of the night trying to find a terminology that did not work.

I’ve pored over your eBooks, but I’m still in the dark.

Frustratedly yours

Brian Christmas



On 22 Dec 2014, at 9:29 pm, Shane Stanley <email@hidden> wrote:

On 22 Dec 2014, at 8:10 pm, Brian Christmas <email@hidden> wrote:

current application's OddsNSods's setPathToMMFolder:{my mailManagerDesktopFolderPath}

You're calling it as a class method, and then trying to use instance values within the handler. Let me repeat: you can't do that. Call it as an instance method.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
Do not post admin requests to the list. They will be ignored. applescriptobjc-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Unusual calling script problem
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Unusual calling script problem (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Unusual calling script problem
  • Next by Date: Re: Unusual calling script problem
  • Previous by thread: Re: Unusual calling script problem
  • Next by thread: Re: Unusual calling script problem
  • Index(es):
    • Date
    • Thread