[MacRuby-devel] A little NSStatusBar app - Gmail Notifr

2010-11-19 Thread James Chen
Hi guys,

Gmail Notifr was originally written in RubyCocoa, which runs as a little
NSStatusBar app and checks your gmail feeds at specified intervals. I
started updating it to MacRuby last month.

Most changes were just simply updating method_arg1_arg2 to
method(arg1:arg2). Since this app saves account/password in Keychain, I also
extracted the keychain access code to a separate project. Still have some
difficulties on Security.framework's C methods. I also need to make the
growl notification work later.

I know many guys are interested in how to make menu bar (NSStatusBar)
application so I guess this in progress project might help a little. The
project repository is: https://github.com/ashchan/gmail-notifr , and the
keychain access wrapper project is here:
https://github.com/ashchan/macruby-keychain-wrapper .

Regarding the C methods calling, the keychain wrapper has to access this
API:

SecKeychainItemModifyAttributesAndData

It would be really great if anyone knows how to construct
SecKeychainAttributeList and other necessary parameters for this API and
offers some help.

---
James Chen
ashchan.com | @ashchan <http://twitter.com/ashchan>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] A little NSStatusBar app - Gmail Notifr

2010-11-19 Thread James Chen
Thank you for your help, Josh.

The project used to use a generated Security.bridgesupport, then I decided
to build it on the nightly build (0.8) with BS Preview. I found ^v parameter
is supported in 0.8 (but not in 0.7). The API we discussed require several
more complicated pointer parameters I haven't figured out how to construct
these parameters yet.

Fortunately to change an item's password in keychain, we can use a simpler
API, and that makes the app almost work  now. So I think I can update the
app logic first for now.

James

Sent from my iPhone

On 2010/11/20, at 4:39, Joshua Ballanco  wrote:

Hey James,

The C API for the Keychain is not annotated with a bridge support file by
default in SnowLeopard, so the first thing you'll need to do is install the
BridgeSupport preview. Then you need to know what to put in for the 4
parameters to the method call, which unfortunately is not documented at
developer.apple.com (at least, not that I could find). There is, however,
headerdoc for the method in
/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:

 /*!
 @function SecKeychainItemModifyAttributesAndData
 @abstract Updates an existing keychain item after changing its
attributes or data.
 @param itemRef A reference to the keychain item to modify.
 @param attrList The list of attributes to modify, along with their
new values. Pass NULL if you don't need to modify any attributes.
 @param length The length of the buffer pointed to by data.
 @param data Pointer to a buffer containing the data to store. Pass
NULL if you don't need to modify the data.
 @result A result code. See "Security Error Codes" (SecBase.h).
 @discussion The keychain item is written to the keychain's
permanent data store. If the keychain item has not previously been added to
a keychain, a call to the SecKeychainItemModifyContent function does nothing
and returns
 noErr.
 */

So, I'm not sure if that's what you're looking for. Hopefully it's at least
a start. The projects look awesome, and if/when I have some more time I'd
love to help you out :-)

Cheers,

Josh

On Fri, Nov 19, 2010 at 9:36 AM, James Chen  wrote:

> Hi guys,
>
> Gmail Notifr was originally written in RubyCocoa, which runs as a little
> NSStatusBar app and checks your gmail feeds at specified intervals. I
> started updating it to MacRuby last month.
>
> Most changes were just simply updating method_arg1_arg2 to
> method(arg1:arg2). Since this app saves account/password in Keychain, I also
> extracted the keychain access code to a separate project. Still have some
> difficulties on Security.framework's C methods. I also need to make the
> growl notification work later.
>
> I know many guys are interested in how to make menu bar (NSStatusBar)
> application so I guess this in progress project might help a little. The
> project repository is: https://github.com/ashchan/gmail-notifr , and the
> keychain access wrapper project is here:
> https://github.com/ashchan/macruby-keychain-wrapper .
>
> Regarding the C methods calling, the keychain wrapper has to access this
> API:
>
> SecKeychainItemModifyAttributesAndData
>
> It would be really great if anyone knows how to construct
> SecKeychainAttributeList and other necessary parameters for this API and
> offers some help.
>
> ---
> James Chen
> ashchan.com | @ashchan <http://twitter.com/ashchan>
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] A little NSStatusBar app - Gmail Notifr

2010-11-19 Thread James Chen
Eloy,

Yes both works.  Currently it depends on MacRuby 0.8 and BS preview (when
the app is ready for use if MacRuby is still not shipped with OSX, I believe
it could require both MacRuby and BridgeSupport).

Sent from my iPhone

On 2010/11/20, at 5:26, Eloy Duran  wrote:

I don't think you need the BS preview for that. I can create a BS file with:
$ gen_bridge_metadata -f Security -o Security.bridgesupport

On 19 nov 2010, at 20:39, Joshua Ballanco wrote:

Hey James,

The C API for the Keychain is not annotated with a bridge support file by
default in SnowLeopard, so the first thing you'll need to do is install the
BridgeSupport preview. Then you need to know what to put in for the 4
parameters to the method call, which unfortunately is not documented at
developer.apple.com (at least, not that I could find). There is, however,
headerdoc for the method in
/System/Library/Frameworks/Security.framework/Headers/SecKeychainItem.h:

 /*!
 @function SecKeychainItemModifyAttributesAndData
 @abstract Updates an existing keychain item after changing its
attributes or data.
 @param itemRef A reference to the keychain item to modify.
 @param attrList The list of attributes to modify, along with their
new values. Pass NULL if you don't need to modify any attributes.
 @param length The length of the buffer pointed to by data.
 @param data Pointer to a buffer containing the data to store. Pass
NULL if you don't need to modify the data.
 @result A result code. See "Security Error Codes" (SecBase.h).
 @discussion The keychain item is written to the keychain's
permanent data store. If the keychain item has not previously been added to
a keychain, a call to the SecKeychainItemModifyContent function does nothing
and returns
 noErr.
 */

So, I'm not sure if that's what you're looking for. Hopefully it's at least
a start. The projects look awesome, and if/when I have some more time I'd
love to help you out :-)

Cheers,

Josh

On Fri, Nov 19, 2010 at 9:36 AM, James Chen  wrote:

> Hi guys,
>
> Gmail Notifr was originally written in RubyCocoa, which runs as a little
> NSStatusBar app and checks your gmail feeds at specified intervals. I
> started updating it to MacRuby last month.
>
> Most changes were just simply updating method_arg1_arg2 to
> method(arg1:arg2). Since this app saves account/password in Keychain, I also
> extracted the keychain access code to a separate project. Still have some
> difficulties on Security.framework's C methods. I also need to make the
> growl notification work later.
>
> I know many guys are interested in how to make menu bar (NSStatusBar)
> application so I guess this in progress project might help a little. The
> project repository is: https://github.com/ashchan/gmail-notifr , and the
> keychain access wrapper project is here:
> https://github.com/ashchan/macruby-keychain-wrapper .
>
> Regarding the C methods calling, the keychain wrapper has to access this
> API:
>
> SecKeychainItemModifyAttributesAndData
>
> It would be really great if anyone knows how to construct
> SecKeychainAttributeList and other necessary parameters for this API and
> offers some help.
>
> ---
> James Chen
> ashchan.com | @ashchan <http://twitter.com/ashchan>
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] menu app in the login items

2011-01-25 Thread James Chen
Yes, the master branch is on MacRuby.

Sent from my iPhone

On 2011/01/25, at 23:18, Joshua Ballanco  wrote:

On Jan 25, 2011, at 2:54 PM, Joel Reymont wrote:

>  > Are there any examples of a MacRuby app that sits in the menu,
> TimeMachine and WiFi indicator style?
>

Check out Gmail Notifr: http://ashchan.com/projects/gmail-notifr
There is a MacRuby branch of the project which should answer your
questions.

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Concurrent SSL requests -> segfault

2011-04-05 Thread James Chen
I also had this issue when implementing https wrapped in NSOperation for
Gmail Notifr: https://gist.github.com/791984

Regards,
James Chen
ashchan.com | @ashchan <http://twitter.com/ashchan>


On Wed, Apr 6, 2011 at 5:43 AM, Andre Lewis  wrote:

> Hm. trying something similar within Xcode gives the following:
> https://gist.github.com/904634
>
> Looks like there's a hardcoded path to /Users/lrz/src/macruby-0.10 s
> omewhere.
>
>
> On Tue, Apr 5, 2011 at 12:37 PM, Andre Lewis wrote:
>
>> Think I found a bug with Net:HTTP on MacRuby 0.10. Code is here:
>> https://gist.github.com/904320. In a nutshell:
>>
>> * Multiple, concurrent SSL http requests generate a segfault
>> * Multiple, concurrent non-SSL http requests are OK
>> * Multiple, sequential SSL http requests are OK
>>
>> All the scenarios run fine on 1.9.2. Should I file a bug on trac?
>>
>> Andre
>>
>>
>
>
> --
> Scout Web Monitoring and Reporting ~ http://scoutapp.com
> blog: http://blog.scoutapp.com
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] get and set a checkbox in tableview

2011-04-29 Thread James Chen
In tableView:objectValueForColumn:row:, return ruby true or false should be
enough to make the checkbox checked or unchecked. Be sure to check the
tableColumn.identifier so that you're actually dealing with the checkbox
column.

Normally you don't have to do anything
in tableView:setObjectValueForColumn:row to check/uncheck the checkbox. When
the user clicks the checkbox, this method is called and you could persistant
the object value. Do check the tableView:setObjectValueForColumn:row too.

Here's some real snippet: http://bit.ly/m98G2P

Hope this helps.

---
James Chen
ashchan.com | @ashchan <http://twitter.com/ashchan>


