• 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: Need help! cloning an object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help! cloning an object


  • Subject: Re: Need help! cloning an object
  • From: Michael Holtermann <email@hidden>
  • Date: Thu, 11 Aug 2005 10:17:11 +0200

Am Donnerstag, 11. August 2005 10:12 schrieb Amedeo Mantica:
> Hi, this is my problem
> I have this variable declarations

> public MyClass variable
> /** @TypeInfo MyClass */
> public NSMutableArray variableArray;
>
> and this code...
>
> variable=variableArray.objectAtIndex(i);
>
> I got an "INCOMPATIBLE TYPES" ERROR
> why this?
> variable and variableArray are in the same class

Yeah, but what type is "variable" of? String, Customer, Vector<List<String>>?

And, where do you get this error? The posted text is not a Java Exception
message.

private NSMutableArray array;
private Customer customer;
[...]
public void addToArray(Customer customer) {
	array.addObject(customer); //Not sure about the right method)
}

public Customer getFirstCustomer() {
	Customer customer = (Customer)array.objectAtIndex(0);
	return customer;
}

HTH, Michael.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Need help! cloning an object (From: Amedeo Mantica <email@hidden>)

  • Prev by Date: Need help! cloning an object
  • Next by Date: Re: Need help! cloning an object
  • Previous by thread: Need help! cloning an object
  • Next by thread: Re: Need help! cloning an object
  • Index(es):
    • Date
    • Thread