List Info

Thread: Re: I can't even run the sample programs (ObjC bridge)




Re: I can't even run the sample programs (ObjC bridge)
country flaguser name
United States
2007-04-14 13:00:25

Actually, I'm having similar problems when I'm trying to play with the ObjC integration,
though it may be unrelated as I seem to be getting a bit further. Io session follows:

Io 20070226
Io> ObjcBridge autoLookupClassNamesOn

==> ObjcBridge_0x64bf60:
autoLookupClassNamesOff = ObjcBridge_autoLookupClassNamesOff()
autoLookupClassNamesOn = ObjcBridge_autoLookupClassNamesOn()
classNamed = ObjcBridge_classNamed()
debugOff = ObjcBridge_debugOff()
debugOn = ObjcBridge_debugOn()
main = ObjcBridge_main()
newClassWithNameAndProto = ObjcBridge_newClassWithNameAndProto()

Io> [NSColor colorWithCalibratedRed:0.45 green:0.33 blue:0.1 alpha:1.0];

Exception: Lookup error, slot 'next' not found
---------
Coroutine pauseCurrentAndResumeSelf A4_Exception.io 160
Coroutine resumeParentCoroutine A4_Exception.io 176
Coroutine raiseException A4_Exception.io 253
Exception raise IoState_doCString 1
nil next ObjcBridge.io 12
Message makeColonUnary ObjcBridge.io 15
Message makeColonUnary ObjcBridge.io 43
Object squareBrackets doString 2

==> nil
Io>

I've been browsing through the bridge source and haven't found the implementation of
'Message next' anywhere, though that could easily be my lack of experience with Io. ObjC
messages with single parameters seem to be fine though! E.g.:

Io> tmp := [NSColor yellowColor];

==> Io2Objc_0x6bfab0:

Io>


--- In iolanguage%40yahoogroups.com">iolanguageyahoogroups.com, "victor NOAGBODJI&quot; <noagbodjivictor...> wrote:
&gt;
> I've tried a lot. Specially those from the Flux and OpenGL directory.
>
> The error message as I've said above is : Exception: Object does not respond
> to "Flux" or "OpenGL"
>

__._,_.___
.

__,_._,___
Re: Re: I can't even run the sample programs (ObjC bridge)
country flaguser name
France
2007-04-14 16:53:09
Le 14 avr. 07 à 20:00, oliver.mooney a écrit :
> Actually, I'm having similar problems when I'm trying
to play with  
> the ObjC integration,
> though it may be unrelated as I seem to be getting a
bit further.  
> Io session follows:
>
> Io 20070226
> Io> ObjcBridge autoLookupClassNamesOn
>
> ==> ObjcBridge_0x64bf60:
> autoLookupClassNamesOff =
ObjcBridge_autoLookupClassNamesOff()
> autoLookupClassNamesOn =
ObjcBridge_autoLookupClassNamesOn()
> classNamed = ObjcBridge_classNamed()
> debugOff = ObjcBridge_debugOff()
> debugOn = ObjcBridge_debugOn()
> main = ObjcBridge_main()
> newClassWithNameAndProto =
ObjcBridge_newClassWithNameAndProto()
>
> Io> [NSColor colorWithCalibratedRed:0.45 green:0.33
blue:0.1 alpha: 
> 1.0];
>
> Exception: Lookup error, slot 'next' not found
> ---------
Objc syntax has been broken from some time. However I have a
patch to  
fix it and improve border cases support 

I have another useful patch to avoid crossing the bridge
when you  
call an Io method from another Io method (both located in
Objc  
subclasses written in Io). This patch is specially
interesting  
because it reduces the number of automatic conversions (like
List to  
NSArray or String to NString)… they thend to get in your way
when the  
bridge is always crossed.

They are included in the following custom Io version:
<http:// 
svn.gna.org/viewcvs/etoile/branches/Io_unstable/ObjcBridge/&
gt; (based  
on 2007-02-17 release)
You may try to replace ObjcBridge.io in your Io version with
the one  
you can find at this url. Not sure it will work since
several Io  
releases were done in the meantime.

There are two test scripts testBracket.io and
testDirectMethodCall.io  
(unfinished) here: <http://sv
n.gna.org/viewcvs/etoile/branches/ 
Io_unstable/>

I haven't yet submitted them because I have tried to solve
without  
success a memory corruption bug which happens on all
invocations sent  
from Objc to Io. This is critical if you want to write Objc
delegate  
in Io code.

I can easily submit patches based on 2007-02-17.

Cheers
Quentin.

--
Quentin Mathé
qmatheclub-internet.fr



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://grou
ps.yahoo.com/group/iolanguage/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://
groups.yahoo.com/group/iolanguage/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:iolanguage-digest@yahoogroups.com 
    mailto:iolanguage-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    iolanguage-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )