[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-mac
Subject:    [R-SIG-Mac] interesting R<->Cocoa side effects
From:       Byron Ellis <bellis () hsph ! harvard ! edu>
Date:       2004-07-30 7:45:52
Message-ID: 7B256F2A-E1FC-11D8-BD0D-000D93C24D64 () hsph ! harvard ! edu
[Download RAW message or body]

Hi all, I've been playing with the Cocoa interface that Stefano has 
been putting into R-devel, guided by Simon Urbanek's code 
(incidentally, the RGUI bundle code on Stefano's site while attempting 
to get the console prompt under 2.0.0) and I've discovered some 
interesting properties. In particular, if you take control of the main 
menu the Quartz device causes R to crash. The trouble seems to be that 
the various pointers (GetQuartzParameters and FocusOnConsole for 
instance) don't get installed at startup. I haven't tried the various 
editors and package installation windows yet.

On the plus side it did inspire me to spend some time implementing a 
Cocoa interface for the graphics devices that is 90% 
functional---there's a weird NSView sizing bug (that may actually be on 
the Cocoa side of things) and the fonts are completely wonky (huge, not 
to mention upside down) to work out, but otherwise things seem to be 
working just fine.

It seems like the best solution is to have a "cocoa_graph" bit to set 
that loads the Cocoa device bindings if set and otherwise sets up the 
appropriate Carbon bindings if not such that implementors don't have to 
take control of the graphics device. At any rate, I'll post a diff once 
I get the two problems above sorted out. I'll also be dumping my GUI 
into CVS, likely at the StatPaper site, for people to play. It works a 
little bit differently than Simon's and I'm also experimenting 
unabashedly with Panther facilities like SearchKit for the help system.

It must be the water in California that makes me want to write Cocoa 
code or something :-)

---
Byron Ellis (bellis@hsph.harvard.edu)
"Oook" -- The Librarian


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic