• 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
Returning an error within a scriptcommand
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Returning an error within a scriptcommand


  • Subject: Returning an error within a scriptcommand
  • From: Olivier <email@hidden>
  • Date: Wed, 13 Nov 2002 11:29:12 -0600

I have implemented scripting within my app and now i would like to
return valuable information when an error is encountered during a
script execution to allow for better debugging of script. My problem is
that i have no idea of how to return an error.

For exemple in a get command if i ask for an item that is out of bound,
how do i return that error

using keyvalue coding the method will look like, right now it returns
nil if the object isn't found, how can i return my own error

-(id)valueInCellsAtIndex:(unsigned)index
{
id returnValue = [[[Cell alloc] initWithRowIndex:index
columnIndex:0 container: self] autorelease];

return returnValue;
}


Olivier
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: iPhoto plugins
  • Next by Date: Re: [Bug?] Text rendering under Cocoa
  • Previous by thread: Omni frameworks: scripting
  • Next by thread: Main Menu Duplication Issue
  • Index(es):
    • Date
    • Thread