Article View: comp.sys.next.programmer
Article #1325Re: Trouble creating 3.0 applications
From: Ricardo Parada
Date: Thu, 05 Nov 1992 22:08
Date: Thu, 05 Nov 1992 22:08
62 lines
2909 bytes
2909 bytes
In article <1992Nov4.182700.18323@cs.ucla.edu> esky@marathon.cs.ucla.edu
(Eskandar Ensafi) writes:
> Hi,
>
> I converted some of my 2.1 apps to 3.0 and everything recompiled without
> problems. However, when I tried to create a new app under 3.0, it
didn't work!
> This is what I did in a desperate attempt to create an app that would
run
> (NOTE: the following worked under 2.1 buit failed under 3.0):
>
> 1) In IB, I made a new application and added a TextField to the window.
> 2) I made the app a sublass of Application (MyApplication).
> 3) I created an outlet called myText in MyApplication.
> 4) I connected myText to the TextField in my window.
> 5) I unparsed the .[hm] files and used Edit to modify them as follows:
>
> a) Added method - appDidInit:sender to "MyApplication.h"
> b) I added #import <appkit/TextField.h> to "MyApplication.m" and
also
> wrote the following code for the above method:
>
> - appDidInit:sender /* I also tried appDidInit:app */
> {
> [myText setStringValue:"This is a test."];
> /* I tried this code with and without [myText
display] */
> return self;
> }
>
> 6) I used PB to make this into a project and compiled it.
> 7) I discovered that 3.0 breaks all connections when you make a
subclass, so I
> had to reconnect "Quit" and "Hide" to - terminate: and - hide:
(obviously,
> nither button worked when my app was compiled).
> 8) My text field did NOT display "This is a test." -- the appDidInit
method is
> not invoked for some reason.
>
> Please help me figure out this problem and why I did not have the same
problems
> under 2.1 (e-mail preferred).
>
> Thank You!
>
> - Eskandar Ensafi, esky@marathon.cs.ucla.edu
>
>
Click on the Objects suitcase and then when it displays all your objects
click on the "File's Owner" object and then do Command-1 to display the
Attributes Inspector Panel for the File's Owner and make sure that it says
that the File's Owner is of the class MyApplication. If it is of the
class Application or some other class then click on MyApplication so that
the correct class is intantiated in main().
--
+ Ricardo J. Parada
"Imagination is more important than knowledge!"..-- Albert Einstein
"NeXTSTEP is heaven!"............................-- Me
"It just works!".................................-- Steven P. Jobs
Technical Details
Message-ID:
<1992Nov5.220854.10390@pencom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!natinst.com!news.dell.com!dellunix!uudell!pensoft!usenetReferences:
<1992Nov4.182700.18323@cs.ucla.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!natinst.com!news.dell.com!dellunix!uudell!pensoft!usenet From: ricardo@chuy (Ricardo Parada) Newsgroups: comp.sys.next.programmer Subject: Re: Trouble creating 3.0 applications Message-ID: <1992Nov5.220854.10390@pencom.com> Date: 5 Nov 92 22:08:54 GMT References: <1992Nov4.182700.18323@cs.ucla.edu> Sender: usenet@pencom.com (Usenet Pseudo User) Organization: Pencom Software Lines: 62