[vwnc] Mac OS X - ObjectiveC Connect questions

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

[vwnc] Mac OS X - ObjectiveC Connect questions

Rob Vens-2
Travis, (or anyone else)
I hope you can help me out with these questions.

Using "nsImage := Root.ObjectiveC.NSImage imageNamed: 'NSBonjour' " I
can get lots of images from the Mac runtime. I need to reuse these
NSImage objects (mostly NSImage constants, but also QuickLook preview
images) in Smalltalk.

1. Is there a reasonably performant way of getting NSImages into
Smalltalk images? It must be reasonably performant because I want to
show tiny preview icons in a file list containing pictures, which I
want to expand into a larger preview pane in another section of the
application window.

2. Should I take the Cairo route?

3. There seem to be some methods in NSImage as I fetch from the
ObjectiveC runtime that are not documented in the Apple Dev Center,
prefixed with IK_ (like IK_GIFRepresentation). Where do these methods
come from?

4. Could I use those to get Smalltalk images and how would I proceed?
Thanks for any help
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Mac OS X - ObjectiveC Connect questions

Rob Vens-2
For those interested, this is how far I got so far:

        str := ((Root.ObjectiveC.NSImage imageNamed: 'NSBonjour')
IK_PNGRepresentationWithCompressionFactor: 8) printString.
        str := (str copyFrom: 2 to: str size -1) copyWithout: Core.Character space.
        image := (ImageReader fromStream: (ByteArray fromHexString: str
lowerCase: true) readStream)

The fromStream: method in ImageReader is one that should be there but
I hacked it in like many others - you can do the same ;-)
However, I am still open to improved strategies. This one already lays
open the entire icon library on the Mac for you Mac developers, and
you can show your files and icons the Mac way.
Other questions below still unanswered, noticeably the IK_ prefixed
methods are still unexplained.

2009/10/30 Rob Vens <[hidden email]>:

> Travis, (or anyone else)
> I hope you can help me out with these questions.
>
> Using "nsImage := Root.ObjectiveC.NSImage imageNamed: 'NSBonjour' " I
> can get lots of images from the Mac runtime. I need to reuse these
> NSImage objects (mostly NSImage constants, but also QuickLook preview
> images) in Smalltalk.
>
> 1. Is there a reasonably performant way of getting NSImages into
> Smalltalk images? It must be reasonably performant because I want to
> show tiny preview icons in a file list containing pictures, which I
> want to expand into a larger preview pane in another section of the
> application window.
>
> 2. Should I take the Cairo route?
>
> 3. There seem to be some methods in NSImage as I fetch from the
> ObjectiveC runtime that are not documented in the Apple Dev Center,
> prefixed with IK_ (like IK_GIFRepresentation). Where do these methods
> come from?
>
> 4. Could I use those to get Smalltalk images and how would I proceed?
> Thanks for any help
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc