Newton 2.x Q&A Category: Transports

Copyright © 1997 Newton, Inc. All Rights Reserved. Newton, Newton Technology, Newton Works, the Newton, Inc. logo, the Newton Technology logo, the Light Bulb logo and MessagePad are trademarks of Newton, Inc. and may be registered in the U.S.A. and other countries. Windows is a registered trademark of Microsoft Corp. All other trademarks and company names are the intellectual property of their respective owners.


For the most recent version of the Q&As on the World Wide Web, check the URL: http://www.newton-inc.com/dev/techinfo/qa/qa.htm
If you've copied this file locally,click here to go to the main Newton Q&A page.
This document was exported on 7/23/97.

Transports


Adding Child Views to a ProtoTransportHeader-based View (1/19/96)

Q: How can I add child views to a protoTransportHeader-based view?

A: First, you need to specify an addedHeight slot. The height of the transport header will be increased by this amount.

Next, add the following code to the viewSetupFormScript method of your protoTransportHeader view. This works around a bug with protoTransportHeader:

        self.stepChildren := SetUnion( self._proto.stepChildren,           self._proto._proto.stepChildren, true );


Finally, use NTK as you normally would to create the child views.


How to Omit Default Transport Preference Views (5/6/96)

Q: I want to omit some transport preferences that appear automatically. If I specify nil for the sendPrefs, outboxPrefs, or inboxPrefs slots in my transport preferences template, opening the slip throws -48204. What is going wrong?

A: The documentation states if you don't want to include sendPrefs, outboxPrefs, or inboxPrefs in your preferences dialog to set those slot to nil. Due to a bug in the cooresponding views for those preference items, -48204 is thrown when an attempt is made to open the views. This will be fixed in a future ROM.


How to Stop ProtoAddressPicker Memory (9/20/96)

Q: How do I stop protoAddressPicker from remembering the last people picked?

A: protoAddressPicker has a slot called useMemory that was left out of the documentation. If this slot is set to nil, the memory mechanism will be disabled.


ReceiveRequest Requests Incorrect After Using RemoveTempItems (10/1/96)

Q: If my transport calls the owner method RemoveTempItems when items are selected, the ReceiveRequest message sometimes has bogus request arguments (for instance, the cause is set to 'remote). Is this a known bug?

A: Yes, this is a known bug in RemoveTempItems. The call to RemoveTempItems does not clear out the cache of selected items correctly. This will be fixed in a future version of the Newton OS.

To workaround the problem, assume the following: If your transport's communications channel is not currently connected and you receive a request with its cause slot set to 'remote, assume that the cause slot is actually 'user and act accordingly. If you receive a request with its 'cause slot set to 'remote and your transport's communications channel is connected then perform the appropriate action for receiving remote items.


Filing Sent Entries in the Out Box (1/14/97)

Q: If a user has selected to file sent entries into a folder that has been deleted, my transport throws an exception when it calls ItemCompleted. Why is this problem occuring?

A: This is caused by a bug in ItemCompleted. To work around this, you should check to make sure the folder exists before calling ItemCompleted. If it does not exist, then set the transport's 'outboxFiling preference to nil. Here is a code example:
// This code assumes that the current receiver (self) is your transportif NOT GetFolderStr( :GetConfig( 'outboxFiling ) ) then    :SetConfig( 'outboxFiling, nil );


Documentation on the InboxFiling Preference (1/15/97)

Q: The documentation on In Box filing appears to be incorrect. It says that incoming items will be filed when they are received, however it appears that they are actually filed when they are read. Is the documentation incorrect?

A: Yes, the documentation is incorrect. Items are filed when they have been read, not when they have been received. The default for inboxFiling is nil.

Note that if the In/Out Box is not the backdrop application, filing does not occur until you close the In/Out Box. If the In/Out Box is the backdrop application, filing occurs when the user switches between the overview and the main view.


NEW: Adding an Auto Put Away Transport Preference (5/14/97)

Q: How do I add a transport preference to control whether received items are automatically put away?

A: For the item to be automatically put away, two conditions must exist. First, the application to which the item is put away must implement the AutoPutAway method. Second, the transport configuration slot 'dontAutoPutAway must be set to nil (or not be present). This configuration slot is new to Newton 2.1 OS and must contain the value nil or the value 'never. If nil, items will be put away automatically provided the application defined by the item's appSymbol slot has the AutoPutAway method. If 'never, items will not be automatically put away regardless of whether the application defined by the item's appSymbol slot implements the AutoPutaway method.

This new configuration preference is only used on Newton 2.1 OS and higher.