Squeak for handhelds - help!

Jarvis, Robert P. Jarvisb at timken.com
Thu Oct 28 17:33:36 UTC 1999


Look at the line in SoftwareCursor>>display which reads

	     [cursorLoc == savePoint] ifFalse:

The problem here is that you're sending ifFalse: to a Block, which isn't
happy about receiving ifFalse:.  If you change the braces to parentheses
this should work.

Bob Jarvis
The Timken Company

> -----Original Message-----
> From:	Dean_Swan at Mitel.COM [SMTP:Dean_Swan at Mitel.COM]
> Sent:	Thursday, October 28, 1999 12:48 PM
> To:	squeak at cs.uiuc.edu
> Subject:	Squeak for handhelds - help!
> 
> 
> Ok, I've spent enough time looking at the issues related to getting Squeak
> into
> a usable state on the Casio E-105, that I actually decided to start coding
> some
> of the needed additions, and ran quickly into some roadblocks.
> 
> First one is the previously reported problem(s) with the System Browser
> under
> MVC.
> 
> Second one is what I need help with....
> 
> I've added the following class:
> 
>      CursorWithMask subclass: #SoftwareCursor
>           instanceVariableNames: 'saveForm savePoint '
>           classVariableNames: ''
>           poolDictionaries: ''
>           category: 'Graphics-Display Objects'
> 
> , and this method, as a start to adding a Cursor displayed by Squeak
> (since
> WinCE doesn't do it):
> 
> display
>      "comment stating purpose of message"
> 
>      | cursorLoc |
>      cursorLoc _ Sensor cursorPoint.
>      [cursorLoc == savePoint] ifFalse:
>           [
>                saveForm isNil ifFalse: [saveForm displayAt: savePoint].
>                savePoint _ cursorLoc.
>                saveForm _ Form fromDisplay: (Rectangle origin: savePoint
> extent:
>  16 at 16).
>                self displayAt: cursorLoc.
>           ]
> 
> 
> Addmittedly, this method doesn't account for the 'maskForm', or 'offset',
> but I
> thought I'd start simple.
> 
> When I try the following code to test my new method, I get a walkback
> complaining about a Nonboolean Receiver.
> 
>      | a |
>      a _ SoftwareCursor new.
>      Cursor currentCursor: Cursor blank.
>      [Sensor anyButtonPressed] whileFalse: [ a display ].
>      Cursor currentCursor: Cursor normal.
> 
> Opening the debugger and going to 'SoftwareCursor>>display', 'isNil' in
> the
> 'saveForm isNil ifFalse: [ ....' line is highlighted.
> 
> I've tried messing with parentheses and brackets, with no luck.
> Evaluating
> 'saveForm isNil' in the debugger source pane returns 'true', and
> evaluating
> 'saveForm isNil class' returns 'True', which is a subclass of 'Boolean',
> so I
> don't understand why the VM is complaining with 'mustBeBoolean'.
> 
> 
> 
> Any explanation and/or guidance would be most appreciated.
> 
> 
> 
> After I get the software cursor issues worked out, my next step will be to
> create an 'InputSensor' substitute class that remaps the hardware buttons
> on the
> E-105 to the red, yellow, blue mouse buttons, and prevents 'mouse down'
> events
> from WinCE from being interpreted as clicks by Squeak.  I'm assuming then
> that
> creating an instance of my new sensor class and assigning it to 'Sensor'
> should
> make everything work?  Are there any places in the image that will be a
> problem
> for this approach?
> 
> 
> 
> Oh, I forgot to mention... All of the above was done working from a 2.5
> Win32 VM
> on WinNT or 95, with a 2.5 image through changeset #1447.
> 
> 
> 
> Thanks (in advance) for any help you can offer!
> 
> 
> 
>                                    -Dean Swan
> 
>                                    dean_swan at mitel.com
> 
> 
> 
> 
> 
> 





More information about the Squeak-dev mailing list