• 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: Accessing array from class [newbie]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing array from class [newbie]


  • Subject: Re: Accessing array from class [newbie]
  • From: Sherm Pendley <email@hidden>
  • Date: Sat, 31 Aug 2002 13:15:37 -0400

On Saturday, August 31, 2002, at 09:17 AM, Onar Vikingstad wrote:

I am trying to access/get an array from another class, but when I use [[[AccessControl init] alloc] getAccess] it just returns null.

You've got your alloc: and init: reversed. Alloc creates an object, and init initializes it - you have to call them in that order, because if you reverse them, you're trying to initialize an object that doesn't exist yet.

Try this instead:

[[[AccessControl alloc] init] getAccess];

sherm--
_______________________________________________
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.

  • Follow-Ups:
    • Re: Accessing array from class [newbie]
      • From: Onar Vikingstad <email@hidden>
References: 
 >Accessing array from class [newbie] (From: Onar Vikingstad <email@hidden>)

  • Prev by Date: Re: Tracking files the right way -- NeXT apps are less intuitive with worse HI?
  • Next by Date: Re: Accessing array from class [newbie]
  • Previous by thread: Accessing array from class [newbie]
  • Next by thread: Re: Accessing array from class [newbie]
  • Index(es):
    • Date
    • Thread