title: Cannot invoke initializer for type: with an argument list of type:
body: <p>Any suggestions on what I'm doing wrong?  When initializing an object, I can't seem to have an Array from another class as a parameter.  Here is my specific situation:</p>
  
  <p>I am trying to create a workout app.  The app contains several different workouts.  Each workout has it's own unique array of drills.  </p>
  
  <p>I have my code for WorkoutObj (This struct creates a workout and needs an NSArray workoutDrillSet) </p>
  
  <pre><code>import UIKit
  
  struct WorkoutObj {
  
  var workoutType: NSString
  var workoutNumber: Int
  var workoutDesc: NSString
  var workoutDuration: Int
  var workoutDrillSet: NSArray
  
  init(type: String, number: Int, duration: Int, desc: String, drillSet: NSArray)
  {
      workoutType = type
      workoutNumber = number
      workoutDuration = duration
      workoutDesc = desc
      workoutDrillSet = drillSet
  }
  
  }
  </code></pre>
  
  <p>Here are my DrillObjects (This struct is the object that the drill array will be comprised of - in others words, the drill array will consist of DrillObject1, DrillObject2, DrillObject3, etc) </p>
  
  <pre><code>import UIKit
  
  struct DrillObject {
  
  var drillDesc: NSString
  var drillDurationMin: Int
  var drillDurationSec: Int
  var drillHRZone: Int
  var drillEffort: Int
  var drillCadence: Int
  
  init(M: Int, S: Int, hRZone: Int, effort: Int, cadence: Int, name: NSString)
  {
      drillDesc = name
      drillDurationMin = M
      drillDurationSec = S
      drillHRZone = hRZone
      drillEffort = effort
      drillCadence = cadence
  }
  
  }
  </code></pre>
  
  <p>My next class is my EDrills Class.  This Class puts each DrillObject into an array.  The array created is called, arrayE1Drills</p>
  
  <pre><code>import UIKit
  
  class EDrills: NSObject {
  
  let dE1: DrillObject
  let dE2: DrillObject
  let dE3: DrillObject
  let dE4: DrillObject
  let dE5: DrillObject
  let dE6: DrillObject
  let dE7: DrillObject
  let dE8: DrillObject
  let dE9: DrillObject
  let dE10: DrillObject
  let dE11: DrillObject
  let dE12: DrillObject
  let dE13: DrillObject
  let dE14: DrillObject
  
  var arrayE1Drills : [DrillObject]
  
  
  override init()
  {
      dE1 = DrillObject ( M: 5, S: 0,  hRZone: 2, effort: 8, cadence: 95, name: "W/U Pedal Easy @ 90 RPM")
  
      dE2 = DrillObject ( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Stand")
      dE3 = DrillObject ( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Sit")
  
      dE4 = DrillObject ( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Stand")
      dE5 = DrillObject ( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Sit")
  
      dE6 = DrillObject ( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Stand")
      dE7 = DrillObject ( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Sit")
  
      dE8 = DrillObject ( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Stand")
      dE9 = DrillObject ( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Sit")
  
      dE10 = DrillObject( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Stand")
      dE11 = DrillObject( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Sit")
  
      dE12 = DrillObject( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Seated 80% left leg")
      dE13 = DrillObject( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Seated 80% right leg")
  
      dE14 = DrillObject( M: 0, S: 30, hRZone: 2, effort: 10, cadence: 95, name: "W/U Seated 80% left leg")
  
  
      arrayE1Drills =
      [dE1,
      dE2,
      dE3,
      dE4,
      dE5,
      dE6,
      dE7,
      dE8,
      dE9,
      dE10,
      dE11,
      dE12,
      dE13,
      dE14]
  
  
  }
  
  }
  </code></pre>
  
  <p>Finally, I have the Class EWorkouts.  This is a class that holds several workouts.  The e1 workoutObject needs to hold the arrayE1Drills of the EDrills class.  </p>
  
  <pre><code>import UIKit
  
  
  class EWorkouts {
  
  var e1: WorkoutObj
  var e2: WorkoutObj
  var e3: WorkoutObj
  var e4: WorkoutObj
  var e5: WorkoutObj
  
  var arrayEAll : [WorkoutObj]
  var arrayE0to45 : [WorkoutObj]
  var arrayE30to45: [WorkoutObj]
  var arrayE45to60: [WorkoutObj]
  var arrayEGreater45: [WorkoutObj]
  var arrayE0to60: [WorkoutObj]
  var arrayEGreater60: [WorkoutObj]
  
  var myEDrillsClass : EDrills
  
  
   init()
  {
      myEDrillsClass = EDrills()
      let myArray = myEDrillsClass.arrayE1Drills
  
  
      e1 = WorkoutObj(type: "E", number: 1, duration: 63, desc: "Rolling Hilly Course", drillSet: myArray)
  
   }
  </code></pre>
  
  <p>When Trying to load the arrayE1Drills into the workout, I get an error: <code>Cannot invoke initializer for type "WorkoutObjc" with an argument list of type (type: String, number: Int, duration: Int, desc: String, drillSet: [DrillObject])</code> </p>