gettingstarted
[Top] [All Lists]

Re: Reading a stream

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Reading a stream
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Thu, 29 Jul 2004 17:26:52 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <BD2EE0E4 dot 3F4B%bheibert at verizon dot net>
At 5:14 PM -0500 7/29/04, Brian Heibert wrote:

I am trying to read it with this code:

  dim colorstream as textinputstream
  dim f as folderItem
  dim f1 as folderitem
  dim readstream as textinputstream
  dim stream1 as textoutputStream
  dim stream3 as binarystream

  redValue = readstream.readByte()

You haven't assigned readstream to anything, so it will be nil here, and so generate a NilObjectException.

Also, the parentheses on ReadByte are not needed.

  greenValue = readstream.readByte()
  blueValue = readstream.readByte()
  browser.backColor = RGB(redValue, greenValue, blueValue)


Now I get this method or property does not exist.

Where?  On redValue, I assume, since you don't seem to have declared that.

--
,------------------------------------------------------------------.
|    Joseph J. Strout           REAL Software, Inc.                |
|    joe at realsoftware dot com       http://www.realsoftware.com        |
`------------------------------------------------------------------'
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>