On Sat, Apr 30, 2011 at 2:30 AM, Pavlos Vinieratos  wrote:

>
>
> Hello. I am writing a little app, and I have a table view with a checkbox
> cell and a text cell in each row.
>
> I implemented the data source, and in tableView:objectValueForColumn:row:,
> in the checkbox row I just return NSOnState or NSOffState, but when I run
> the app, the checkboxes don't get checked where they should.
> Also, when one is checked, how can I uncheck it through
> tableView:setObjectValueForColumn:row?
>
> thank you
>
>
> --
> Pavlos Vinieratos
>
>
>
> --
> Pavlos Vinieratos
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] macruby_deploy problem with app having space in name

2011-07-20 Thread James Chen
Hey guys,

I have an app with a space in the name. macruby_deploy fails to do its job:

$ macruby_deploy --compile --embed --bs Gmail\ Notifr.app
*** Deployment started
*** Embedding MacRuby.framework
*** Embed BridgeSupport system files
*** Fix install path of binaries
*** Fix identification name of libmacruby
/usr/bin/otool: can't open file: Gmail (No such file or directory)
/usr/bin/otool: can't open file:
Notifr.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/ruby/site_ruby/1.9.2/universal-darwin10.0/bigdecimal.bundle
(No such file or directory)
Error when executing `/usr/bin/otool -L Gmail
Notifr.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/ruby/site_ruby/1.9.2/universal-darwin10.0/bigdecimal.bundle'


Quoting the app name doesn't help.

(I could change the app name and the executable name in the package content,
use macruby_deploy on it then change back the name)

(On another machine I have nightly build of April installed, and that
macruby_deploy actually worked).

Thanks!

---
James Chen
ashchan.com | @ashchan <http://twitter.com/ashchan>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] macruby_deploy problem with app having space in name

2011-07-20 Thread James Chen
Wow, that would be great! Thanks Mark.

James

On Thu, Jul 21, 2011 at 12:53 PM, Mark Rada  wrote:

> Oopsie, I'll get that fixed in a few moments...unless it's fixed by the
> time I finish this email.
>
> Sent from my iDevice
>
> On 2011-07-20, at 23:30, James Chen  wrote:
>
> Hey guys,
>
> I have an app with a space in the name. macruby_deploy fails to do its job:
>
> $ macruby_deploy --compile --embed --bs Gmail\ Notifr.app
>
>
> *** Deployment started
>
> *** Embedding MacRuby.framework
>
> *** Embed BridgeSupport system files
>
> *** Fix install path of binaries
>
> *** Fix identification name of libmacruby
>
> /usr/bin/otool: can't open file: Gmail (No such file or directory)
>
>
> /usr/bin/otool: can't open file: 
> Notifr.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/ruby/site_ruby/1.9.2/universal-darwin10.0/bigdecimal.bundle
>  (No such file or directory)
>
>
> Error when executing `/usr/bin/otool -L Gmail 
> Notifr.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/ruby/site_ruby/1.9.2/universal-darwin10.0/bigdecimal.bundle'
>
>
>
> Quoting the app name doesn't help.
>
> (I could change the app name and the executable name in the package
> content, use macruby_deploy on it then change back the name)
>
> (On another machine I have nightly build of April installed, and that
> macruby_deploy actually worked).
>
> Thanks!
>
> ---
> James Chen
> <http://ashchan.com>ashchan.com | @ashchan <http://twitter.com/ashchan>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] macruby_deploy problem with app having space in name

2011-07-21 Thread James Chen
Mark,

I saw this is fixed on github. Installed the July 21 nightly build and tried
again. Now it has another error on lipo:

$ macruby_deploy --compile --embed --stdlib --bs Gmail\ Notifr.app
*** Deployment started
*** Embedding MacRuby.framework
*** Embed BridgeSupport system files
*** Fix install path of binaries
*** Fix identification name of libmacruby
*** Compiling files
/usr/bin/lipo: can't open input file: Gmail (No such file or directory)
Can't compile "Gmail
Notifr.app/Contents/Resources/AccountDetailController.rb"

Thanks in advance! :)

James

On Thu, Jul 21, 2011 at 12:53 PM, Mark Rada  wrote:

> Oopsie, I'll get that fixed in a few moments...unless it's fixed by the
> time I finish this email.
>
> Sent from my iDevice
>
> On 2011-07-20, at 23:30, James Chen  wrote:
>
> Hey guys,
>
> I have an app with a space in the name. macruby_deploy fails to do its job:
>
> $ macruby_deploy --compile --embed --bs Gmail\ Notifr.app
>
>
> *** Deployment started
>
> *** Embedding MacRuby.framework
>
> *** Embed BridgeSupport system files
>
> *** Fix install path of binaries
>
> *** Fix identification name of libmacruby
>
> /usr/bin/otool: can't open file: Gmail (No such file or directory)
>
>
> /usr/bin/otool: can't open file: 
> Notifr.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/ruby/site_ruby/1.9.2/universal-darwin10.0/bigdecimal.bundle
>  (No such file or directory)
>
>
> Error when executing `/usr/bin/otool -L Gmail 
> Notifr.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/ruby/site_ruby/1.9.2/universal-darwin10.0/bigdecimal.bundle'
>
>
>
> Quoting the app name doesn't help.
>
> (I could change the app name and the executable name in the package
> content, use macruby_deploy on it then change back the name)
>
> (On another machine I have nightly build of April installed, and that
> macruby_deploy actually worked).
>
> Thanks!
>
> ---
> James Chen
> <http://ashchan.com>ashchan.com | @ashchan <http://twitter.com/ashchan>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] MacRuby & MountainLion + what you can do to help the project

2012-02-18 Thread James Chen
Matt,

Great and excited to hear all these!

Regarding Xcode template support, dropping update < Xcode 4.3 would not be
a big issue. For 4.2 or lower the current template can be used.

Can't wait to see 0.11 and other updates!

Thanks a lot!

James

On Sat, Feb 18, 2012 at 5:54 PM, Matt Aimonetti wrote:

> Hey guys,
>
> A few of you asked me privately and publicly what was going on with
> MacRuby releases and what was the plan now that Apple clearly said that ARC
> is the future and that the GC will be deprecated in MountainLion.
>
> First off, I want to emphasis that even though ARC is the future for iOS
> and OS X, the GC won't go away anytime soon. In other words, MacRuby runs
> on MountainLion, so there is no real rush. But we need a plan and that plan
> probably means not using the GC anymore :p
>
> Regarding MacRuby's releases, Laurent promised to push 0.11 and well, we
> are waiting on him but it should happen any day 
> now;)
>
> Allan Delacruz, a designer friend of the project did a redesign of the
> site but we need some help to rebase and polish the content.
> Volunteers please stand up, Allan's branch is there:
> https://github.com/AllanD/MacRubyWebsite  Maybe someone can find some
> time over President's day to give us an updated website? Don't hesitate to
> email the mailing list about that.
>
> Xcode 4.3 It was reported that because Xcode is now a normal app, our
> templates aren't installed in the right place. We need a few volunteers to
> modify/test our installer to support the older and the newer Xcode. Or
> maybe we can just agree to only support the latest Xcode version (thoughts?)
>
> Extra ideas for volunteers:
>
>- Changelog for 0.11 release, let's help Laurent writing the release
>blog post by giving him a summarized changelog
>- Sublime Text 2 http://www.sublimetext.com/ is the new TextMate and I
>quickly looked at it and adding MacRuby support seems really
>straightforward (requires some Python scripting but hey, that's better than
>dealing with AppleScript :p). My challenge to you is to offer a
>MacRuby/Cocoa package.
>- Organize the various samples we have and add them to the website.
>- Update the tutorials (linking to the online version of my book is
>fine but original stuff should be encouraged, especially what I missed in
>the book)
>- Document the MacRuby internals and help new devs contribute feature
>and fix bugs.
>
> Summary: the sky isn't falling, we are all good but we need help and we
> need to grow the team of active contributors. Tell us what you are
> interested in helping with and let's get organized to push MacRuby to the
> next level.
>
> Thanks,
>
> - Matt
>
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] MacRuby & MountainLion + what you can do to help the project

2012-02-18 Thread James Chen
Yes Matt, I'm definitely willing to help. I will have a look later.

James

On Sat, Feb 18, 2012 at 6:26 PM, Matt Aimonetti wrote:

> Thanks James, the templates didn't change in 4.3, but the location where
> they live did.
> Are you volunteering to update our installer to cover 4.3? ;)
>
> Thanks in advance,
>
> - Matt
>
>
> On Sat, Feb 18, 2012 at 1:12 AM, James Chen  wrote:
>
>> Matt,
>>
>> Great and excited to hear all these!
>>
>> Regarding Xcode template support, dropping update < Xcode 4.3 would not
>> be a big issue. For 4.2 or lower the current template can be used.
>>
>> Can't wait to see 0.11 and other updates!
>>
>> Thanks a lot!
>>
>> James
>>
>> On Sat, Feb 18, 2012 at 5:54 PM, Matt Aimonetti 
>> wrote:
>>
>>> Hey guys,
>>>
>>> A few of you asked me privately and publicly what was going on with
>>> MacRuby releases and what was the plan now that Apple clearly said that ARC
>>> is the future and that the GC will be deprecated in MountainLion.
>>>
>>> First off, I want to emphasis that even though ARC is the future for iOS
>>> and OS X, the GC won't go away anytime soon. In other words, MacRuby runs
>>> on MountainLion, so there is no real rush. But we need a plan and that plan
>>> probably means not using the GC anymore :p
>>>
>>> Regarding MacRuby's releases, Laurent promised to push 0.11 and well, we
>>> are waiting on him but it should happen any day 
>>> now<https://twitter.com/lrz/status/170464894154584064>;)
>>>
>>> Allan Delacruz, a designer friend of the project did a redesign of the
>>> site but we need some help to rebase and polish the content.
>>> Volunteers please stand up, Allan's branch is there:
>>> https://github.com/AllanD/MacRubyWebsite  Maybe someone can find some
>>> time over President's day to give us an updated website? Don't hesitate to
>>> email the mailing list about that.
>>>
>>> Xcode 4.3 It was reported that because Xcode is now a normal app, our
>>> templates aren't installed in the right place. We need a few volunteers to
>>> modify/test our installer to support the older and the newer Xcode. Or
>>> maybe we can just agree to only support the latest Xcode version (thoughts?)
>>>
>>> Extra ideas for volunteers:
>>>
>>>- Changelog for 0.11 release, let's help Laurent writing the release
>>>blog post by giving him a summarized changelog
>>>- Sublime Text 2 http://www.sublimetext.com/ is the new TextMate and
>>>I quickly looked at it and adding MacRuby support seems really
>>>straightforward (requires some Python scripting but hey, that's better 
>>> than
>>>dealing with AppleScript :p). My challenge to you is to offer a
>>>MacRuby/Cocoa package.
>>>- Organize the various samples we have and add them to the website.
>>>- Update the tutorials (linking to the online version of my book is
>>>fine but original stuff should be encouraged, especially what I missed in
>>>the book)
>>>- Document the MacRuby internals and help new devs contribute
>>>feature and fix bugs.
>>>
>>> Summary: the sky isn't falling, we are all good but we need help and we
>>> need to grow the team of active contributors. Tell us what you are
>>> interested in helping with and let's get organized to push MacRuby to the
>>> next level.
>>>
>>> Thanks,
>>>
>>> - Matt
>>>
>>>
>>>
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>
>>>
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Xcode 4.3 move template files

2012-02-18 Thread James Chen
The user's shared folder for that is ~/Library/Application
Support/Developer/Shared/Xcode, but simply copying MacRuby's templates into
that folder doesn't seem to work.

James

On Sat, Feb 18, 2012 at 7:34 PM, Sean Mateus
wrote:

> Hallo Geoffrey,
> *
> *
> I believe the since Xcode is a signed application bundle, you can’t change
> its content!
> this must be the reason why it crashes! I still have no idea how we can
> add the Macruby templates,
> I hope some has a better idea! I hope there were a possibility just to put
> the templates in ~/Library/Application Support/Xcode/templates/
>
>
> Sean Mateus
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] MacRuby & MountainLion + what you can do to help the project

2012-02-18 Thread James Chen
It seems we can put templates in user's application support location
instead of /Develper:

~/Library/Application Support/Developer/Shared/Xcode

Still need to update template though. Copying current templates to that
location doesn't work.

James

On Sat, Feb 18, 2012 at 7:04 PM, James Chen  wrote:

> Yes Matt, I'm definitely willing to help. I will have a look later.
>
> James
>
>
> On Sat, Feb 18, 2012 at 6:26 PM, Matt Aimonetti 
> wrote:
>
>> Thanks James, the templates didn't change in 4.3, but the location where
>> they live did.
>> Are you volunteering to update our installer to cover 4.3? ;)
>>
>> Thanks in advance,
>>
>> - Matt
>>
>>
>> On Sat, Feb 18, 2012 at 1:12 AM, James Chen  wrote:
>>
>>> Matt,
>>>
>>> Great and excited to hear all these!
>>>
>>> Regarding Xcode template support, dropping update < Xcode 4.3 would not
>>> be a big issue. For 4.2 or lower the current template can be used.
>>>
>>> Can't wait to see 0.11 and other updates!
>>>
>>> Thanks a lot!
>>>
>>> James
>>>
>>> On Sat, Feb 18, 2012 at 5:54 PM, Matt Aimonetti >> > wrote:
>>>
>>>> Hey guys,
>>>>
>>>> A few of you asked me privately and publicly what was going on with
>>>> MacRuby releases and what was the plan now that Apple clearly said that ARC
>>>> is the future and that the GC will be deprecated in MountainLion.
>>>>
>>>> First off, I want to emphasis that even though ARC is the future for
>>>> iOS and OS X, the GC won't go away anytime soon. In other words, MacRuby
>>>> runs on MountainLion, so there is no real rush. But we need a plan and that
>>>> plan probably means not using the GC anymore :p
>>>>
>>>> Regarding MacRuby's releases, Laurent promised to push 0.11 and well,
>>>> we are waiting on him but it should happen any day 
>>>> now<https://twitter.com/lrz/status/170464894154584064>;)
>>>>
>>>> Allan Delacruz, a designer friend of the project did a redesign of the
>>>> site but we need some help to rebase and polish the content.
>>>> Volunteers please stand up, Allan's branch is there:
>>>> https://github.com/AllanD/MacRubyWebsite  Maybe someone can find some
>>>> time over President's day to give us an updated website? Don't hesitate to
>>>> email the mailing list about that.
>>>>
>>>> Xcode 4.3 It was reported that because Xcode is now a normal app, our
>>>> templates aren't installed in the right place. We need a few volunteers to
>>>> modify/test our installer to support the older and the newer Xcode. Or
>>>> maybe we can just agree to only support the latest Xcode version 
>>>> (thoughts?)
>>>>
>>>> Extra ideas for volunteers:
>>>>
>>>>- Changelog for 0.11 release, let's help Laurent writing the
>>>>release blog post by giving him a summarized changelog
>>>>- Sublime Text 2 http://www.sublimetext.com/ is the new TextMate
>>>>and I quickly looked at it and adding MacRuby support seems really
>>>>straightforward (requires some Python scripting but hey, that's better 
>>>> than
>>>>dealing with AppleScript :p). My challenge to you is to offer a
>>>>MacRuby/Cocoa package.
>>>>- Organize the various samples we have and add them to the website.
>>>>- Update the tutorials (linking to the online version of my book is
>>>>fine but original stuff should be encouraged, especially what I missed 
>>>> in
>>>>the book)
>>>>- Document the MacRuby internals and help new devs contribute
>>>>feature and fix bugs.
>>>>
>>>> Summary: the sky isn't falling, we are all good but we need help and we
>>>> need to grow the team of active contributors. Tell us what you are
>>>> interested in helping with and let's get organized to push MacRuby to the
>>>> next level.
>>>>
>>>> Thanks,
>>>>
>>>> - Matt
>>>>
>>>>
>>>>
>>>> ___
>>>> MacRuby-devel mailing list
>>>> [email protected]
>>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>>
>>>>
>>>
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>
>>>
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Xcode 4.3 move template files

2012-02-18 Thread James Chen
Watson,

Thanks for the hint!

By doing this, at lease creating 'MacRuby Application' has no problem.
Haven't checked other template yet.

Cheers,
James

On Sat, Feb 18, 2012 at 8:25 PM, Watson  wrote:

> Hi,
>
> If you want to move MacRuby's Templetes into User folder,
>
> 1. create "~/Library/Developer/Xcode/Templates/Application"
> 2. copy "misc/xcode4-templates/File Templates" and
> "misc/xcode4-templates/Project Templates" into above folder.
>
> However, I don't know whether move the rb_nibtool as same way of Templates.
>
>
> Thanks,
>
> 2012/2/18 James Chen :
> > The user's shared folder for that is ~/Library/Application
> > Support/Developer/Shared/Xcode, but simply copying MacRuby's templates
> into
> > that folder doesn't seem to work.
> >
> > James
> >
> > On Sat, Feb 18, 2012 at 7:34 PM, Sean Mateus <
> [email protected]>
> > wrote:
> >>
> >> Hallo Geoffrey,
> >>
> >> I believe the since Xcode is a signed application bundle, you can’t
> change
> >> its content!
> >> this must be the reason why it crashes! I still have no idea how we can
> >> add the Macruby templates,
> >> I hope some has a better idea! I hope there were a possibility just to
> put
> >> the templates in ~/Library/Application Support/Xcode/templates/
> >>
> >>
> >> Sean Mateus
> >>
> >>
> >> ___
> >> MacRuby-devel mailing list
> >> [email protected]
> >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >>
> >
> >
> > ___
> > MacRuby-devel mailing list
> > [email protected]
> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Including Bridge Support into App

2012-02-24 Thread James Chen
Kevin,

Even with the -bs option, MacRuby app might still not be able to load the
bridge support preview properly on 10.6. Here's what I do for Gmail Notifr:

dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation
load_bridge_support_file
"#{dir_path}/BridgeSupport/Security.bridgesupport" if
NSAppKitVersionNumber < 1138


1138 is the version number for 10.7, on which it doesn't have problem.

The above lines are put in rb_main.rb file. You can see the full file if
interested:

https://github.com/ashchan/gmail-notifr/blob/master/rb_main.rb

Hope this works for you.

Cheers,
James

On Sat, Feb 25, 2012 at 4:56 AM, Kevin Colyar  wrote:

> Anyone know if there's a way to include Bridge Support Preview 3 into my
> MacRuby app so users before 10.7 doing need to install Bridge
> Support separately?
>
> --
> Kevin Colyar
> http://kevin.colyar.net
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Including Bridge Support into App

2012-02-24 Thread James Chen
Sorry Kevin,

The above code was actually loading extra bridge support file (Security in
this case). I have misunderstood your question.

Guys I'm very sorry about this interruption.

James

On Sat, Feb 25, 2012 at 8:19 AM, James Chen  wrote:

> Kevin,
>
> Even with the -bs option, MacRuby app might still not be able to load the
> bridge support preview properly on 10.6. Here's what I do for Gmail Notifr:
>
>
> dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation
>
>
> load_bridge_support_file "#{dir_path}/BridgeSupport/Security.bridgesupport" 
> if NSAppKitVersionNumber < 1138
>
>
> 1138 is the version number for 10.7, on which it doesn't have problem.
>
> The above lines are put in rb_main.rb file. You can see the full file if
> interested:
>
>  https://github.com/ashchan/gmail-notifr/blob/master/rb_main.rb
>
> Hope this works for you.
>
> Cheers,
> James
>
> On Sat, Feb 25, 2012 at 4:56 AM, Kevin Colyar  wrote:
>
>> Anyone know if there's a way to include Bridge Support Preview 3 into my
>> MacRuby app so users before 10.7 doing need to install Bridge
>> Support separately?
>>
>> --
>> Kevin Colyar
>> http://kevin.colyar.net
>>
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Including Bridge Support into App

2012-02-26 Thread James Chen
Kevin,

Did you try creating an empty app with --bs option? For a long time I also
saw segfaults from several stdlibs (libssh for example). So it's hard to
say if it's the preview that caused your problem or other libs.

James

On Mon, Feb 27, 2012 at 9:01 AM, Kevin Colyar  wrote:

> No problem James.
>
> Maybe you can still help me out.  Even with the --bs option, when
> I run my app on a 10.6 w/o Bridge Suport Preview it segfaults on me.
>
> Any ideas?
>
> Kevin
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Update (Laurent Sansonetti)

2012-04-12 Thread James Chen

I also have this issue and a few others. But I'm afraid 10.8 and Xcode 4.4 is 
still under NDA so we cannot discuss it. 


On 2012/04/12, at 23:58, Ben Mills  wrote:

> What about 10.8 + Xcode 4.4? I just tried creating a new MacRuby project 
> (worked fine) but Xcode can't find the MacRuby framework.
> 
> main.m:11:9: fatal error: 'MacRuby/MacRuby.h' file not found
> #import 
> 
> 
> 
> If there's any way I can help with that, please let me know.
> 
> 
> 
> 
> On Thu, Apr 12, 2012 at 7:04 AM, Watson  wrote:
> Hi,
> 
> We only added the install location to correspond to Xcode 4.3 for
> template and rb_nibtool.
> I think we did not change template itself.
> 
> I had confirmed below combination when we corresponded to Xcode 4.3,
> and MacRuby worked to expected.
> 
>  OS X 10.6.8 + Xcode 3.2.6
>  OS X 10.6.8 + Xcode 4.2.
>  OS X 10.7.3 + Xcode 4.2.1
>  OS X 10.7.3 + Xcode 4.3.2
> 
> 
> If MacRuby is not work for you, let us know :)
> 
> 
> Thanks
> 
> 2012/4/12 Laurent Sansonetti :
> > On Thu, Apr 12, 2012 at 8:32 AM, Tim Rand  wrote:
> >> "First, we will release master as 0.12 (and just forget about 0.11). It
> >> is important since master has changes for the latest Xcode that have
> >> never been snipped yet."
> >>
> >> Does that mean the macruby project template will be updated to work with
> >> xcode 4.3.2--i.e. install into the updated directory location
> >> (/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/Project\
> >> Templates/Mac/Application/) and have a .xctemplate structure?  Because I 
> >> was
> >> just trying (but failing) to get figure out how to access the templates 
> >> from
> >> the xcode 4.3.2. Moving the old templates (from /Library/Application\
> >> Support/Developer/Shared/Xcode/Project\ Templates/Application/) didn't 
> >> work.
> >> Looks like lots of stuff changed regarding xcode templates with this 
> >> update.
> >
> > I am not sure about Xcode 4.3.2, but I tested master with 4.3.1 and
> > the templates seem to work as expected (also the IB support is working
> > too). I believe the .xctemplate work was done a few releases ago, and
> > that the new changes in 0.12 are mostly about dealing with the fact
> > that Xcode is now installed in /Application/Xcode.app.
> >
> > Can you try one of the latest nightly builds and let us know if it's
> > still not working for you?
> >
> > Laurent
> > ___
> > MacRuby-devel mailing list
> > [email protected]
> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Update (Laurent Sansonetti)

2012-04-12 Thread James Chen
Laurent,

OK here we go.

For either a new project or existing one, when building this error pops up:

  main.m: Lexical or Preprocessor Issue: "MacRuby/MacRuby.h" file not found.

App built from 10.7 runs on 10.8. But one of my own app crashes most of the
time due to a libssh (openssl.bundle) issue:

Thread 4 Crashed:: Dispatch queue: com.apple.root.default-priority
> 0   libcrypto.0.9.8.dylib 0x7fff8bc3ff8e sk_num + 14
> 1   libcrypto.0.9.8.dylib 0x7fff8bc6f139 CRYPTO_get_ex_data +
> 25
> 2   openssl.bundle 0x000105c310ba
> ossl_ssl_verify_callback + 42
> 3   libcrypto.0.9.8.dylib 0x7fff8bc931ea
> X509_verify_cert_orig + 1194
> 4   libcrypto.0.9.8.dylib 0x7fff8bc2edb9 X509_verify_cert +
> 105
> 5   libssl.0.9.8.dylib 0x7fff896d11f1
> ssl_verify_cert_chain + 289
> 6   libssl.0.9.8.dylib 0x7fff896c4029
> ssl3_get_server_certificate + 745
> 7   libssl.0.9.8.dylib 0x7fff896c2ced ssl3_connect + 669
> 8   libssl.0.9.8.dylib 0x7fff896bc42a ssl23_connect + 2714
> 9   openssl.bundle 0x000105c313e2 ossl_start_ssl + 130
> 10  libmacruby.1.9.2.dylib 0x000100155a04 rb_vm_dispatch +
> 9220
> 11  http.rbo   0x00010548c304 0x10548b000 + 4868
> 12  http.rbo   0x00010549cb5d
> MREP_1F9AD781A8BD4BBEA53F8C178BE55DA3 + 64861
> 13  libmacruby.1.9.2.dylib 0x000100155a04 rb_vm_dispatch +
> 9220
> 14  http.rbo   0x00010548c304 0x10548b000 + 4868
> 15  http.rbo   0x00010549bd6e
> MREP_1F9AD781A8BD4BBEA53F8C178BE55DA3 + 61294
> 16  libmacruby.1.9.2.dylib 0x000100155a04 rb_vm_dispatch +
> 9220
> 17  http.rbo   0x00010548c304 0x10548b000 + 4868
> 18  http.rbo   0x00010549bbf8
> MREP_1F9AD781A8BD4BBEA53F8C178BE55DA3 + 60920
> 19  libmacruby.1.9.2.dylib 0x000100155a04 rb_vm_dispatch +
> 9220
> 20  GNChecker.rbo 0x000105e2b224 0x105e2a000 + 4644
> 21  GNChecker.rbo 0x000105e2e0a2 0x105e2a000 + 16546
> 22  libmacruby.1.9.2.dylib 0x000100155a04 rb_vm_dispatch +
> 9220
> 23  GNChecker.rbo 0x000105e2b224 0x105e2a000 + 4644
> 24  GNChecker.rbo 0x000105e2dc6a 0x105e2a000 + 15466
> 25  libmacruby.1.9.2.dylib 0x000100156b19 rb_vm_block_eval +
> 1401
> 26  libmacruby.1.9.2.dylib 0x00010016a7ca rb_rescue2 + 58
> 27  libdispatch.dylib 0x7fff8d1a2527
> _dispatch_client_callout + 8
> 28  libdispatch.dylib 0x7fff8d1946b0
> _dispatch_worker_thread2 + 304
> 29  libsystem_c.dylib 0x7fff8814a9d3 _pthread_wqthread +
> 404
> 30  libsystem_c.dylib 0x7fff88134fb1 start_wqthread + 13


It's a Net::HTTP request with use_ssl set as true, inside a
Dispatch::Queue.concurrent.async  block. (
https://github.com/ashchan/gmail-notifr/blob/master/Classes/GNChecker.rb,
line 53)

Thanks,

---
James Chen
ashchan.com | @ashchan <http://twitter.com/ashchan>


On Fri, Apr 13, 2012 at 2:25 AM, Laurent Sansonetti <
[email protected]> wrote:

> It would be interesting to know if MacRuby can be built on 10.8, at least.
>
> I don't have 10.8, but I heard there are problems with loading up
> BridgeSupport files.
>
> If one of you guys can try to build the code and report the result of
> your attempt, that would be helpful. If you fear the NDA thunder you
> can mail me directly, this way it won't be public :)
>
> Laurent
>
> On Thu, Apr 12, 2012 at 5:58 PM, Ben Mills  wrote:
> > I don't think that information is prohibited by NDA. I will not be
> > discussing 10.8 or Xcode 4.4 features. If you'd still like this
> information,
> > I can provide it to you.
> >
> >
> >
> > On Thu, Apr 12, 2012 at 9:38 AM, Watson  wrote:
> >>
> >> I don't have the OSX 10.8, so I can't confirm your problem.
> >>
> >> I want to know below,
> >>
> >>  1. Xcode install path. /Developer or /Applications
> >>  2. "xcode-select -print-path" command outputs. Empty,
> >> "/Developer/" or "/Applications/"
> >>  3. Your problem occurs only new project. it has been created by
> Xcode4.4.
> >>  4. Your problem occurs MacRuby's examples also.
> >>
> >> but, NDA 
> >>
> >> 2012/4/13 James Chen :
> >> >
> >> > I also have this issue and a few others. But I'm afraid 10.8 and