A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: OOP question

  1. #1
    Member
    Join Date
    May 2004
    Posts
    34

    OOP question

    hello,

    Is it bad form to have a class's constructor function call one of its methods (to handle some of the initialization). It seems to work ok, and i've never seen any documentation saying not to do it. Any thoughts?


    thanks!

  2. #2
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    I don't consider it bad form.

  3. #3
    Member
    Join Date
    May 2004
    Posts
    34
    glad to hear that. its definitely convenient, it just seemed dangerous using an object's methods before its completely instatiated.

  4. #4
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    Since you created the object, you know what those methods do, and what instance variables and methods they rely on. It's your responsibility to use only those methods which are safe to use. My two cents.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center