The Trunk: Morphic-fbs.480.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-fbs.480.mcz

commits-2
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-fbs.480.mcz

==================== Summary ====================

Name: Morphic-fbs.480
Author: fbs
Time: 4 December 2010, 8:05:06.902 pm
UUID: fe5ea275-0f48-a54d-9a7e-7fe7d90386c8
Ancestors: Morphic-mha.479

Attempting to open a telemorphic user when you have no network connection results in a dialog asking you to Retry a name lookup (as a network check) or Give Up. If you Give Up, your image will spew out a never-ending stream of debuggers. This change allows the user to see that she needs to make a network connection, but also allows her to abort the operation. See http://bugs.squeak.org/view.php?id=7578.

=============== Diff against Morphic-mha.479 ===============

Item was changed:
  ----- Method: PasteUpMorph>>connectRemoteUserWithName:picture:andIPAddress: (in category 'world menu') -----
  connectRemoteUserWithName: nameStringOrNil picture: aFormOrNil andIPAddress: aStringOrNil
  "Prompt for the initials to be used to identify the cursor of a remote user, then create a cursor for that user and wait for a connection."
 
  | initials addr h |
  initials := nameStringOrNil.
  initials isEmptyOrNil ifTrue: [
  initials := UIManager default request: 'Enter initials for remote user''s cursor?'.
  ].
  initials isEmpty ifTrue: [^ self].  "abort"
  addr := 0.
  aStringOrNil isEmptyOrNil ifFalse: [
  addr := NetNameResolver addressForName: aStringOrNil timeout: 30
  ].
  addr = 0 ifTrue: [
  addr := NetNameResolver promptUserForHostAddress.
  ].
  addr = 0 ifTrue: [^ self].  "abort"
 
+ (RemoteHandMorph ensureNetworkConnected) ifFalse: [^ self]. "abort"
+
- RemoteHandMorph ensureNetworkConnected.
  h := RemoteHandMorph new userInitials: initials andPicture: aFormOrNil.
  self addHand: h.
  h changed.
  h startListening.
  h startTransmittingEventsTo: addr.
  !