[squeak-dev] Squeak VM on iPad/IPhone gets open/GL rendering

John M McIntosh johnmci at smalltalkconsulting.com
Sun Sep 12 02:36:25 UTC 2010


Well ok, let's fix the problem with no touch events with the iPad eToy changes then as a first step. 
To do this.

Fetch the Platform source tree from squeakvm.org 
Visit the iOS folder and find the SqueakPureObjc.xcodeproj
double click that to open in xcode. 
Select the SqueakNoOGLIPhone project and build as debug against an iPad simulator. 

(a) At this point it should compile/link/install/run and you'll get a Pharo desktop. If not 
then I'm missing something in the platform tree. 

(b) Oh note you might get an ERROR because you have to choose between the CALayer and Open/GL 
render class and I wanted to ensure developers understood there was a choice to be made. Edit it to choose
the CALayer one since it's faster and is the same logic as you find in the OS-X post 4.x and pre 5.8


Ok, now examine the iPhone.image file, any closure based VM will open it. 

Open Monticello
Visit the http://www.squeaksource.com/iPhone
Consider the changes between the loaded 
iPhone-Events-John_M_McIntosh.8
and the broken
 iPhone-Events-John_M_McIntosh.11

Now to help debugging you can use 

ObjectiveCBridge callNSLogWithSmalltalkString: 'foo'.   

to turn a smalltalk string into a UTF8 NSString that you feed to the NSLog() so it appears 
on the system console, which is accessible from xCode for the device. 

BTW you can turn that into a shortcut method 
say 
'foo' sendToConsole

where you stick a sendToConsole method on String to do the ObjectiveCBridge call. 

The Event logic between Squeak and Pharo is different, I tried to re-adapt the changes from Bert 
back to Pharo, but somewhere I missed a piece so after you load  iPhone-Events-John_M_McIntosh.11 
then UI interaction stops working on the iOS system. 

This will get you comfortable with working with the image & VM in a VM developer setting, then 
we can think over what to do about the open/GL.


On 2010-09-11, at 4:31 PM, Kjell Godo wrote:

> I don't know Open/GL ES but I am game to help you.  I am a fast
> learner.  If you point me at what I need to know I will know it with
> your help.  If you can't find anybody better you can try me.
> 
> On Sat, Sep 11, 2010 at 3:37 PM, John M McIntosh

--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3829 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100911/a4d43b17/smime.bin


More information about the Squeak-dev mailing list