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

  1. Path: sparky!uunet!know!hri.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!swrinde!emory!ogicse!reed!henson!n9240566
  2. From: n9240566@henson.cc.wwu.edu (Leif E. Harrison)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Writing data from a Window to a file (I/O under NeXTStep)...Help!
  5. Summary: Need help taking data from a Window and saving to a file
  6. Keywords: I/O, NeXTStep, Help,
  7. Message-ID: <1992Nov13.043739.13179@henson.cc.wwu.edu>
  8. Date: 13 Nov 92 04:37:39 GMT
  9. Organization: Western Washington University
  10. Lines: 29
  11.  
  12.  
  13.      How does one go about taking data that has been entered in a group
  14.  of objects in a window (say, 4 Forms, 1 Button, and 1 ScrollView) and
  15.  saving them out to a file?
  16.  
  17.      My current almost-working solution is to use NXWriteRootObject() and
  18.  a write method in a custom object that basically just does a [myWindow
  19.  write:myStream].  Using this method, however, I can't seem to get it to
  20.  use the correct filename...it uses the class name instead...?
  21.  
  22.      Would it be better to keep the data from the window in some sort of
  23.  structure and using NXWriteType()?
  24.  
  25.      I s'pose listing my code might help, but my system isn't anywhere
  26.  *near* a network, so I'd have to transcribe it by hand...
  27.      Perhaps tomorrow I'll try that...
  28.  
  29.      Oh!  And how the heck do you refer to individual Forms/FormCells
  30.  within a Window? I can't seem to understand how to get the id's of these
  31.  objects...I tried putting some id instance variables in my class, but I'm
  32.  not sure how it might "automagically" attach the forms to the id's in
  33.  my class (the Window id seems to do this?).  This may be connected to
  34.  my filename problem, as I'm using the StringValue from one of the Forms
  35.  as my filename...or at least trying to...
  36.  
  37.      Help?!?
  38.  
  39.     - Leif Harrison
  40.       n9240566@henson.cc.wwu.edu
  41.