API feedback: who has tried the Cocoa API?
Posted: 18 November 2008 06:06 PM   [ Ignore ]
Administrator
RankRankRankRank
Total Posts:  106
Joined  2008-10-27

Espresso Engine Preview 2 is now available in everybody’s updater, so I am going to use this thread for feedback on the Cocoa APIs offered in it. For more info, see http://wiki.macrabbit.com/index/CocoaSugars/.

The Cocoa API currently provides text actions, file actions and custom items to use together with itemizer XML definitions. There is an example project available on the Wiki page that should clarify the interaction between XML and code for these features. Post here with problems, feature requests and anything else relating to the Cocoa API!

Profile
 
 
Posted: 19 November 2008 11:41 AM   [ Ignore ]   [ # 1 ]
Moderator
RankRankRankRank
Total Posts:  1252
Joined  2008-10-28

I’m definitely going to be digging into the Cocoa Sugars, since my interest lies in text actions far more than syntax definitions.  I’ll let you know any feedback I have.

One of the things that immediately struck me on browsing through the header files was that it would be nice to see some explanation for the prefixes for your classes.  I see some MRFunctionName, which makes sense (Mac Rabbit).  But there’s also SX, CE, and possibly others (don’t have time to look thoroughly this morning).  Would you mind explaining the logic of your function prefixes?  Obviously we can use them whatever they’re called, but I find that when I understand the logic behind the naming, the way to use it becomes a lot clearer.

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 19 November 2008 12:03 PM   [ Ignore ]   [ # 2 ]
Administrator
RankRankRankRank
Total Posts:  106
Joined  2008-10-27

Espresso is built in a very modular fashion, and contains several generic components that were split up into separate codebases. There should probably be a note explaining which prefixes are reserved. MR = MacRabbit as you say, SX = CoreSyntax, CE = CoreEdit, ES = Espresso.

Profile
 
 
Posted: 19 November 2008 01:03 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  1
Joined  2008-11-19

One thing I’m wondering, will there be a way to execute an action via some external event? I’m looking into making a color picker as sort of an excercise, but a non-modal interaction like that doesn’t really fit into the scheme of stuff currently in the API.

Looks really neat so far though!

- Jon

Profile
 
 
Posted: 23 November 2008 05:00 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  2
Joined  2008-11-19

I was looking at the ExampleSugar.xcodeproj provided on the wiki. As I was going through it I made a few notes that might be helpful to others. As is (aside from changing the $ESPRESSO_PATH in the Project settings) the project didn’t compile for me it gave me a linker error. To build the project I had to change the “Bundler Loader” setting in the “ExampleSugar.sugar” target build configuration. To change this: Get Info of the ExampleSugar.sugar target and change the “Bundler Loader” Setting to $ESPRESSO_PATH/Contents/MacOS/Espresso.  Can anyone verify if this is correct or if there is a better way to do this. I’m not an xcode build master.
—Tstrokes

Profile
 
 
Posted: 24 November 2008 01:42 PM   [ Ignore ]   [ # 5 ]
Administrator
RankRankRankRank
Total Posts:  106
Joined  2008-10-27

I’m going to check out the project again. It should have been set up so that the bundle loader is defined in terms of ESPRESSO_PATH. If this is some sort of Xcode limitation, I’ll update the instructions.

Profile
 
 
Posted: 24 November 2008 07:33 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  1
Joined  2008-11-24
Jan - 24 November 2008 01:42 PM
I’m going to check out the project again. It should have been set up so that the bundle loader is defined in terms of ESPRESSO_PATH. If this is some sort of Xcode limitation, I’ll update the instructions.

I edited the pbxproj directly, couldn’t get it to be happy via the GUI.

You might change ESPRESSO_PATH to be /Applications/Espresso.app by default, for those not developing espresso, that will be more expected.

:ExampleSugar.xcodeproj srlfgrep Espresso *
4 occurances:
project.pbxproj:                BUNDLE_LOADER $ESPRESSO_PATH/Contents/MacOS/Espresso;
2 occurances
project
.pbxproj:                ESPRESSO_PATH = /Applications/Espresso.app

looks like fun stuff!

Profile