• 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
I don't understand this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I don't understand this?


  • Subject: I don't understand this?
  • From: Brian Christmas <email@hidden>
  • Date: Fri, 11 Mar 2016 20:15:18 +1100

G’day scripters

Something is occurring in my ASObjC app  that I was not expecting.

I’m calling a handler from another handler, the first of which has the line at the end…

my performSelector:"runningLoop:" withObject:(missing value) afterDelay:mailManagerDelay


I expected the first handler to terminate at the last line, but instead it’s bouncing back to the line that’s calling the first handler, and progressing past the line that I expected to call a terminated handler.


The two handlers are below. I obviously don’t understand why the first handler is returning to the second. Could someone tell me if it’s possible to terminate the ‘return’  from the first handler, please, and how?

Regards

Santa

on runningLoopInitializer()
try
set p to 1
my fordEvent()
#
-- This routine gets Universal Time
set p to 2
set my resetSelector to false
set p to 3
if my interarchyActivator and ((current date) - (my ftpWatcherCaller) > 60) then
set my ftpWatcherCaller to current date
tell application "Finder"
try
set theCurrentState to read file (pathToDesktop & "ftp Downloads:AllTheftpData.dat" as text) as text
if (count of theCurrentState) > 0 then
try
if not (exists process "ftp Watcher") then tell application ":Applications:Mail Manager:ftp Watcher.app" to activate
end try
end if
end try
end tell
end if
on error errmsg
tell application "System Events" to display dialog "runningLoopInitializer error " & errmsg & " p = " & p
end try
my performSelector:"runningLoop:" withObject:(missing value) afterDelay:mailManagerDelay
end runningLoopInitializer

on endingLoopSix()
try
set p to 0
try
tell application "Finder"
if runForOz then my sayTheText:("1")
set theProcesses to name of processes as list
end tell
if "Mail Manager Loop Runner" is in theProcesses or "Mail Manager Item Printer" is in theProcesses then
say "true"
set my itemPrinterIsActuallyRunning to true
my runningLoopInitializer()
say 8 # The first handler is returning to here, which I did not expect. Why?
else
say "false"
end if


 _______________________________________________
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

  • Prev by Date: Fwd: Can I ask for help on this, please?
  • Next by Date: Re: Calling a handler from another script
  • Previous by thread: Fwd: Can I ask for help on this, please?
  • Next by thread: Re: Calling a handler from another script
  • Index(es):
    • Date
    • Thread