When I execute my app, I get this error message:
I’ve searched a whole day, but I didn’t find the bug. I would really appreciate if someone could help me out.
The app is actually a very simple one. It cycles thru every contact in Adium (an app like Microsoft Messenger) and places all the Online Contacts in a table view in a tab view item AND places ALL the contacts (wether they are on of offline) in another tab view item. This is the script:
-- Adium Checker.applescript
-- Adium Checker
-- Created by ief2 on 3/10/09.
-- Copyright 2009 __MyCompanyName__. All rights reserved.
global CAResult
on awake from nib theObject
CheckActiveApp("Adium")
UpdateAdiumInfo()
end awake from nib
on idle theObject
(*Add your script here.*)
end idle
on should quit after last window closed theObject
(*Add your script here.*)
end should quit after last window closed
(* ===== HANDLERS ===== *)
on CheckActiveApp(myApp)
set CAResult to false
tell application "System Events"
set AllActiveProcesses to (get name of every process)
end tell
set myCount to 1
repeat count AllActiveProcesses times
if item myCount of AllActiveProcesses is myApp then
set CAResult to true
end if
set myCount to myCount + 1
end repeat
end CheckActiveApp
on UpdateAdiumInfo()
-- NOT OFFLINE CONTACTS
if CAResult is true then -- als adium active is
tell application "Adium"
set NotOfflineContacts to every contact whose status type is not offline
set NotOffline to {}
repeat with i in NotOfflineContacts
tell i
set end of NotOffline to {display name, status type, name}
end tell
end repeat
end tell
set contents of table view "Not offline" of scroll view "not offline" of table view item "not offline" of table view 1 of window 1 to NotOffline
-- ALL CONTACTS
tell application "Adium"
set AllContacts to every contact
set AllContactsList to {}
repeat with z in AllContacts
tell i
set end of AllContactsList to {display name, name}
end tell
end repeat
end tell
set contents of table view "All Contacts" of scroll view "all contacts" of table view item "all contacts" of table view 1 of window 1 to AllContactsList
end if
-- ADIUM NOT ACTIVE
if CAResult is false then -- als adium inactive is
set contents of table view "Not offline" of scroll view "not offline" of table view item "not offline" of table view 1 of window 1 to {"Adium is not active", "", ""}
set contents of table view "All Contacts" of scroll view "all contacts" of table view item "all contacts" of table view 1 of window 1 to {"Adium is not active", ""}
end if
end UpdateAdiumInfo
Thanx in advance,
ief2
PS: I’m sorry for my English that, yes I know, sucks. But I’m only 14 years old and I’m from Belgium so I speak Dutch. If you can’t understand me, don’t hesitate to give me a reply on that.
PPS: this is the download link where you can find the XCode project folder: http://aghyour.com/verzenden/download.php?file=6645851deab2f24533195b431bff70b4
Model: iMac G5
Browser: Safari 531.9
Operating System: Mac OS X (10.5)