• 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: newbie help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie help


  • Subject: Re: newbie help
  • From: Art Isbell <email@hidden>
  • Date: Mon, 3 Jul 2006 12:03:46 -1000

On Jul 3, 2006, at 9:01 AM, Theodore Petrosky wrote:

While adding a key to WO builder, it says that the
variable will be defined as:
protected string <stringname>;

however they come in as:
public string <stringname>;

If when you add a key in WO builder, you choose to add only an instance variable but no accessor methods, the variable will be declared "public" so that WO can access the variable directly. If you choose to create at least one accessor method, the variable will be declared "protected" because WO won't need to access the variable directly.


Personally, I never choose to create just an instance variable because, to me, that minimizes encapsulation and makes debugging difficult (there's no accessor method on which to set a break point). I also change the instance variable declaration to "private" so that access by any objects that aren't members of the current class must occur via accessor methods. This can minimize problems caused by accessing the instance variable directly.

I don't know enough java to understand the difference
and why there was a change from the version the books
talk about and the 5.3 that I downloaded.

It's really important to understand Java well. Learning the WO API is daunting enough, but if you aren't confident about Java, you'll have an even more difficult road ahead.


Aloha,
Art

_______________________________________________
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


  • Follow-Ups:
    • Re: newbie help
      • From: Ian Joyner <email@hidden>
References: 
 >newbie help (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re : newbie help
  • Next by Date: Re: Locations of resources ye again
  • Previous by thread: newbie help
  • Next by thread: Re: newbie help
  • Index(es):
    • Date
    • Thread