home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / next / programm / 7069 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  2.8 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!natinst.com!news.dell.com!dellunix!uudell!pensoft!usenet
  2. From: ricardo@chuy (Ricardo Parada)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Trouble creating 3.0 applications
  5. Message-ID: <1992Nov5.220854.10390@pencom.com>
  6. Date: 5 Nov 92 22:08:54 GMT
  7. References: <1992Nov4.182700.18323@cs.ucla.edu>
  8. Sender: usenet@pencom.com (Usenet Pseudo User)
  9. Organization: Pencom Software
  10. Lines: 62
  11.  
  12. In article <1992Nov4.182700.18323@cs.ucla.edu> esky@marathon.cs.ucla.edu  
  13. (Eskandar Ensafi) writes:
  14. > Hi,
  15. > I converted some of my 2.1 apps to 3.0 and everything recompiled without  
  16. > problems.  However, when I tried to create a new app under 3.0, it  
  17. didn't work!   
  18. > This is what I did in a desperate attempt to create an app that would  
  19. run  
  20. > (NOTE: the following worked under 2.1 buit failed under 3.0):
  21. > 1) In IB, I made a new application and added a TextField to the window.
  22. > 2) I made the app a sublass of Application (MyApplication).
  23. > 3) I created an outlet called myText in MyApplication.
  24. > 4) I connected myText to the TextField in my window.
  25. > 5) I unparsed the .[hm] files and used Edit to modify them as follows:
  26. >     a) Added method - appDidInit:sender to "MyApplication.h"
  27. >     b) I added #import <appkit/TextField.h> to "MyApplication.m" and  
  28. also
  29. >        wrote the following code for the above method:
  30. >         - appDidInit:sender /* I also tried appDidInit:app */
  31. >           {
  32. >             [myText setStringValue:"This is a test."];
  33. >             /* I tried this code with and without [myText  
  34. display] */
  35. >             return self;
  36. >           }
  37. > 6) I used PB to make this into a project and compiled it.
  38. > 7) I discovered that 3.0 breaks all connections when you make a  
  39. subclass, so I  
  40. > had to reconnect "Quit" and "Hide" to - terminate: and - hide:  
  41. (obviously,  
  42. > nither button worked when my app was compiled).
  43. > 8) My text field did NOT display "This is a test." -- the appDidInit  
  44. method is  
  45. > not invoked for some reason.
  46. > Please help me figure out this problem and why I did not have the same  
  47. problems  
  48. > under 2.1 (e-mail preferred).
  49. > Thank You!
  50. > - Eskandar Ensafi, esky@marathon.cs.ucla.edu
  51. >         
  52.  
  53. Click on the Objects suitcase and then when it displays all your objects  
  54. click on the "File's Owner" object and then do Command-1 to display the  
  55. Attributes Inspector Panel for the File's Owner and make sure that it says  
  56. that the File's Owner is of the class MyApplication.  If it is of the  
  57. class Application or some other class then click on MyApplication so that  
  58. the correct class is intantiated in main().
  59.  
  60. --
  61. + Ricardo J. Parada
  62.   "Imagination is more important than knowledge!"..-- Albert Einstein
  63.   "NeXTSTEP is heaven!"............................-- Me
  64.   "It just works!".................................-- Steven P. Jobs
  65.