home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / carsql.zip / carview.cpp < prev    next >
C/C++ Source or Header  |  1995-12-21  |  67KB  |  1,740 lines

  1. /*******************************************************************************
  2. * FILE NAME: CarView.cpp                                                       *
  3. *                                                                              *
  4. * DESCRIPTION:                                                                 *
  5. *   Class implementation of the class:                                         *
  6. *     CarView- Car salesperson application                                     *
  7. * ---------------------------------------------------------------------------- *
  8. * Warning: This file was generated by the VisualAge C++ Visual Builder.        *
  9. * Modifications to this source file will be lost when the part is regenerated. *
  10. *******************************************************************************/
  11. #ifndef _IFRAME_
  12. #include <iframe.hpp>
  13. #endif
  14.  
  15. #ifndef _IMCELCV_
  16. #include <imcelcv.hpp>
  17. #endif
  18.  
  19. #ifndef _ISTATTXT_
  20. #include <istattxt.hpp>
  21. #endif
  22.  
  23. #ifndef _IPOINT_
  24. #include <ipoint.hpp>
  25. #endif
  26.  
  27. #ifndef _IENTRYFD_
  28. #include <ientryfd.hpp>
  29. #endif
  30.  
  31. #ifndef _IPUSHBUT_
  32. #include <ipushbut.hpp>
  33. #endif
  34.  
  35. #ifndef _CAR_
  36. #include "Carv.hpp"
  37. #endif
  38.  
  39. #ifndef _IDSMCON_HPP_
  40. #include "idsmcon.hpp"
  41. #endif
  42.  
  43. #ifndef _ACCESSERROR_
  44. #include "ccssrror.hpp"
  45. #endif
  46.  
  47. #ifndef _IMSGBOX_
  48. #include <imsgbox.hpp>
  49. #endif
  50.  
  51. #ifndef _INOTIFEV_
  52. #include <inotifev.hpp>
  53. #endif
  54.  
  55. #ifndef _IOBSERVR_
  56. #include <iobservr.hpp>
  57. #endif
  58.  
  59. #ifndef _ISTDNTFY_
  60. #include <istdntfy.hpp>
  61. #endif
  62.  
  63. #ifndef _CARVIEW_
  64. #include "CarView.hpp"
  65. #endif
  66.  
  67. #ifndef _IVBDEFS_
  68. #include <ivbdefs.h>
  69. #endif
  70.  
  71. #ifndef _ITRACE_
  72. #include <itrace.hpp>
  73. #endif
  74.  
  75.  
  76. //*****************************************************************************
  77. // Class definition for CarViewConn3
  78. //*****************************************************************************
  79. class CarViewConn3 : public IObserver, public IStandardNotifier {
  80. public:
  81.    virtual  ~CarViewConn3(){};
  82.  
  83.    //---------------------------------------------------------------------------
  84.    // public member functions
  85.    //---------------------------------------------------------------------------
  86.    void initialize(CarView * aSource, IDatastore * aTarget)
  87.       {source = aSource; target = aTarget; enableNotification(); };
  88.  
  89. protected:
  90.    //---------------------------------------------------------------------------
  91.    // protected member functions
  92.    //---------------------------------------------------------------------------
  93.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  94.       {
  95.       if (anEvent.notificationId() == CarView::readyId)
  96.          {
  97.          IFUNCTRACE_DEVELOP();
  98.          ITRACE_DEVELOP(" firing connection : (ready) to Datastore1(connect))");
  99.          try {target->IDatastore::connect();}
  100.          catch (IException& exc) {};
  101.          }
  102.       return(*this);
  103.       };
  104.  
  105. private:
  106.    //---------------------------------------------------------------------------
  107.    // private member data
  108.    //---------------------------------------------------------------------------
  109.    CarView * source;
  110.    IDatastore * target;
  111.  
  112.  
  113. };   //CarViewConn3
  114.  
  115.  
  116. //*****************************************************************************
  117. // Class definition for CarViewConn2
  118. //*****************************************************************************
  119. class CarViewConn2 : public IObserver {
  120. public:
  121.    virtual  ~CarViewConn2(){};
  122.  
  123.    //---------------------------------------------------------------------------
  124.    // public member functions
  125.    //---------------------------------------------------------------------------
  126.    void initialize(Car * aSource, IEntryField * aTarget)
  127.       {source = aSource; target = aTarget; aligning = false; };
  128.    void setSource()
  129.       {
  130.       if (aligning==false) {
  131.          IFUNCTRACE_DEVELOP();
  132.          ITRACE_DEVELOP(" firing connection : Car1(make) to EntryField2(text))");
  133.          ITRACE_DEVELOP(" setting source from target ");
  134.          aligning = true;
  135.          try {source->setMake(target->text());}
  136.          catch (IException& exc) {};
  137.          aligning = false;
  138.          }
  139.       };
  140.    void setTarget()
  141.       {
  142.       if (aligning==false) {
  143.          IFUNCTRACE_DEVELOP();
  144.          ITRACE_DEVELOP(" firing connection : Car1(make) to EntryField2(text))");
  145.          ITRACE_DEVELOP(" setting target from source ");
  146.          aligning = true;
  147.          try {target->setText(source->make());}
  148.          catch (IException& exc) {};
  149.          aligning = false;
  150.          }
  151.       };
  152.  
  153. protected:
  154.    //---------------------------------------------------------------------------
  155.    // protected member functions
  156.    //---------------------------------------------------------------------------
  157.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  158.       {
  159.       if (anEvent.notificationId() == VBINITIALIZEID) setTarget();
  160.       if ((anEvent.notificationId() == Car::makeId) && (source == &anEvent.notifier()))
  161.          setTarget();  /* set target to source value */
  162.       else
  163.       if ((anEvent.notificationId() == IEntryField::textId) && (target == &anEvent.notifier()))
  164.          setSource();  /* set source to target value */
  165.       return(*this);
  166.       };
  167.  
  168. private:
  169.    //---------------------------------------------------------------------------
  170.    // private member data
  171.    //---------------------------------------------------------------------------
  172.    Car * source;
  173.    IEntryField * target;
  174.    Boolean aligning;
  175.  
  176.  
  177. };   //CarViewConn2
  178.  
  179.  
  180. //*****************************************************************************
  181. // Class definition for CarViewConn13
  182. //*****************************************************************************
  183. class CarViewConn13 : public IObserver {
  184. public:
  185.    virtual  ~CarViewConn13(){};
  186.  
  187.    //---------------------------------------------------------------------------
  188.    // public member functions
  189.    //---------------------------------------------------------------------------
  190.    void initialize(Car * aSource, IEntryField * aTarget)
  191.       {source = aSource; target = aTarget; aligning = false; };
  192.    void setSource()
  193.       {
  194.       if (aligning==false) {
  195.          IFUNCTRACE_DEVELOP();
  196.          ITRACE_DEVELOP(" firing connection : Car1(model) to EntryField3(text))");
  197.          ITRACE_DEVELOP(" setting source from target ");
  198.          aligning = true;
  199.          try {source->setModel(target->text());}
  200.          catch (IException& exc) {};
  201.          aligning = false;
  202.          }
  203.       };
  204.    void setTarget()
  205.       {
  206.       if (aligning==false) {
  207.          IFUNCTRACE_DEVELOP();
  208.          ITRACE_DEVELOP(" firing connection : Car1(model) to EntryField3(text))");
  209.          ITRACE_DEVELOP(" setting target from source ");
  210.          aligning = true;
  211.          try {target->setText(source->model());}
  212.          catch (IException& exc) {};
  213.          aligning = false;
  214.          }
  215.       };
  216.  
  217. protected:
  218.    //---------------------------------------------------------------------------
  219.    // protected member functions
  220.    //---------------------------------------------------------------------------
  221.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  222.       {
  223.       if (anEvent.notificationId() == VBINITIALIZEID) setTarget();
  224.       if ((anEvent.notificationId() == Car::modelId) && (source == &anEvent.notifier()))
  225.          setTarget();  /* set target to source value */
  226.       else
  227.       if ((anEvent.notificationId() == IEntryField::textId) && (target == &anEvent.notifier()))
  228.          setSource();  /* set source to target value */
  229.       return(*this);
  230.       };
  231.  
  232. private:
  233.    //---------------------------------------------------------------------------
  234.    // private member data
  235.    //---------------------------------------------------------------------------
  236.    Car * source;
  237.    IEntryField * target;
  238.    Boolean aligning;
  239.  
  240.  
  241. };   //CarViewConn13
  242.  
  243.  
  244. //*****************************************************************************
  245. // Class definition for CarViewConn4
  246. //*****************************************************************************
  247. class CarViewConn4 : public IObserver {
  248. public:
  249.    virtual  ~CarViewConn4(){};
  250.  
  251.    //---------------------------------------------------------------------------
  252.    // public member functions
  253.    //---------------------------------------------------------------------------
  254.    void initialize(Car * aSource, IEntryField * aTarget)
  255.       {source = aSource; target = aTarget; aligning = false; };
  256.    void setSource()
  257.       {
  258.       if (aligning==false) {
  259.          IFUNCTRACE_DEVELOP();
  260.          ITRACE_DEVELOP(" firing connection : Car1(category) to EntryField4(text))");
  261.          ITRACE_DEVELOP(" setting source from target ");
  262.          aligning = true;
  263.          try {source->setCategory(target->text());}
  264.          catch (IException& exc) {};
  265.          aligning = false;
  266.          }
  267.       };
  268.    void setTarget()
  269.       {
  270.       if (aligning==false) {
  271.          IFUNCTRACE_DEVELOP();
  272.          ITRACE_DEVELOP(" firing connection : Car1(category) to EntryField4(text))");
  273.          ITRACE_DEVELOP(" setting target from source ");
  274.          aligning = true;
  275.          try {target->setText(source->category());}
  276.          catch (IException& exc) {};
  277.          aligning = false;
  278.          }
  279.       };
  280.  
  281. protected:
  282.    //---------------------------------------------------------------------------
  283.    // protected member functions
  284.    //---------------------------------------------------------------------------
  285.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  286.       {
  287.       if (anEvent.notificationId() == VBINITIALIZEID) setTarget();
  288.       if ((anEvent.notificationId() == Car::categoryId) && (source == &anEvent.notifier()))
  289.          setTarget();  /* set target to source value */
  290.       else
  291.       if ((anEvent.notificationId() == IEntryField::textId) && (target == &anEvent.notifier()))
  292.          setSource();  /* set source to target value */
  293.       return(*this);
  294.       };
  295.  
  296. private:
  297.    //---------------------------------------------------------------------------
  298.    // private member data
  299.    //---------------------------------------------------------------------------
  300.    Car * source;
  301.    IEntryField * target;
  302.    Boolean aligning;
  303.  
  304.  
  305. };   //CarViewConn4
  306.  
  307.  
  308. //*****************************************************************************
  309. // Class definition for CarViewConn5
  310. //*****************************************************************************
  311. class CarViewConn5 : public IObserver {
  312. public:
  313.    virtual  ~CarViewConn5(){};
  314.  
  315.    //---------------------------------------------------------------------------
  316.    // public member functions
  317.    //---------------------------------------------------------------------------
  318.    void initialize(Car * aSource, IEntryField * aTarget)
  319.       {source = aSource; target = aTarget; aligning = false; };
  320.    void setSource()
  321.       {
  322.       if (aligning==false) {
  323.          IFUNCTRACE_DEVELOP();
  324.          ITRACE_DEVELOP(" firing connection : Car1(colour) to EntryField5(text))");
  325.          ITRACE_DEVELOP(" setting source from target ");
  326.          aligning = true;
  327.          try {source->setColour(target->text());}
  328.          catch (IException& exc) {};
  329.          aligning = false;
  330.          }
  331.       };
  332.    void setTarget()
  333.       {
  334.       if (aligning==false) {
  335.          IFUNCTRACE_DEVELOP();
  336.          ITRACE_DEVELOP(" firing connection : Car1(colour) to EntryField5(text))");
  337.          ITRACE_DEVELOP(" setting target from source ");
  338.          aligning = true;
  339.          try {target->setText(source->colour());}
  340.          catch (IException& exc) {};
  341.          aligning = false;
  342.          }
  343.       };
  344.  
  345. protected:
  346.    //---------------------------------------------------------------------------
  347.    // protected member functions
  348.    //---------------------------------------------------------------------------
  349.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  350.       {
  351.       if (anEvent.notificationId() == VBINITIALIZEID) setTarget();
  352.       if ((anEvent.notificationId() == Car::colourId) && (source == &anEvent.notifier()))
  353.          setTarget();  /* set target to source value */
  354.       else
  355.       if ((anEvent.notificationId() == IEntryField::textId) && (target == &anEvent.notifier()))
  356.          setSource();  /* set source to target value */
  357.       return(*this);
  358.       };
  359.  
  360. private:
  361.    //---------------------------------------------------------------------------
  362.    // private member data
  363.    //---------------------------------------------------------------------------
  364.    Car * source;
  365.    IEntryField * target;
  366.    Boolean aligning;
  367.  
  368.  
  369. };   //CarViewConn5
  370.  
  371.  
  372. //*****************************************************************************
  373. // Class definition for CarViewConn15
  374. //*****************************************************************************
  375. class CarViewConn15 : public IObserver {
  376. public:
  377.    virtual  ~CarViewConn15(){};
  378.  
  379.    //---------------------------------------------------------------------------
  380.    // public member functions
  381.    //---------------------------------------------------------------------------
  382.    void initialize(IEntryField * aSource, Car * aTarget)
  383.       {source = aSource; target = aTarget; aligning = false; };
  384.    void setSource()
  385.       {
  386.       if (aligning==false) {
  387.          IFUNCTRACE_DEVELOP();
  388.          ITRACE_DEVELOP(" firing connection : EntryField1(text) to Car1(license))");
  389.          ITRACE_DEVELOP(" setting source from target ");
  390.          aligning = true;
  391.          try {source->setText(target->license());}
  392.          catch (IException& exc) {};
  393.          aligning = false;
  394.          }
  395.       };
  396.    void setTarget()
  397.       {
  398.       if (aligning==false) {
  399.          IFUNCTRACE_DEVELOP();
  400.          ITRACE_DEVELOP(" firing connection : EntryField1(text) to Car1(license))");
  401.          ITRACE_DEVELOP(" setting target from source ");
  402.          aligning = true;
  403.          try {target->setLicense(source->text());}
  404.          catch (IException& exc) {};
  405.          aligning = false;
  406.          }
  407.       };
  408.  
  409. protected:
  410.    //---------------------------------------------------------------------------
  411.    // protected member functions
  412.    //---------------------------------------------------------------------------
  413.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  414.       {
  415.       if (anEvent.notificationId() == VBINITIALIZEID) setTarget();
  416.       if ((anEvent.notificationId() == IEntryField::textId) && (source == &anEvent.notifier()))
  417.          setTarget();  /* set target to source value */
  418.       else
  419.       if ((anEvent.notificationId() == Car::licenseId) && (target == &anEvent.notifier()))
  420.          setSource();  /* set source to target value */
  421.       return(*this);
  422.       };
  423.  
  424. private:
  425.    //---------------------------------------------------------------------------
  426.    // private member data
  427.    //---------------------------------------------------------------------------
  428.    IEntryField * source;
  429.    Car * target;
  430.    Boolean aligning;
  431.  
  432.  
  433. };   //CarViewConn15
  434.  
  435.  
  436. //*****************************************************************************
  437. // Class definition for CarViewConn6
  438. //*****************************************************************************
  439. class CarViewConn6 : public IObserver, public IStandardNotifier {
  440. public:
  441.    virtual  ~CarViewConn6(){};
  442.  
  443.    //---------------------------------------------------------------------------
  444.    // public member functions
  445.    //---------------------------------------------------------------------------
  446.    void initialize(IDatastore * aSource, Car * aTarget)
  447.       {source = aSource; target = aTarget; enableNotification(); };
  448.  
  449.    //---------------------------------------------------------------------------
  450.    // public member data
  451.    //---------------------------------------------------------------------------
  452.    static const INotificationId exceptionId;
  453.  
  454. protected:
  455.    //---------------------------------------------------------------------------
  456.    // protected member functions
  457.    //---------------------------------------------------------------------------
  458.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  459.       {
  460.       if (anEvent.notificationId() == IDatastore::connectedId)
  461.          {
  462.          IFUNCTRACE_DEVELOP();
  463.          ITRACE_DEVELOP(" firing connection : Datastore1(Connected) to Car1(retrieve))");
  464.          try {target->retrieve();}
  465.          catch (IException& exc) {notifyObservers(INotificationEvent(exceptionId, *this, true, IEventData((void *)&exc)));};
  466.          }
  467.       return(*this);
  468.       };
  469.  
  470. private:
  471.    //---------------------------------------------------------------------------
  472.    // private member data
  473.    //---------------------------------------------------------------------------
  474.    IDatastore * source;
  475.    Car * target;
  476.  
  477.  
  478. };   //CarViewConn6
  479.  
  480. const INotificationId CarViewConn6::exceptionId = "CarViewConn6::exceptionId";
  481.  
  482. //*****************************************************************************
  483. // Class definition for CarViewConn7
  484. //*****************************************************************************
  485. class CarViewConn7 : public IObserver, public IStandardNotifier {
  486. public:
  487.    virtual  ~CarViewConn7(){};
  488.  
  489.    //---------------------------------------------------------------------------
  490.    // public member functions
  491.    //---------------------------------------------------------------------------
  492.    void initialize(CarViewConn6 * aSource, accessError * aTarget)
  493.       {source = aSource; target = aTarget; enableNotification(); };
  494.  
  495. protected:
  496.    //---------------------------------------------------------------------------
  497.    // protected member functions
  498.    //---------------------------------------------------------------------------
  499.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  500.       {
  501.       if (anEvent.notificationId() == CarViewConn6::exceptionId)
  502.          {
  503.          IFUNCTRACE_DEVELOP();
  504.          ITRACE_DEVELOP(" firing connection : Conn6(exceptionOccurred) to accessError1(obtainSqlcode))");
  505.          try {target->obtainSqlcode(*(IException *) (anEvent.eventData().asUnsignedLong()));}
  506.          catch (IException& exc) {};
  507.          }
  508.       return(*this);
  509.       };
  510.  
  511. private:
  512.    //---------------------------------------------------------------------------
  513.    // private member data
  514.    //---------------------------------------------------------------------------
  515.    CarViewConn6 * source;
  516.    accessError * target;
  517.  
  518.  
  519. };   //CarViewConn7
  520.  
  521.  
  522. //*****************************************************************************
  523. // Class definition for CarViewConn23
  524. //*****************************************************************************
  525. class CarViewConn23 : public IObserver, public IStandardNotifier {
  526. public:
  527.    virtual  ~CarViewConn23(){};
  528.  
  529.    //---------------------------------------------------------------------------
  530.    // public member functions
  531.    //---------------------------------------------------------------------------
  532.    void initialize(IPushButton * aSource, Car * aTarget)
  533.       {source = aSource; target = aTarget; enableNotification(); };
  534.  
  535.    //---------------------------------------------------------------------------
  536.    // public member data
  537.    //---------------------------------------------------------------------------
  538.    static const INotificationId exceptionId;
  539.  
  540. protected:
  541.    //---------------------------------------------------------------------------
  542.    // protected member functions
  543.    //---------------------------------------------------------------------------
  544.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  545.       {
  546.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  547.          {
  548.          IFUNCTRACE_DEVELOP();
  549.          ITRACE_DEVELOP(" firing connection : PushButton3(buttonClickEvent) to Car1(update))");
  550.          try {target->update();}
  551.          catch (IException& exc) {notifyObservers(INotificationEvent(exceptionId, *this, true, IEventData((void *)&exc)));};
  552.          }
  553.       return(*this);
  554.       };
  555.  
  556. private:
  557.    //---------------------------------------------------------------------------
  558.    // private member data
  559.    //---------------------------------------------------------------------------
  560.    IPushButton * source;
  561.    Car * target;
  562.  
  563.  
  564. };   //CarViewConn23
  565.  
  566. const INotificationId CarViewConn23::exceptionId = "CarViewConn23::exceptionId";
  567.  
  568. //*****************************************************************************
  569. // Class definition for CarViewConn14
  570. //*****************************************************************************
  571. class CarViewConn14 : public IObserver, public IStandardNotifier {
  572. public:
  573.    virtual  ~CarViewConn14(){};
  574.  
  575.    //---------------------------------------------------------------------------
  576.    // public member functions
  577.    //---------------------------------------------------------------------------
  578.    void initialize(CarViewConn23 * aSource, accessError * aTarget)
  579.       {source = aSource; target = aTarget; enableNotification(); };
  580.  
  581. protected:
  582.    //---------------------------------------------------------------------------
  583.    // protected member functions
  584.    //---------------------------------------------------------------------------
  585.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  586.       {
  587.       if (anEvent.notificationId() == CarViewConn23::exceptionId)
  588.          {
  589.          IFUNCTRACE_DEVELOP();
  590.          ITRACE_DEVELOP(" firing connection : Conn23(exceptionOccurred) to accessError1(obtainSqlcode))");
  591.          try {target->obtainSqlcode(*(IException *) (anEvent.eventData().asUnsignedLong()));}
  592.          catch (IException& exc) {};
  593.          }
  594.       return(*this);
  595.       };
  596.  
  597. private:
  598.    //---------------------------------------------------------------------------
  599.    // private member data
  600.    //---------------------------------------------------------------------------
  601.    CarViewConn23 * source;
  602.    accessError * target;
  603.  
  604.  
  605. };   //CarViewConn14
  606.  
  607.  
  608. //*****************************************************************************
  609. // Class definition for CarViewConn16
  610. //*****************************************************************************
  611. class CarViewConn16 : public IObserver, public IStandardNotifier {
  612. public:
  613.    virtual  ~CarViewConn16(){};
  614.  
  615.    //---------------------------------------------------------------------------
  616.    // public member functions
  617.    //---------------------------------------------------------------------------
  618.    void initialize(IPushButton * aSource, Car * aTarget)
  619.       {source = aSource; target = aTarget; enableNotification(); };
  620.  
  621.    //---------------------------------------------------------------------------
  622.    // public member data
  623.    //---------------------------------------------------------------------------
  624.    static const INotificationId exceptionId;
  625.  
  626. protected:
  627.    //---------------------------------------------------------------------------
  628.    // protected member functions
  629.    //---------------------------------------------------------------------------
  630.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  631.       {
  632.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  633.          {
  634.          IFUNCTRACE_DEVELOP();
  635.          ITRACE_DEVELOP(" firing connection : PushButton4(buttonClickEvent) to Car1(del))");
  636.          try {target->del();}
  637.          catch (IException& exc) {notifyObservers(INotificationEvent(exceptionId, *this, true, IEventData((void *)&exc)));};
  638.          }
  639.       return(*this);
  640.       };
  641.  
  642. private:
  643.    //---------------------------------------------------------------------------
  644.    // private member data
  645.    //---------------------------------------------------------------------------
  646.    IPushButton * source;
  647.    Car * target;
  648.  
  649.  
  650. };   //CarViewConn16
  651.  
  652. const INotificationId CarViewConn16::exceptionId = "CarViewConn16::exceptionId";
  653.  
  654. //*****************************************************************************
  655. // Class definition for CarViewConn17
  656. //*****************************************************************************
  657. class CarViewConn17 : public IObserver, public IStandardNotifier {
  658. public:
  659.    virtual  ~CarViewConn17(){};
  660.  
  661.    //---------------------------------------------------------------------------
  662.    // public member functions
  663.    //---------------------------------------------------------------------------
  664.    void initialize(CarViewConn16 * aSource, accessError * aTarget)
  665.       {source = aSource; target = aTarget; enableNotification(); };
  666.  
  667. protected:
  668.    //---------------------------------------------------------------------------
  669.    // protected member functions
  670.    //---------------------------------------------------------------------------
  671.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  672.       {
  673.       if (anEvent.notificationId() == CarViewConn16::exceptionId)
  674.          {
  675.          IFUNCTRACE_DEVELOP();
  676.          ITRACE_DEVELOP(" firing connection : Conn16(exceptionOccurred) to accessError1(obtainSqlcode))");
  677.          try {target->obtainSqlcode(*(IException *) (anEvent.eventData().asUnsignedLong()));}
  678.          catch (IException& exc) {};
  679.          }
  680.       return(*this);
  681.       };
  682.  
  683. private:
  684.    //---------------------------------------------------------------------------
  685.    // private member data
  686.    //---------------------------------------------------------------------------
  687.    CarViewConn16 * source;
  688.    accessError * target;
  689.  
  690.  
  691. };   //CarViewConn17
  692.  
  693.  
  694. //*****************************************************************************
  695. // Class definition for CarViewConn18
  696. //*****************************************************************************
  697. class CarViewConn18 : public IObserver, public IStandardNotifier {
  698. public:
  699.    virtual  ~CarViewConn18(){};
  700.  
  701.    //---------------------------------------------------------------------------
  702.    // public member functions
  703.    //---------------------------------------------------------------------------
  704.    void initialize(IPushButton * aSource, accessError * aTarget)
  705.       {source = aSource; target = aTarget; enableNotification(); };
  706.  
  707. protected:
  708.    //---------------------------------------------------------------------------
  709.    // protected member functions
  710.    //---------------------------------------------------------------------------
  711.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  712.       {
  713.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  714.          {
  715.          IFUNCTRACE_DEVELOP();
  716.          ITRACE_DEVELOP(" firing connection : PushButton1(buttonClickEvent) to accessError1(resetSqlcode))");
  717.          try {target->resetSqlcode();}
  718.          catch (IException& exc) {};
  719.          }
  720.       return(*this);
  721.       };
  722.  
  723. private:
  724.    //---------------------------------------------------------------------------
  725.    // private member data
  726.    //---------------------------------------------------------------------------
  727.    IPushButton * source;
  728.    accessError * target;
  729.  
  730.  
  731. };   //CarViewConn18
  732.  
  733.  
  734. //*****************************************************************************
  735. // Class definition for CarViewConn19
  736. //*****************************************************************************
  737. class CarViewConn19 : public IObserver, public IStandardNotifier {
  738. public:
  739.    virtual  ~CarViewConn19(){};
  740.  
  741.    //---------------------------------------------------------------------------
  742.    // public member functions
  743.    //---------------------------------------------------------------------------
  744.    void initialize(IPushButton * aSource, Car * aTarget)
  745.       {source = aSource; target = aTarget; enableNotification(); };
  746.  
  747.    //---------------------------------------------------------------------------
  748.    // public member data
  749.    //---------------------------------------------------------------------------
  750.    static const INotificationId exceptionId;
  751.  
  752. protected:
  753.    //---------------------------------------------------------------------------
  754.    // protected member functions
  755.    //---------------------------------------------------------------------------
  756.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  757.       {
  758.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  759.          {
  760.          IFUNCTRACE_DEVELOP();
  761.          ITRACE_DEVELOP(" firing connection : PushButton1(buttonClickEvent) to Car1(add))");
  762.          try {target->add();}
  763.          catch (IException& exc) {notifyObservers(INotificationEvent(exceptionId, *this, true, IEventData((void *)&exc)));};
  764.          }
  765.       return(*this);
  766.       };
  767.  
  768. private:
  769.    //---------------------------------------------------------------------------
  770.    // private member data
  771.    //---------------------------------------------------------------------------
  772.    IPushButton * source;
  773.    Car * target;
  774.  
  775.  
  776. };   //CarViewConn19
  777.  
  778. const INotificationId CarViewConn19::exceptionId = "CarViewConn19::exceptionId";
  779.  
  780. //*****************************************************************************
  781. // Class definition for CarViewConn20
  782. //*****************************************************************************
  783. class CarViewConn20 : public IObserver, public IStandardNotifier {
  784. public:
  785.    virtual  ~CarViewConn20(){};
  786.  
  787.    //---------------------------------------------------------------------------
  788.    // public member functions
  789.    //---------------------------------------------------------------------------
  790.    void initialize(CarViewConn19 * aSource, accessError * aTarget)
  791.       {source = aSource; target = aTarget; enableNotification(); };
  792.  
  793. protected:
  794.    //---------------------------------------------------------------------------
  795.    // protected member functions
  796.    //---------------------------------------------------------------------------
  797.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  798.       {
  799.       if (anEvent.notificationId() == CarViewConn19::exceptionId)
  800.          {
  801.          IFUNCTRACE_DEVELOP();
  802.          ITRACE_DEVELOP(" firing connection : Conn19(exceptionOccurred) to accessError1(obtainSqlcode))");
  803.          try {target->obtainSqlcode(*(IException *) (anEvent.eventData().asUnsignedLong()));}
  804.          catch (IException& exc) {};
  805.          }
  806.       return(*this);
  807.       };
  808.  
  809. private:
  810.    //---------------------------------------------------------------------------
  811.    // private member data
  812.    //---------------------------------------------------------------------------
  813.    CarViewConn19 * source;
  814.    accessError * target;
  815.  
  816.  
  817. };   //CarViewConn20
  818.  
  819.  
  820. //*****************************************************************************
  821. // Class definition for CarViewConn29
  822. //*****************************************************************************
  823. class CarViewConn29 : public IObserver, public IStandardNotifier {
  824. public:
  825.    virtual  ~CarViewConn29(){};
  826.  
  827.    //---------------------------------------------------------------------------
  828.    // public member functions
  829.    //---------------------------------------------------------------------------
  830.    void initialize(IPushButton * aSource, accessError * aTarget)
  831.       {source = aSource; target = aTarget; enableNotification(); };
  832.  
  833. protected:
  834.    //---------------------------------------------------------------------------
  835.    // protected member functions
  836.    //---------------------------------------------------------------------------
  837.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  838.       {
  839.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  840.          {
  841.          IFUNCTRACE_DEVELOP();
  842.          ITRACE_DEVELOP(" firing connection : PushButton1(buttonClickEvent) to accessError1(checkSqlcode))");
  843.          try {target->checkSqlcode();}
  844.          catch (IException& exc) {};
  845.          }
  846.       return(*this);
  847.       };
  848.  
  849. private:
  850.    //---------------------------------------------------------------------------
  851.    // private member data
  852.    //---------------------------------------------------------------------------
  853.    IPushButton * source;
  854.    accessError * target;
  855.  
  856.  
  857. };   //CarViewConn29
  858.  
  859.  
  860. //*****************************************************************************
  861. // Class definition for CarViewConn30
  862. //*****************************************************************************
  863. class CarViewConn30 : public IObserver, public IStandardNotifier {
  864. public:
  865.    virtual  ~CarViewConn30(){};
  866.  
  867.    //---------------------------------------------------------------------------
  868.    // public member functions
  869.    //---------------------------------------------------------------------------
  870.    void initialize(accessError * aSource, IDatastore * aTarget)
  871.       {source = aSource; target = aTarget; enableNotification(); };
  872.  
  873. protected:
  874.    //---------------------------------------------------------------------------
  875.    // protected member functions
  876.    //---------------------------------------------------------------------------
  877.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  878.       {
  879.       if (anEvent.notificationId() == accessError::sqlcode_0Id)
  880.          {
  881.          IFUNCTRACE_DEVELOP();
  882.          ITRACE_DEVELOP(" firing connection : accessError1(sqlcode_0) to Datastore1(commit))");
  883.          try {target->IDatastore::commit();}
  884.          catch (IException& exc) {};
  885.          }
  886.       return(*this);
  887.       };
  888.  
  889. private:
  890.    //---------------------------------------------------------------------------
  891.    // private member data
  892.    //---------------------------------------------------------------------------
  893.    accessError * source;
  894.    IDatastore * target;
  895.  
  896.  
  897. };   //CarViewConn30
  898.  
  899.  
  900. //*****************************************************************************
  901. // Class definition for CarViewConn39
  902. //*****************************************************************************
  903. class CarViewConn39 : public IObserver, public IStandardNotifier {
  904. public:
  905.    virtual  ~CarViewConn39(){};
  906.  
  907.    //---------------------------------------------------------------------------
  908.    // public member functions
  909.    //---------------------------------------------------------------------------
  910.    void initialize(accessError * aSource, IMessageBox * aTarget)
  911.       {source = aSource; target = aTarget; enableNotification(); };
  912.  
  913. protected:
  914.    //---------------------------------------------------------------------------
  915.    // protected member functions
  916.    //---------------------------------------------------------------------------
  917.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  918.       {
  919.       if (anEvent.notificationId() == accessError::sqlcodeEventId)
  920.          {
  921.          IFUNCTRACE_DEVELOP();
  922.          ITRACE_DEVELOP(" firing connection : accessError1(sqlcodeEvent) to MessageBox1(customLogic))");
  923.          try {codeSnippet(&anEvent);}
  924.          catch (IException& exc) {};
  925.          }
  926.       return(*this);
  927.       };
  928.  
  929. private:
  930.    //---------------------------------------------------------------------------
  931.    // private member functions
  932.    //---------------------------------------------------------------------------
  933.    void codeSnippet(const INotificationEvent* event)
  934.       {
  935.       target->show(source->errorText(),IMessageBox::okButton | IMessageBox::moveable ) ;
  936.       };
  937.  
  938.    //---------------------------------------------------------------------------
  939.    // private member data
  940.    //---------------------------------------------------------------------------
  941.    accessError * source;
  942.    IMessageBox * target;
  943.  
  944.  
  945. };   //CarViewConn39
  946.  
  947.  
  948. //*****************************************************************************
  949. // Class definition for CarViewConn21
  950. //*****************************************************************************
  951. class CarViewConn21 : public IObserver, public IStandardNotifier {
  952. public:
  953.    virtual  ~CarViewConn21(){};
  954.  
  955.    //---------------------------------------------------------------------------
  956.    // public member functions
  957.    //---------------------------------------------------------------------------
  958.    void initialize(IPushButton * aSource, accessError * aTarget)
  959.       {source = aSource; target = aTarget; enableNotification(); };
  960.  
  961. protected:
  962.    //---------------------------------------------------------------------------
  963.    // protected member functions
  964.    //---------------------------------------------------------------------------
  965.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  966.       {
  967.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  968.          {
  969.          IFUNCTRACE_DEVELOP();
  970.          ITRACE_DEVELOP(" firing connection : PushButton2(buttonClickEvent) to accessError1(resetSqlcode))");
  971.          try {target->resetSqlcode();}
  972.          catch (IException& exc) {};
  973.          }
  974.       return(*this);
  975.       };
  976.  
  977. private:
  978.    //---------------------------------------------------------------------------
  979.    // private member data
  980.    //---------------------------------------------------------------------------
  981.    IPushButton * source;
  982.    accessError * target;
  983.  
  984.  
  985. };   //CarViewConn21
  986.  
  987.  
  988. //*****************************************************************************
  989. // Class definition for CarViewConn9
  990. //*****************************************************************************
  991. class CarViewConn9 : public IObserver, public IStandardNotifier {
  992. public:
  993.    virtual  ~CarViewConn9(){};
  994.  
  995.    //---------------------------------------------------------------------------
  996.    // public member functions
  997.    //---------------------------------------------------------------------------
  998.    void initialize(IPushButton * aSource, Car * aTarget)
  999.       {source = aSource; target = aTarget; enableNotification(); };
  1000.  
  1001.    //---------------------------------------------------------------------------
  1002.    // public member data
  1003.    //---------------------------------------------------------------------------
  1004.    static const INotificationId exceptionId;
  1005.  
  1006. protected:
  1007.    //---------------------------------------------------------------------------
  1008.    // protected member functions
  1009.    //---------------------------------------------------------------------------
  1010.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  1011.       {
  1012.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  1013.          {
  1014.          IFUNCTRACE_DEVELOP();
  1015.          ITRACE_DEVELOP(" firing connection : PushButton2(buttonClickEvent) to Car1(retrieve))");
  1016.          try {target->retrieve();}
  1017.          catch (IException& exc) {notifyObservers(INotificationEvent(exceptionId, *this, true, IEventData((void *)&exc)));};
  1018.          }
  1019.       return(*this);
  1020.       };
  1021.  
  1022. private:
  1023.    //---------------------------------------------------------------------------
  1024.    // private member data
  1025.    //---------------------------------------------------------------------------
  1026.    IPushButton * source;
  1027.    Car * target;
  1028.  
  1029.  
  1030. };   //CarViewConn9
  1031.  
  1032. const INotificationId CarViewConn9::exceptionId = "CarViewConn9::exceptionId";
  1033.  
  1034. //*****************************************************************************
  1035. // Class definition for CarViewConn10
  1036. //*****************************************************************************
  1037. class CarViewConn10 : public IObserver, public IStandardNotifier {
  1038. public:
  1039.    virtual  ~CarViewConn10(){};
  1040.  
  1041.    //---------------------------------------------------------------------------
  1042.    // public member functions
  1043.    //---------------------------------------------------------------------------
  1044.    void initialize(CarViewConn9 * aSource, accessError * aTarget)
  1045.       {source = aSource; target = aTarget; enableNotification(); };
  1046.  
  1047. protected:
  1048.    //---------------------------------------------------------------------------
  1049.    // protected member functions
  1050.    //---------------------------------------------------------------------------
  1051.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  1052.       {
  1053.       if (anEvent.notificationId() == CarViewConn9::exceptionId)
  1054.          {
  1055.          IFUNCTRACE_DEVELOP();
  1056.          ITRACE_DEVELOP(" firing connection : Conn9(exceptionOccurred) to accessError1(obtainSqlcode))");
  1057.          try {target->obtainSqlcode(*(IException *) (anEvent.eventData().asUnsignedLong()));}
  1058.          catch (IException& exc) {};
  1059.          }
  1060.       return(*this);
  1061.       };
  1062.  
  1063. private:
  1064.    //---------------------------------------------------------------------------
  1065.    // private member data
  1066.    //---------------------------------------------------------------------------
  1067.    CarViewConn9 * source;
  1068.    accessError * target;
  1069.  
  1070.  
  1071. };   //CarViewConn10
  1072.  
  1073.  
  1074. //*****************************************************************************
  1075. // Class definition for CarViewConn22
  1076. //*****************************************************************************
  1077. class CarViewConn22 : public IObserver, public IStandardNotifier {
  1078. public:
  1079.    virtual  ~CarViewConn22(){};
  1080.  
  1081.    //---------------------------------------------------------------------------
  1082.    // public member functions
  1083.    //---------------------------------------------------------------------------
  1084.    void initialize(IPushButton * aSource, accessError * aTarget)
  1085.       {source = aSource; target = aTarget; enableNotification(); };
  1086.  
  1087. protected:
  1088.    //---------------------------------------------------------------------------
  1089.    // protected member functions
  1090.    //---------------------------------------------------------------------------
  1091.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  1092.       {
  1093.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  1094.          {
  1095.          IFUNCTRACE_DEVELOP();
  1096.          ITRACE_DEVELOP(" firing connection : PushButton2(buttonClickEvent) to accessError1(checkSqlcode))");
  1097.          try {target->checkSqlcode();}
  1098.          catch (IException& exc) {};
  1099.          }
  1100.       return(*this);
  1101.       };
  1102.  
  1103. private:
  1104.    //---------------------------------------------------------------------------
  1105.    // private member data
  1106.    //---------------------------------------------------------------------------
  1107.    IPushButton * source;
  1108.    accessError * target;
  1109.  
  1110.  
  1111. };   //CarViewConn22
  1112.  
  1113.  
  1114. //*****************************************************************************
  1115. // Class definition for CarViewConn32
  1116. //*****************************************************************************
  1117. class CarViewConn32 : public IObserver, public IStandardNotifier {
  1118. public:
  1119.    virtual  ~CarViewConn32(){};
  1120.  
  1121.    //---------------------------------------------------------------------------
  1122.    // public member functions
  1123.    //---------------------------------------------------------------------------
  1124.    void initialize(IPushButton * aSource, IEntryField * aTarget)
  1125.       {source = aSource; target = aTarget; enableNotification(); };
  1126.  
  1127. protected:
  1128.    //---------------------------------------------------------------------------
  1129.    // protected member functions
  1130.    //---------------------------------------------------------------------------
  1131.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  1132.       {
  1133.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  1134.          {
  1135.          IFUNCTRACE_DEVELOP();
  1136.          ITRACE_DEVELOP(" firing connection : PushButton5(buttonClickEvent) to EntryField1(removeAll))");
  1137.          try {target->removeAll();}
  1138.          catch (IException& exc) {};
  1139.          }
  1140.       return(*this);
  1141.       };
  1142.  
  1143. private:
  1144.    //---------------------------------------------------------------------------
  1145.    // private member data
  1146.    //---------------------------------------------------------------------------
  1147.    IPushButton * source;
  1148.    IEntryField * target;
  1149.  
  1150.  
  1151. };   //CarViewConn32
  1152.  
  1153.  
  1154. //*****************************************************************************
  1155. // Class definition for CarViewConn33
  1156. //*****************************************************************************
  1157. class CarViewConn33 : public IObserver, public IStandardNotifier {
  1158. public:
  1159.    virtual  ~CarViewConn33(){};
  1160.  
  1161.    //---------------------------------------------------------------------------
  1162.    // public member functions
  1163.    //---------------------------------------------------------------------------
  1164.    void initialize(IPushButton * aSource, IEntryField * aTarget)
  1165.       {source = aSource; target = aTarget; enableNotification(); };
  1166.  
  1167. protected:
  1168.    //---------------------------------------------------------------------------
  1169.    // protected member functions
  1170.    //---------------------------------------------------------------------------
  1171.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  1172.       {
  1173.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  1174.          {
  1175.          IFUNCTRACE_DEVELOP();
  1176.          ITRACE_DEVELOP(" firing connection : PushButton5(buttonClickEvent) to EntryField2(removeAll))");
  1177.          try {target->removeAll();}
  1178.          catch (IException& exc) {};
  1179.          }
  1180.       return(*this);
  1181.       };
  1182.  
  1183. private:
  1184.    //---------------------------------------------------------------------------
  1185.    // private member data
  1186.    //---------------------------------------------------------------------------
  1187.    IPushButton * source;
  1188.    IEntryField * target;
  1189.  
  1190.  
  1191. };   //CarViewConn33
  1192.  
  1193.  
  1194. //*****************************************************************************
  1195. // Class definition for CarViewConn24
  1196. //*****************************************************************************
  1197. class CarViewConn24 : public IObserver, public IStandardNotifier {
  1198. public:
  1199.    virtual  ~CarViewConn24(){};
  1200.  
  1201.    //---------------------------------------------------------------------------
  1202.    // public member functions
  1203.    //---------------------------------------------------------------------------
  1204.    void initialize(IPushButton * aSource, IEntryField * aTarget)
  1205.       {source = aSource; target = aTarget; enableNotification(); };
  1206.  
  1207. protected:
  1208.    //---------------------------------------------------------------------------
  1209.    // protected member functions
  1210.    //---------------------------------------------------------------------------
  1211.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  1212.       {
  1213.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  1214.          {
  1215.          IFUNCTRACE_DEVELOP();
  1216.          ITRACE_DEVELOP(" firing connection : PushButton5(buttonClickEvent) to EntryField3(removeAll))");
  1217.          try {target->removeAll();}
  1218.          catch (IException& exc) {};
  1219.          }
  1220.       return(*this);
  1221.       };
  1222.  
  1223. private:
  1224.    //---------------------------------------------------------------------------
  1225.    // private member data
  1226.    //---------------------------------------------------------------------------
  1227.    IPushButton * source;
  1228.    IEntryField * target;
  1229.  
  1230.  
  1231. };   //CarViewConn24
  1232.  
  1233.  
  1234. //*****************************************************************************
  1235. // Class definition for CarViewConn25
  1236. //*****************************************************************************
  1237. class CarViewConn25 : public IObserver, public IStandardNotifier {
  1238. public:
  1239.    virtual  ~CarViewConn25(){};
  1240.  
  1241.    //---------------------------------------------------------------------------
  1242.    // public member functions
  1243.    //---------------------------------------------------------------------------
  1244.    void initialize(IPushButton * aSource, IEntryField * aTarget)
  1245.       {source = aSource; target = aTarget; enableNotification(); };
  1246.  
  1247. protected:
  1248.    //---------------------------------------------------------------------------
  1249.    // protected member functions
  1250.    //---------------------------------------------------------------------------
  1251.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  1252.       {
  1253.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  1254.          {
  1255.          IFUNCTRACE_DEVELOP();
  1256.          ITRACE_DEVELOP(" firing connection : PushButton5(buttonClickEvent) to EntryField4(removeAll))");
  1257.          try {target->removeAll();}
  1258.          catch (IException& exc) {};
  1259.          }
  1260.       return(*this);
  1261.       };
  1262.  
  1263. private:
  1264.    //---------------------------------------------------------------------------
  1265.    // private member data
  1266.    //---------------------------------------------------------------------------
  1267.    IPushButton * source;
  1268.    IEntryField * target;
  1269.  
  1270.  
  1271. };   //CarViewConn25
  1272.  
  1273.  
  1274. //*****************************************************************************
  1275. // Class definition for CarViewConn26
  1276. //*****************************************************************************
  1277. class CarViewConn26 : public IObserver, public IStandardNotifier {
  1278. public:
  1279.    virtual  ~CarViewConn26(){};
  1280.  
  1281.    //---------------------------------------------------------------------------
  1282.    // public member functions
  1283.    //---------------------------------------------------------------------------
  1284.    void initialize(IPushButton * aSource, IEntryField * aTarget)
  1285.       {source = aSource; target = aTarget; enableNotification(); };
  1286.  
  1287. protected:
  1288.    //---------------------------------------------------------------------------
  1289.    // protected member functions
  1290.    //---------------------------------------------------------------------------
  1291.    virtual IObserver & dispatchNotificationEvent(const INotificationEvent & anEvent)
  1292.       {
  1293.       if (anEvent.notificationId() == IPushButton::buttonClickId)
  1294.          {
  1295.          IFUNCTRACE_DEVELOP();
  1296.          ITRACE_DEVELOP(" firing connection : PushButton5(buttonClickEvent) to EntryField5(removeAll))");
  1297.          try {target->removeAll();}
  1298.          catch (IException& exc) {};
  1299.          }
  1300.       return(*this);
  1301.       };
  1302.  
  1303. private:
  1304.    //---------------------------------------------------------------------------
  1305.    // private member data
  1306.    //---------------------------------------------------------------------------
  1307.    IPushButton * source;
  1308.    IEntryField * target;
  1309.  
  1310.  
  1311. };   //CarViewConn26
  1312.  
  1313.  
  1314. #pragma export (CarView::readyId)
  1315. const INotificationId CarView::readyId = "CarView::readyId";
  1316.  
  1317. #pragma export (CarView::partWindowId)
  1318. unsigned long CarView::partWindowId = 0;
  1319.  
  1320. //------------------------------------------------------------------------------
  1321. // CarView :: defaultFramingSpec
  1322. //------------------------------------------------------------------------------
  1323. #pragma export (CarView::defaultFramingSpec())
  1324. const IRectangle CarView::defaultFramingSpec()
  1325. {
  1326.    return(IRectangle(IPoint(2, IWindow::desktopWindow()->size().height() - 47 - 256),ISize(482, 256)));
  1327. }
  1328.  
  1329.  
  1330. //------------------------------------------------------------------------------
  1331. // CarView :: defaultTitle
  1332. //------------------------------------------------------------------------------
  1333. #pragma export (CarView::defaultTitle())
  1334. IString CarView::defaultTitle()
  1335. {
  1336.    return("Car Record");
  1337. }
  1338.  
  1339.  
  1340. //------------------------------------------------------------------------------
  1341. // CarView :: CarView
  1342. //------------------------------------------------------------------------------
  1343. #pragma export (CarView::CarView(unsigned long, IWindow*, IWindow*, const IRectangle&, const IFrameWindow::Style&, const char*))
  1344. CarView::CarView(
  1345.       unsigned long id, 
  1346.       IWindow* parent, 
  1347.       IWindow* owner, 
  1348.       const IRectangle& rect, 
  1349.       const IFrameWindow::Style& style, 
  1350.       const char* title)
  1351.    : IFrameWindow((partWindowId) ? partWindowId : id, parent, owner, rect, style, title)
  1352. {
  1353.    partWindowId = (partWindowId) ? partWindowId : id;
  1354.    iMultiCellCanvas2 = new IMultiCellCanvas(
  1355.       IC_FRAME_CLIENT_ID, 
  1356.       this, 
  1357.       this, 
  1358.       IRectangle());
  1359.    iStaticText1 = new IStaticText(
  1360.       partWindowId+WNDOFFSET_CarView_StaticText1, 
  1361.       iMultiCellCanvas2, 
  1362.       iMultiCellCanvas2, 
  1363.       IRectangle(), 
  1364.       IStaticText::defaultStyle() | IControl::group | IControl::tabStop);
  1365.    iStaticText2 = new IStaticText(
  1366.       partWindowId+WNDOFFSET_CarView_StaticText2, 
  1367.       iMultiCellCanvas2, 
  1368.       iMultiCellCanvas2, 
  1369.       IRectangle(), 
  1370.       IStaticText::defaultStyle() | IControl::tabStop);
  1371.    iStaticText3 = new IStaticText(
  1372.       partWindowId+WNDOFFSET_CarView_StaticText3, 
  1373.       iMultiCellCanvas2, 
  1374.       iMultiCellCanvas2, 
  1375.       IRectangle(), 
  1376.       IStaticText::defaultStyle() | IControl::tabStop);
  1377.    iStaticText4 = new IStaticText(
  1378.       partWindowId+WNDOFFSET_CarView_StaticText4, 
  1379.       iMultiCellCanvas2, 
  1380.       iMultiCellCanvas2, 
  1381.       IRectangle(), 
  1382.       IStaticText::defaultStyle() | IControl::tabStop);
  1383.    iStaticText5 = new IStaticText(
  1384.       partWindowId+WNDOFFSET_CarView_StaticText5, 
  1385.       iMultiCellCanvas2, 
  1386.       iMultiCellCanvas2, 
  1387.       IRectangle(), 
  1388.       IStaticText::defaultStyle() | IControl::tabStop);
  1389.    iEntryField1 = new IEntryField(
  1390.       partWindowId+WNDOFFSET_CarView_EntryField1, 
  1391.       iMultiCellCanvas2, 
  1392.       iMultiCellCanvas2, 
  1393.       IRectangle(), 
  1394.       IEntryField::defaultStyle() | IControl::group | IControl::tabStop);
  1395.    iEntryField2 = new IEntryField(
  1396.       partWindowId+WNDOFFSET_CarView_EntryField2, 
  1397.       iMultiCellCanvas2, 
  1398.       iMultiCellCanvas2, 
  1399.       IRectangle(), 
  1400.       IEntryField::defaultStyle() | IControl::tabStop);
  1401.    iEntryField3 = new IEntryField(
  1402.       partWindowId+WNDOFFSET_CarView_EntryField3, 
  1403.       iMultiCellCanvas2, 
  1404.       iMultiCellCanvas2, 
  1405.       IRectangle(), 
  1406.       IEntryField::defaultStyle() | IControl::tabStop);
  1407.    iEntryField4 = new IEntryField(
  1408.       partWindowId+WNDOFFSET_CarView_EntryField4, 
  1409.       iMultiCellCanvas2, 
  1410.       iMultiCellCanvas2, 
  1411.       IRectangle(), 
  1412.       IEntryField::defaultStyle() | IControl::tabStop);
  1413.    iEntryField5 = new IEntryField(
  1414.       partWindowId+WNDOFFSET_CarView_EntryField5, 
  1415.       iMultiCellCanvas2, 
  1416.       iMultiCellCanvas2, 
  1417.       IRectangle(), 
  1418.       IEntryField::defaultStyle() | IControl::tabStop);
  1419.    iPushButton1 = new IPushButton(
  1420.       partWindowId+WNDOFFSET_CarView_PushButton1, 
  1421.       iMultiCellCanvas2, 
  1422.       iMultiCellCanvas2, 
  1423.       IRectangle(), 
  1424.       IPushButton::defaultStyle() | IControl::group | IControl::tabStop);
  1425.    iPushButton2 = new IPushButton(
  1426.       partWindowId+WNDOFFSET_CarView_PushButton2, 
  1427.       iMultiCellCanvas2, 
  1428.       iMultiCellCanvas2, 
  1429.       IRectangle(), 
  1430.       IPushButton::defaultStyle() | IControl::tabStop);
  1431.    iPushButton3 = new IPushButton(
  1432.       partWindowId+WNDOFFSET_CarView_PushButton3, 
  1433.       iMultiCellCanvas2, 
  1434.       iMultiCellCanvas2, 
  1435.       IRectangle(), 
  1436.       IPushButton::defaultStyle() | IControl::tabStop);
  1437.    iPushButton4 = new IPushButton(
  1438.       partWindowId+WNDOFFSET_CarView_PushButton4, 
  1439.       iMultiCellCanvas2, 
  1440.       iMultiCellCanvas2, 
  1441.       IRectangle());
  1442.    iPushButton5 = new IPushButton(
  1443.       partWindowId+WNDOFFSET_CarView_PushButton5, 
  1444.       iMultiCellCanvas2, 
  1445.       iMultiCellCanvas2, 
  1446.       IRectangle());
  1447.    iCar1 = new Car();
  1448.    iDatastore1 = new IDatastore();
  1449.    iaccessError1 = new accessError();
  1450.    iMessageBox1 = new IMessageBox(this);
  1451.  
  1452.    conn3 = new CarViewConn3();
  1453.    conn2 = new CarViewConn2();
  1454.    conn13 = new CarViewConn13();
  1455.    conn4 = new CarViewConn4();
  1456.    conn5 = new CarViewConn5();
  1457.    conn15 = new CarViewConn15();
  1458.    conn6 = new CarViewConn6();
  1459.    conn7 = new CarViewConn7();
  1460.    conn23 = new CarViewConn23();
  1461.    conn14 = new CarViewConn14();
  1462.    conn16 = new CarViewConn16();
  1463.    conn17 = new CarViewConn17();
  1464.    conn18 = new CarViewConn18();
  1465.    conn19 = new CarViewConn19();
  1466.    conn20 = new CarViewConn20();
  1467.    conn29 = new CarViewConn29();
  1468.    conn30 = new CarViewConn30();
  1469.    conn39 = new CarViewConn39();
  1470.    conn21 = new CarViewConn21();
  1471.    conn9 = new CarViewConn9();
  1472.    conn10 = new CarViewConn10();
  1473.    conn22 = new CarViewConn22();
  1474.    conn32 = new CarViewConn32();
  1475.    conn33 = new CarViewConn33();
  1476.    conn24 = new CarViewConn24();
  1477.    conn25 = new CarViewConn25();
  1478.    conn26 = new CarViewConn26();
  1479.  
  1480.    this->setFocus();
  1481.    this->setClient(iMultiCellCanvas2);
  1482.    iMultiCellCanvas2->addToCell(iStaticText1, 1, 1, 1, 1);
  1483.    iMultiCellCanvas2->addToCell(iStaticText2, 1, 2, 1, 1);
  1484.    iMultiCellCanvas2->addToCell(iStaticText3, 1, 3, 1, 1);
  1485.    iMultiCellCanvas2->addToCell(iStaticText4, 1, 4, 1, 1);
  1486.    iMultiCellCanvas2->addToCell(iStaticText5, 1, 5, 1, 1);
  1487.    iMultiCellCanvas2->addToCell(iEntryField1, 3, 1, 1, 1);
  1488.    iMultiCellCanvas2->addToCell(iEntryField2, 3, 2, 1, 1);
  1489.    iMultiCellCanvas2->addToCell(iEntryField3, 3, 3, 1, 1);
  1490.    iMultiCellCanvas2->addToCell(iEntryField4, 3, 4, 1, 1);
  1491.    iMultiCellCanvas2->addToCell(iEntryField5, 3, 5, 1, 1);
  1492.    iMultiCellCanvas2->addToCell(iPushButton1, 5, 5, 1, 1);
  1493.    iMultiCellCanvas2->addToCell(iPushButton2, 5, 2, 1, 1);
  1494.    iMultiCellCanvas2->addToCell(iPushButton3, 5, 3, 1, 1);
  1495.    iMultiCellCanvas2->addToCell(iPushButton4, 5, 4, 1, 1);
  1496.    iMultiCellCanvas2->addToCell(iPushButton5, 5, 1, 1, 1);
  1497.    iMultiCellCanvas2->setColumnWidth(3, IMultiCellCanvas::defaultCell().width(), true);
  1498.    iMultiCellCanvas2->setColumnWidth(6, IMultiCellCanvas::defaultCell().width(), false);
  1499.    iMultiCellCanvas2->setRowHeight(1, 0, true);
  1500.    iMultiCellCanvas2->setRowHeight(2, IMultiCellCanvas::defaultCell().height(), true);
  1501.    iMultiCellCanvas2->setRowHeight(3, IMultiCellCanvas::defaultCell().height(), true);
  1502.    iMultiCellCanvas2->setRowHeight(4, IMultiCellCanvas::defaultCell().height(), true);
  1503.    iMultiCellCanvas2->setRowHeight(5, IMultiCellCanvas::defaultCell().height(), true);
  1504.    iStaticText1->setAlignment(IStaticText::centerCenter);
  1505.    iStaticText1->setText("License");
  1506.    iStaticText1->setMinimumSize(ISize(84, 30));
  1507.    iStaticText2->setAlignment(IStaticText::centerCenter);
  1508.    iStaticText2->setText("Make");
  1509.    iStaticText2->setMinimumSize(ISize(84, 30));
  1510.    iStaticText3->setAlignment(IStaticText::centerCenter);
  1511.    iStaticText3->setText("Model");
  1512.    iStaticText3->setMinimumSize(ISize(84, 30));
  1513.    iStaticText4->setAlignment(IStaticText::centerCenter);
  1514.    iStaticText4->setText("Category");
  1515.    iStaticText4->setMinimumSize(ISize(84, 30));
  1516.    iStaticText5->setAlignment(IStaticText::centerCenter);
  1517.    iStaticText5->setText("Colour");
  1518.    iStaticText5->setMinimumSize(ISize(84, 30));
  1519.    iEntryField1->setText("123-ABC");
  1520.    iEntryField1->setMinimumSize(ISize(180, 29));
  1521.    iEntryField2->setMinimumSize(ISize(180, 29));
  1522.    iEntryField3->setMinimumSize(ISize(180, 29));
  1523.    iEntryField4->setMinimumSize(ISize(180, 29));
  1524.    iEntryField5->setMinimumSize(ISize(180, 29));
  1525.    iPushButton1->setText("Add");
  1526.    iPushButton1->setMinimumSize(ISize(98, 30));
  1527.    iPushButton2->setText("Retrieve");
  1528.    iPushButton2->setMinimumSize(ISize(98, 30));
  1529.    iPushButton3->setText("Update");
  1530.    iPushButton3->setMinimumSize(ISize(98, 30));
  1531.    iPushButton4->setText("Delete");
  1532.    iPushButton4->setMinimumSize(ISize(98, 30));
  1533.    iPushButton5->setText("Clear");
  1534.    iDatastore1->setAuthentication("PASSWORD");
  1535.    iDatastore1->IDatastore::setDatastoreName("DAXSAMP");
  1536.    iDatastore1->setUserName("USERID");
  1537.    iaccessError1->setSqlcode(0);
  1538. }     //end constructor
  1539.  
  1540.  
  1541. //------------------------------------------------------------------------------
  1542. // CarView :: ~CarView
  1543. //------------------------------------------------------------------------------
  1544. #pragma export (CarView::~CarView())
  1545. CarView::~CarView()
  1546. {
  1547.    conn3->stopHandlingNotificationsFor(*this);
  1548.    conn2->stopHandlingNotificationsFor(*iCar1);
  1549.    conn2->stopHandlingNotificationsFor(*iEntryField2);
  1550.    conn13->stopHandlingNotificationsFor(*iCar1);
  1551.    conn13->stopHandlingNotificationsFor(*iEntryField3);
  1552.    conn4->stopHandlingNotificationsFor(*iCar1);
  1553.    conn4->stopHandlingNotificationsFor(*iEntryField4);
  1554.    conn5->stopHandlingNotificationsFor(*iCar1);
  1555.    conn5->stopHandlingNotificationsFor(*iEntryField5);
  1556.    conn15->stopHandlingNotificationsFor(*iEntryField1);
  1557.    conn15->stopHandlingNotificationsFor(*iCar1);
  1558.    conn6->stopHandlingNotificationsFor(*iDatastore1);
  1559.    conn7->stopHandlingNotificationsFor(*conn6);
  1560.    conn23->stopHandlingNotificationsFor(*iPushButton3);
  1561.    conn14->stopHandlingNotificationsFor(*conn23);
  1562.    conn16->stopHandlingNotificationsFor(*iPushButton4);
  1563.    conn17->stopHandlingNotificationsFor(*conn16);
  1564.    conn18->stopHandlingNotificationsFor(*iPushButton1);
  1565.    conn19->stopHandlingNotificationsFor(*iPushButton1);
  1566.    conn20->stopHandlingNotificationsFor(*conn19);
  1567.    conn29->stopHandlingNotificationsFor(*iPushButton1);
  1568.    conn30->stopHandlingNotificationsFor(*iaccessError1);
  1569.    conn39->stopHandlingNotificationsFor(*iaccessError1);
  1570.    conn21->stopHandlingNotificationsFor(*iPushButton2);
  1571.    conn9->stopHandlingNotificationsFor(*iPushButton2);
  1572.    conn10->stopHandlingNotificationsFor(*conn9);
  1573.    conn22->stopHandlingNotificationsFor(*iPushButton2);
  1574.    conn32->stopHandlingNotificationsFor(*iPushButton5);
  1575.    conn33->stopHandlingNotificationsFor(*iPushButton5);
  1576.    conn24->stopHandlingNotificationsFor(*iPushButton5);
  1577.    conn25->stopHandlingNotificationsFor(*iPushButton5);
  1578.    conn26->stopHandlingNotificationsFor(*iPushButton5);
  1579.  
  1580.    delete conn3;
  1581.    delete conn2;
  1582.    delete conn13;
  1583.    delete conn4;
  1584.    delete conn5;
  1585.    delete conn15;
  1586.    delete conn6;
  1587.    delete conn7;
  1588.    delete conn23;
  1589.    delete conn14;
  1590.    delete conn16;
  1591.    delete conn17;
  1592.    delete conn18;
  1593.    delete conn19;
  1594.    delete conn20;
  1595.    delete conn29;
  1596.    delete conn30;
  1597.    delete conn39;
  1598.    delete conn21;
  1599.    delete conn9;
  1600.    delete conn10;
  1601.    delete conn22;
  1602.    delete conn32;
  1603.    delete conn33;
  1604.    delete conn24;
  1605.    delete conn25;
  1606.    delete conn26;
  1607.  
  1608.  
  1609.    delete iMultiCellCanvas2;
  1610.    delete iStaticText1;
  1611.    delete iStaticText2;
  1612.    delete iStaticText3;
  1613.    delete iStaticText4;
  1614.    delete iStaticText5;
  1615.    delete iEntryField1;
  1616.    delete iEntryField2;
  1617.    delete iEntryField3;
  1618.    delete iEntryField4;
  1619.    delete iEntryField5;
  1620.    delete iPushButton1;
  1621.    delete iPushButton2;
  1622.    delete iPushButton3;
  1623.    delete iPushButton4;
  1624.    delete iPushButton5;
  1625.    delete iCar1;
  1626.    delete iDatastore1;
  1627.    delete iaccessError1;
  1628.    delete iMessageBox1;
  1629. }
  1630.  
  1631. //------------------------------------------------------------------------------
  1632. // CarView :: initializePart
  1633. //------------------------------------------------------------------------------
  1634. #pragma export (CarView::initializePart())
  1635. CarView & CarView::initializePart()
  1636. {
  1637.    makeConnections();
  1638.    notifyObservers(INotificationEvent(readyId, *this));
  1639.    return *this;
  1640. }
  1641.  
  1642.  
  1643. //------------------------------------------------------------------------------
  1644. // CarView :: makeConnections
  1645. //------------------------------------------------------------------------------
  1646. #pragma export (CarView::makeConnections())
  1647. Boolean CarView::makeConnections()
  1648. {
  1649.    this->enableNotification();
  1650.    iMultiCellCanvas2->enableNotification();
  1651.    iStaticText1->enableNotification();
  1652.    iStaticText2->enableNotification();
  1653.    iStaticText3->enableNotification();
  1654.    iStaticText4->enableNotification();
  1655.    iStaticText5->enableNotification();
  1656.    iEntryField1->enableNotification();
  1657.    iEntryField2->enableNotification();
  1658.    iEntryField3->enableNotification();
  1659.    iEntryField4->enableNotification();
  1660.    iEntryField5->enableNotification();
  1661.    iPushButton1->enableNotification();
  1662.    iPushButton2->enableNotification();
  1663.    iPushButton3->enableNotification();
  1664.    iPushButton4->enableNotification();
  1665.    iPushButton5->enableNotification();
  1666.    iCar1->enableNotification();
  1667.    iDatastore1->enableNotification();
  1668.    iaccessError1->enableNotification();
  1669.  
  1670.    conn3->initialize(this, iDatastore1);
  1671.    conn3->handleNotificationsFor(*this);
  1672.    conn2->initialize(iCar1, iEntryField2);
  1673.    conn2->handleNotificationsFor(*iCar1);
  1674.    conn2->handleNotificationsFor(*iEntryField2);
  1675.    conn13->initialize(iCar1, iEntryField3);
  1676.    conn13->handleNotificationsFor(*iCar1);
  1677.    conn13->handleNotificationsFor(*iEntryField3);
  1678.    conn4->initialize(iCar1, iEntryField4);
  1679.    conn4->handleNotificationsFor(*iCar1);
  1680.    conn4->handleNotificationsFor(*iEntryField4);
  1681.    conn5->initialize(iCar1, iEntryField5);
  1682.    conn5->handleNotificationsFor(*iCar1);
  1683.    conn5->handleNotificationsFor(*iEntryField5);
  1684.    conn15->initialize(iEntryField1, iCar1);
  1685.    conn15->handleNotificationsFor(*iEntryField1);
  1686.    conn15->handleNotificationsFor(*iCar1);
  1687.    conn6->initialize(iDatastore1, iCar1);
  1688.    conn6->handleNotificationsFor(*iDatastore1);
  1689.    conn7->initialize(conn6, iaccessError1);
  1690.    conn7->handleNotificationsFor(*conn6);
  1691.    conn23->initialize(iPushButton3, iCar1);
  1692.    conn23->handleNotificationsFor(*iPushButton3);
  1693.    conn14->initialize(conn23, iaccessError1);
  1694.    conn14->handleNotificationsFor(*conn23);
  1695.    conn16->initialize(iPushButton4, iCar1);
  1696.    conn16->handleNotificationsFor(*iPushButton4);
  1697.    conn17->initialize(conn16, iaccessError1);
  1698.    conn17->handleNotificationsFor(*conn16);
  1699.    conn18->initialize(iPushButton1, iaccessError1);
  1700.    conn18->handleNotificationsFor(*iPushButton1);
  1701.    conn19->initialize(iPushButton1, iCar1);
  1702.    conn19->handleNotificationsFor(*iPushButton1);
  1703.    conn20->initialize(conn19, iaccessError1);
  1704.    conn20->handleNotificationsFor(*conn19);
  1705.    conn29->initialize(iPushButton1, iaccessError1);
  1706.    conn29->handleNotificationsFor(*iPushButton1);
  1707.    conn30->initialize(iaccessError1, iDatastore1);
  1708.    conn30->handleNotificationsFor(*iaccessError1);
  1709.    conn39->initialize(iaccessError1, iMessageBox1);
  1710.    conn39->handleNotificationsFor(*iaccessError1);
  1711.    conn21->initialize(iPushButton2, iaccessError1);
  1712.    conn21->handleNotificationsFor(*iPushButton2);
  1713.    conn9->initialize(iPushButton2, iCar1);
  1714.    conn9->handleNotificationsFor(*iPushButton2);
  1715.    conn10->initialize(conn9, iaccessError1);
  1716.    conn10->handleNotificationsFor(*conn9);
  1717.    conn22->initialize(iPushButton2, iaccessError1);
  1718.    conn22->handleNotificationsFor(*iPushButton2);
  1719.    conn32->initialize(iPushButton5, iEntryField1);
  1720.    conn32->handleNotificationsFor(*iPushButton5);
  1721.    conn33->initialize(iPushButton5, iEntryField2);
  1722.    conn33->handleNotificationsFor(*iPushButton5);
  1723.    conn24->initialize(iPushButton5, iEntryField3);
  1724.    conn24->handleNotificationsFor(*iPushButton5);
  1725.    conn25->initialize(iPushButton5, iEntryField4);
  1726.    conn25->handleNotificationsFor(*iPushButton5);
  1727.    conn26->initialize(iPushButton5, iEntryField5);
  1728.    conn26->handleNotificationsFor(*iPushButton5);
  1729.  
  1730.    conn2->setTarget();
  1731.    conn13->setTarget();
  1732.    conn4->setTarget();
  1733.    conn5->setTarget();
  1734.    conn15->setTarget();
  1735.    return true;
  1736. }
  1737.  
  1738.  
  1739.  
  1740.