From: Marcelo A. <mar...@xf...> - 2008-08-04 15:17:18
|
Write (and implement) a category in ObjC or a new class and use it from RubyCocoa. 2008/8/4 Allison Newman <dem...@ma...>: > Hi everyone, > > OK, for those that don't religiously follow cocoadev, I just asked a question over there about how to stop my Mac from going to sleep. The response was not exactly... ideal from the point of view of a RubyCocoa developer. Apparently the answer is to use the following: > > UpdateSystemActivity(OverallAct); > > Which is a pure C function call, with the prototype being found in power.h > > My question is: How do I best go about integrating this into a RubyCocoa app. I have previously written C Extensions to Ruby, but that doesn't seem to be a particularly flexible/reuseable solution. What is considered the best way of accessing this type of code, or better yet, has anyone already exposed this functionality for RubyCocoa? > > Thanks in advance for any help/guidance. > > Alli > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |