Re: [MacRuby-devel] WebScripting protocol

2010-06-10 Thread Michael Jackson
Hi Thibault,

Yes, this seems to be the problem for me. Thanks for pointing me to
the ticket. Is the fix still slated for 0.7? The milestone field on
that particular ticket is blank.

--
Michael Jackson
http://mjijackson.com
@mjijackson



On Mon, Jun 7, 2010 at 6:26 PM, Thibault Martin-Lagardette
 wrote:
> Hi!
> I believe you are hitting this bug: http://www.macruby.org/trac/ticket/594
> There is a workaround in the first
> comment: http://www.macruby.org/trac/ticket/594#comment:1
> Let me know if that's not it though! :-)
> --
> Thibault Martin-Lagardette
>
>
> On Jun 7, 2010, at 16:21, Michael Jackson wrote:
>
> Hi,
>
> I'm trying to create an object that conforms to the WebScripting
> protocol, but the only method that is working is
> invokeUndefinedMethodFromWebScript:withArguments:. Here's a sample of
> my class so far. The puts statements are just there so I can see what
> is actually being called.
>
> For reference, the WebScripting protocol is defined here:
> http://developer.apple.com/mac/library/documentation/Cocoa/Reference/WebKit/Protocols/WebScripting_Protocol/Reference/Reference.html
>
>
> class HelloScriptObject
>
>  def self.isKeyExcludedFromWebScript(key)
>    puts key.inspect
>  end
>
>  def self.webScriptNameForKey(key)
>    puts key.inspect
>  end
>
>  def self.isSelectorExcludedFromWebScript(sel)
>    puts sel.inspect
>  end
>
>  def self.webScriptNameForSelector(sel)
>    puts sel.inspect
>  end
>
>  def invokeUndefinedMethodFromWebScript(name, withArguments:args)
>    puts name
> puts args.inspect
>  end
>
>  def sayHi
>    puts 'hi'
>  end
>
> end
>
>
> The sayHi method is the one that I'm calling via JavaScript, but every
> time it just defaults to using
> invokeUndefinedMethodFromWebScript:withArguments: instead of using
> self.isSelectorExcludedFromWebScript: to first check if the selector
> is valid or not. Is support for this implemented yet (in 0.6)? If so,
> what am I missing?
>
> Thanks,
>
> Michael
>
> --
> Michael Jackson
> http://mjijackson.com
> @mjijackson
> ___
> 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] status and prospects of HotCocoa?

2010-06-10 Thread Rich Morin
I'm curious about the status of HotCocoa.  Although it seems
like a very cool piece of technology, the activity level and
documentation status seem pretty minimal.  For example:

  *  http://www.macruby.org/trac/wiki/HotCocoaStatus shows
 about thirty "partial" mappings; the rest are "unknown".

  *  http://www.macruby.org/trac/wiki/HotCocoaTutorial just
 says "TODO".

  *  "MacRuby: The Definitive Guide" doesn't mention HotCocoa
 in the Table of Contents.

If some folks here are using HotCocoa, I'd love to see some
examples, howtos, etc!

-r
-- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Technical editing and writing, programming, system design
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] status and prospects of HotCocoa?

2010-06-10 Thread Gary Weaver

These posts are a bit old now but:

Lots of examples linked to in this:
* http://stufftohelpyouout.blogspot.com/2010/03/hotcocoamacruby-links.html

Some lame stuff I did in a few days:
* 
http://stufftohelpyouout.blogspot.com/2010/02/hotcocoa-app-to-track-time-on-tasks.html
* 
http://stufftohelpyouout.blogspot.com/2010/02/create-custom-icon-of-your-hotcocoa-app.html
* 
http://stufftohelpyouout.blogspot.com/2010/02/create-macruby-hotcocoa-app.html


This helped me get started in addition to the tutorial:
* http://isaac.kearse.co.nz/2010/02/01/packaging-hotcocoa/
(note: Isaac provided a patch to MacRuby to help with the file size thing)

The current story I think is that Rich Kilmer:
http://wiki.github.com/richkilmer/hotcocoa/
got pulled into other things and didn't have much time to keep it going, 
so others have forked it I think:

http://github.com/richkilmer/hotcocoa/network

Dan Sinclair had the most recent work on his branch of it but that was 
last updated March 23, 2010:

http://github.com/dj2/hotcocoa

I'm hoping Rich, Dan, and everyone else that is interested will continue 
work on it. It was pretty cool!


Gary


On 6/10/10 1:48 PM, Rich Morin wrote:

I'm curious about the status of HotCocoa.  Although it seems
like a very cool piece of technology, the activity level and
documentation status seem pretty minimal.  For example:

   *  http://www.macruby.org/trac/wiki/HotCocoaStatus shows
  about thirty "partial" mappings; the rest are "unknown".

   *  http://www.macruby.org/trac/wiki/HotCocoaTutorial just
  says "TODO".

   *  "MacRuby: The Definitive Guide" doesn't mention HotCocoa
  in the Table of Contents.

If some folks here are using HotCocoa, I'd love to see some
examples, howtos, etc!

-r
   


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


Re: [MacRuby-devel] status and prospects of HotCocoa?

2010-06-10 Thread Matt Aimonetti
Unless some people really embrace the project, fix the various issues and
add a proper test suite, I don't know if HotCocoa will survive too long.

However, it looks like enough people are interested in doing something with
HotCocoa, I would suggest to fork the project (it's on github) and set a
team of people to work on it.

- Matt

On Thu, Jun 10, 2010 at 3:41 PM, Rich Morin  wrote:

> I folded some information from Dan and Gary into a wiki page:
>
>  https://www.macruby.org/trac/wiki/HotCocoaResources
>
> and tweaked the main page a bit:
>
>  https://www.macruby.org/trac/wiki/HotCocoa
>
> Contributions and corrections are solicited...
>
> -r
> --
> http://www.cfcl.com/rdmRich Morin
> http://www.cfcl.com/rdm/resume [email protected]
> http://www.cfcl.com/rdm/weblog +1 650-873-7841
>
> Technical editing and writing, programming, system design
> ___
> 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] WebScripting protocol

2010-06-10 Thread Thibault Martin-Lagardette
Yes, the fix for this should be in the 0.7 release :-).

If you CC yourself to the bug, you might know once this is fixed in trunk :D

-- 
Thibault Martin-Lagardette



On Jun 10, 2010, at 06:20, Michael Jackson wrote:

> Hi Thibault,
> 
> Yes, this seems to be the problem for me. Thanks for pointing me to
> the ticket. Is the fix still slated for 0.7? The milestone field on
> that particular ticket is blank.
> 
> --
> Michael Jackson
> http://mjijackson.com
> @mjijackson
> 
> 
> 
> On Mon, Jun 7, 2010 at 6:26 PM, Thibault Martin-Lagardette
>  wrote:
>> Hi!
>> I believe you are hitting this bug: http://www.macruby.org/trac/ticket/594
>> There is a workaround in the first
>> comment: http://www.macruby.org/trac/ticket/594#comment:1
>> Let me know if that's not it though! :-)
>> --
>> Thibault Martin-Lagardette
>> 
>> 
>> On Jun 7, 2010, at 16:21, Michael Jackson wrote:
>> 
>> Hi,
>> 
>> I'm trying to create an object that conforms to the WebScripting
>> protocol, but the only method that is working is
>> invokeUndefinedMethodFromWebScript:withArguments:. Here's a sample of
>> my class so far. The puts statements are just there so I can see what
>> is actually being called.
>> 
>> For reference, the WebScripting protocol is defined here:
>> http://developer.apple.com/mac/library/documentation/Cocoa/Reference/WebKit/Protocols/WebScripting_Protocol/Reference/Reference.html
>> 
>> 
>> class HelloScriptObject
>> 
>>  def self.isKeyExcludedFromWebScript(key)
>>puts key.inspect
>>  end
>> 
>>  def self.webScriptNameForKey(key)
>>puts key.inspect
>>  end
>> 
>>  def self.isSelectorExcludedFromWebScript(sel)
>>puts sel.inspect
>>  end
>> 
>>  def self.webScriptNameForSelector(sel)
>>puts sel.inspect
>>  end
>> 
>>  def invokeUndefinedMethodFromWebScript(name, withArguments:args)
>>puts name
>> puts args.inspect
>>  end
>> 
>>  def sayHi
>>puts 'hi'
>>  end
>> 
>> end
>> 
>> 
>> The sayHi method is the one that I'm calling via JavaScript, but every
>> time it just defaults to using
>> invokeUndefinedMethodFromWebScript:withArguments: instead of using
>> self.isSelectorExcludedFromWebScript: to first check if the selector
>> is valid or not. Is support for this implemented yet (in 0.6)? If so,
>> what am I missing?
>> 
>> Thanks,
>> 
>> Michael
>> 
>> --
>> Michael Jackson
>> http://mjijackson.com
>> @mjijackson
>> ___
>> 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] status and prospects of HotCocoa?

2010-06-10 Thread Rich Morin
I folded some information from Dan and Gary into a wiki page:

  https://www.macruby.org/trac/wiki/HotCocoaResources

and tweaked the main page a bit:

  https://www.macruby.org/trac/wiki/HotCocoa

Contributions and corrections are solicited...

-r
-- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Technical editing and writing, programming, system design
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] YAML - taquri? warning

2010-06-10 Thread macruby


Under MacRuby 0.6, dumping out a large Hash into a YAML file generates many 
warning lines of:

unknown: warning: instance variable @taguri not initialized

A brief web search sees this popping up in ruby 1.8.3, but subsequently fixed 
(at least 1.8.7 does not emit these msgs)


Are there known issues with YAML dumps, especially on large Hashes (under MR, 
native NSDictionaries passed back from a framework)?


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


Re: [MacRuby-devel] status and prospects of HotCocoa?

2010-06-10 Thread dan sinclair
I've got a few tutorials and github apps that I've written with HotCocoa. I 
kinda stopped poking at it as I wasn't sure what the future held and decided to 
switch to straight up MacRuby/Cocoa for my last app.

Tutorials
* http://everburning.com/news/heating-up-with-hotcocoa-part-i/
* http://everburning.com/news/heating-up-with-hotcocoa-part-ii/
* http://everburning.com/news/heating-up-with-hotcocoa-part-iii/
* http://everburning.com/news/heating-up-with-hotcocoa-on-github/
* http://everburning.com/news/download-and-xml-parsing-with-hotcocoa/
* http://everburning.com/news/toolbars-with-hotcocoa/
* http://everburning.com/news/hotcocoa-and-core-data/

Github
* http://github.com/dj2/SilverLining   (Amazon EC2 Instance Browser)
* http://github.com/dj2/Rife (Start of a news reader)
* http://github.com/dj2/Postie (The app from the heating up 
tutorials)


dan


On 2010-06-10, at 2:05 PM, Gary Weaver wrote:

> These posts are a bit old now but:
> 
> Lots of examples linked to in this:
> * http://stufftohelpyouout.blogspot.com/2010/03/hotcocoamacruby-links.html
> 
> Some lame stuff I did in a few days:
> * 
> http://stufftohelpyouout.blogspot.com/2010/02/hotcocoa-app-to-track-time-on-tasks.html
> * 
> http://stufftohelpyouout.blogspot.com/2010/02/create-custom-icon-of-your-hotcocoa-app.html
> * 
> http://stufftohelpyouout.blogspot.com/2010/02/create-macruby-hotcocoa-app.html
> 
> This helped me get started in addition to the tutorial:
> * http://isaac.kearse.co.nz/2010/02/01/packaging-hotcocoa/
> (note: Isaac provided a patch to MacRuby to help with the file size thing)
> 
> The current story I think is that Rich Kilmer:
> http://wiki.github.com/richkilmer/hotcocoa/
> got pulled into other things and didn't have much time to keep it going, so 
> others have forked it I think:
> http://github.com/richkilmer/hotcocoa/network
> 
> Dan Sinclair had the most recent work on his branch of it but that was last 
> updated March 23, 2010:
> http://github.com/dj2/hotcocoa
> 
> I'm hoping Rich, Dan, and everyone else that is interested will continue work 
> on it. It was pretty cool!
> 
> Gary
> 
> 
> On 6/10/10 1:48 PM, Rich Morin wrote:
>> I'm curious about the status of HotCocoa.  Although it seems
>> like a very cool piece of technology, the activity level and
>> documentation status seem pretty minimal.  For example:
>> 
>>  *  http://www.macruby.org/trac/wiki/HotCocoaStatus shows
>> about thirty "partial" mappings; the rest are "unknown".
>> 
>>  *  http://www.macruby.org/trac/wiki/HotCocoaTutorial just
>> says "TODO".
>> 
>>  *  "MacRuby: The Definitive Guide" doesn't mention HotCocoa
>> in the Table of Contents.
>> 
>> If some folks here are using HotCocoa, I'd love to see some
>> examples, howtos, etc!
>> 
>> -r
>> 
> 
> ___
> 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] #269: Calling a method on a pointer passed to a KVC validation method fails

2010-06-10 Thread MacRuby
#269: Calling a method on a pointer passed to a KVC validation method fails
+---
 Reporter:  mik...@…|Owner:  lsansone...@…
 Type:  defect  |   Status:  closed   
 Priority:  major   |Milestone:   
Component:  MacRuby |   Resolution:  invalid  
 Keywords:  kvc pointer crash   |  
+---
Changes (by martinlagarde...@…):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 Closing for now, we had some KVC bugs but they seem fixed. Feel free to
 reopen if you have a way to reproduce.

-- 
Ticket URL: 
MacRuby 

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


Re: [MacRuby-devel] [MacRuby] #312: reopening a class and setNeedsDisplay: segfault

2010-06-10 Thread MacRuby
#312: reopening a class and setNeedsDisplay: segfault
-+--
 Reporter:  mattaimone...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  critical |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:   
-+--

Comment(by martinlagarde...@…):

 Also, getting rid of `super()` parenthesis:

 {{{
 #!ruby
 framework 'Cocoa'
 class ImageLayer < CALayer; def initialize(file_name); super; end; end
 ImageLayer.new('test').setNeedsDisplay
 }}}

 {{{
 /private/tmp/t.rb:2:in `initialize:': super: no superclass method
 `initialize' for # (NoMethodError)
 from /private/tmp/t.rb:1:in `'
 }}}

-- 
Ticket URL: 
MacRuby 

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


Re: [MacRuby-devel] [MacRuby] #312: reopening a class and setNeedsDisplay: segfault

2010-06-10 Thread MacRuby
#312: reopening a class and setNeedsDisplay: segfault
-+--
 Reporter:  mattaimone...@…  |Owner:  lsansone...@…
 Type:  defect   |   Status:  closed   
 Priority:  critical |Milestone:  MacRuby 0.5  
Component:  MacRuby  |   Resolution:  invalid  
 Keywords:   |  
-+--
Changes (by martinlagarde...@…):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 Also, I would suggest doing something more Cocoa-y, to make sure `CALayer`
 `-init` is called:
 {{{
 #!ruby
 framework 'Cocoa'
 class ImageLayer < CALayer
   def initialize(file_name)
 if init
   @filename = file_name
 end
 self
   end
 end
 ImageLayer.new("test").setNeedsDisplay
 }}}

 This will actually call `CALayer`'s `-init`, which I think is not called
 at all in your 1st and 3rd example, hence the crash in `-setNeedsDisplay`,
 the `CALayer` not being initalized properly.

 In the second example you linked, `initialize` is never called, so `-init`
 is actually called and that's why it works. You can see by doing:
 {{{
 #!ruby
 framework 'Cocoa'
 class ImageLayer < CALayer; def initialize; super(); p "rb init"; end; end
 ImageLayer.new.setNeedsDisplay # => nil
 }}}
 {{{
 $> macruby t.rb
 $>
 }}}

 I'll close this bug, but feel free to re-open it if I'm wrong / if I
 missed something :-)

-- 
Ticket URL: 
MacRuby 

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


[MacRuby-devel] MacRuby PrefPane

2010-06-10 Thread Michael Jackson
Hi all,

I've been trying to set up a preference pane in MacRuby this
afternoon, but I'm not sure the right way to go about it. In Cocoa
it's easy because there's a "preference pane bundle" project type in
the new project dialog box in Xcode. So what I did was I created a new
preference pane project in Cocoa and a new MacRuby app and then tried
to make the MacRuby app look as much like the Cocoa prefpane as I
could (by editing the Info.plist file, adding the
PreferencePanes.framework to the project, etc.)

The one problem I have at this point (there are probably more than
one, but...) is that I don't have a prefpane bundle under my targets.
I just have the App, Unit Tests, Compile, and Embed targets. I don't
know what to do at this point. I have a feeling that there should be
an easier way to do all of this, but I don't know how.

Any suggestions would be greatly appreciated. Perhaps someone has a
MacRuby prefpane bundle they're willing to share?

Thanks,

Michael

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


Re: [MacRuby-devel] status and prospects of HotCocoa?

2010-06-10 Thread isaac kearse
I have a few more articles here also: http://isaac.kearse.co.nz/

Rich Kilmer obviously doesn't have much time for HotCocoa right now, but he
has done some great work to get it this far and it would be cool if he could
chime in with a few words about his vision for the project.

I also vaguely remember some talk about integrating Rucola & HotCocoa a
while ago.  Did anything ever come of that?

Cheers,
Isaac

On Fri, Jun 11, 2010 at 11:04 AM, Matt Aimonetti wrote:

> Unless some people really embrace the project, fix the various issues and
> add a proper test suite, I don't know if HotCocoa will survive too long.
>
> However, it looks like enough people are interested in doing something with
> HotCocoa, I would suggest to fork the project (it's on github) and set a
> team of people to work on it.
>
> - Matt
>
>
> On Thu, Jun 10, 2010 at 3:41 PM, Rich Morin  wrote:
>
>> I folded some information from Dan and Gary into a wiki page:
>>
>>  https://www.macruby.org/trac/wiki/HotCocoaResources
>>
>> and tweaked the main page a bit:
>>
>>  https://www.macruby.org/trac/wiki/HotCocoa
>>
>> Contributions and corrections are solicited...
>>
>> -r
>> --
>> http://www.cfcl.com/rdmRich Morin
>> http://www.cfcl.com/rdm/resume [email protected]
>> http://www.cfcl.com/rdm/weblog +1 650-873-7841
>>
>> Technical editing and writing, programming, system design
>> ___
>> 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] #328: Calling a ObjC-method with a named argument which is a Ruby keyword does not work

2010-06-10 Thread MacRuby
#328: Calling a ObjC-method with a named argument which is a Ruby keyword does
not work
+---
 Reporter:  d...@…   |Owner:  lsansone...@…
 Type:  defect  |   Status:  closed   
 Priority:  minor   |Milestone:  MacRuby 0.7  
Component:  MacRuby |   Resolution:  fixed
 Keywords:  |  
+---
Changes (by martinlagarde...@…):

  * status:  new => closed
  * resolution:  => fixed
  * milestone:  => MacRuby 0.7


Comment:

 Fixed with r4217 :-)

-- 
Ticket URL: 
MacRuby 

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


Re: [MacRuby-devel] MacRuby PrefPane

2010-06-10 Thread Matt Aimonetti
Hi MJ,

I'll try to get that done for you ASAP, but with the world cup starting
tomorrow, ASAP might mean a few days from now ;)

- Matt


On Thu, Jun 10, 2010 at 5:22 PM, Michael Jackson wrote:

> Hi all,
>
> I've been trying to set up a preference pane in MacRuby this
> afternoon, but I'm not sure the right way to go about it. In Cocoa
> it's easy because there's a "preference pane bundle" project type in
> the new project dialog box in Xcode. So what I did was I created a new
> preference pane project in Cocoa and a new MacRuby app and then tried
> to make the MacRuby app look as much like the Cocoa prefpane as I
> could (by editing the Info.plist file, adding the
> PreferencePanes.framework to the project, etc.)
>
> The one problem I have at this point (there are probably more than
> one, but...) is that I don't have a prefpane bundle under my targets.
> I just have the App, Unit Tests, Compile, and Embed targets. I don't
> know what to do at this point. I have a feeling that there should be
> an easier way to do all of this, but I don't know how.
>
> Any suggestions would be greatly appreciated. Perhaps someone has a
> MacRuby prefpane bundle they're willing to share?
>
> Thanks,
>
> Michael
>
> --
> Michael Jackson
> http://mjijackson.com
> @mjijackson
> ___
> 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