[MacRuby-devel] Starting a New Project tutorial

2009-03-16 Thread Frisco Del Rosario
I'm following the steps to Starting a New Project at 
http://www.macruby.org/trac/wiki/MacRubyTutorial, which says:


First, let's instantiate our class. In the Library pane, drag-and-drop 
an NSObject item to the main window. Then, make sure you selected it, 
and open the inspector pane (click on Window, then Document Info). In 
the Object Identity tab, select MyController as the object class.


But after dragging and dropping an NSObject into the MainMenu.nib 
window, Document Info shows nothing in the Object ID panel.


OS 10.5.6
Xcode 3.1.2
ruby 1.9.1p0
MacRuby 0.4

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


Re: [MacRuby-devel] Starting a New Project tutorial

2009-03-16 Thread John Shea

I am not sure I understand fully what you have done ..

Make sure that you have something selected in the MainMenu.nib -  
otherwise the every panel in the inspector will be blank.


But this is what should happen:
- with the blue Object selected, and the Inspector open
- if you click in the object identity panel
- the class will be a grey NSObject
- click in this text field and the class name will disappear
- start typing in the name of your class - and it should appear -  
press return to make it stick.


If that does not help perhaps you could send the list a screen shot?

Cheers,
J

On Mar 16, 2009, at 13:58 , Frisco Del Rosario wrote:

I'm following the steps to Starting a New Project at http://www.macruby.org/trac/wiki/MacRubyTutorial 
, which says:


First, let's instantiate our class. In the Library pane, drag-and- 
drop an NSObject item to the main window. Then, make sure you  
selected it, and open the inspector pane (click on Window, then  
Document Info). In the Object Identity tab, select MyController as  
the object class.


But after dragging and dropping an NSObject into the MainMenu.nib  
window, Document Info shows nothing in the Object ID panel.


OS 10.5.6
Xcode 3.1.2
ruby 1.9.1p0
MacRuby 0.4

___
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] Starting a New Project tutorial

2009-03-16 Thread Frisco Del Rosario




On Mon, Mar 16, 2009 at 7:02 AM , 
[email protected] wrote:


and open the inspector pane (click on Window, then Document Info). In 
the Object Identity tab, select MyController as the object class.


I see where I screwed up. I went to Document Info from the Window menu, 
not Tools -> Inspector -> Class Identity, and so on.


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


Re: [MacRuby-devel] Starting a New Project tutorial

2009-03-16 Thread Laurent Sansonetti
Hi Frisco,

I would recommend to follow this tutorial instead, which should be
simpler (since it has pictures :-)).

http://developer.apple.com/mac/articles/scriptingautomation/cocoaappswithmacruby.html

Laurent

On Mon, Mar 16, 2009 at 7:16 AM, Frisco Del Rosario
 wrote:
>
>
>
> On Mon, Mar 16, 2009 at 7:02 AM , [email protected]
> wrote:
>
>> and open the inspector pane (click on Window, then Document Info). In the
>> Object Identity tab, select MyController as the object class.
>
> I see where I screwed up. I went to Document Info from the Window menu, not
> Tools -> Inspector -> Class Identity, and so on.
>
> Thanks, John Shea.
> ___
> 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] Introduce myself and some questions

2009-03-16 Thread Laurent Sansonetti

Hi Ferhat,

(Sorry for the late reply.)

On Mar 15, 2009, at 6:08 AM, Ferhat Ziba wrote:


Hey guys,

My name is Ferhat Ziba, I am student in Hamburg and study computer  
science. I saw your project and it's awesome. I like the Idea  
developing os x apps in ruby as first citizen programming language.


Thank you :)

After I get my fingers dirty with playing arround the source code, I  
have some questions :


1. Where are the path to the mapping files from hotcocoa ? I found  
it in the repository but not on my local machine. (I use the  
prebuild binary package on the project site for installing macruby).  
I like to extend some functionality for my (experimental) opensource  
project.


The mapping files are in the hotcocoa/mappings directory in the  
MacRuby's standard library. If you are willing to extend RubyCocoa I  
would recommend to install it from the sources, it will be easier for  
you to test / contribute your changes back.



2. When I write some mapping files ? Where should I send it ?


You can send them here or create a new ticket on the Trac and attach  
them.


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


Re: [MacRuby-devel] How do I handle file drop events in HotCocoa?

2009-03-16 Thread Laurent Sansonetti

Hi Jeff,

(Sorry for the late reply.)

On Mar 14, 2009, at 9:09 PM, Jeff Cohen wrote:


Hello,

I'm just getting started with MacRuby and HotCocoa (was a  
longtime .NET developer, and wasn't interested in learning Cocoa  
until MacRuby came along).  I have a simple HotCocoa app with just a  
table view, and I'd like the user to be able to drop a filename from  
the Finder onto the table view (or anywhere in my app). I can call  
registerForDraggedTypes() on my table view object successfully.  But  
I'm not sure how to have events delegated to my Application class  
(or if that's even possible).


Looking at the hotcocoa source for wrapping NSView (view.rb), I  
don't see delegate mappings for the draggingEntered or  
performDragOperation events.  I think I need to do something like  
the mapping code does and write code like this:


delegating "draggingEntered", :to => :dragging_entered

but I don't know where I can or should do that, or if I'm even on  
the right track.


Any hint of where I should get started would be appreciated.


I don't think HotCocoa exposes drag and drop facilities yet. In  
general drag and drop in Cocoa is non trivial to do (esp. if you want  
to integrate it with complex views such as NSTableViews).


The following article describes how to implement drag and drop in Cocoa:

http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html

It even has a special section dedicated to NSTableViews.

You should be able to do everything  described in this article using  
"pure" MacRuby code but if you want to use some kind of syntax sugar  
via HotCocoa I'm afraid you will have to wait until someone implements  
them.


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


Re: [MacRuby-devel] Introduce myself and some questions

2009-03-16 Thread Matt Aimonetti
>
> The mapping files are in the hotcocoa/mappings directory in the MacRuby's
> standard library. If you are willing to extend RubyCocoa I would recommend
> to install it from the sources, it will be easier for you to test /
> contribute your changes back.
>

And by RubyCocoa, Laurent really meant HotCocoa ;)

- Matt

On Mon, Mar 16, 2009 at 10:58 AM, Laurent Sansonetti
wrote:

> Hi Ferhat,
>
> (Sorry for the late reply.)
>
> On Mar 15, 2009, at 6:08 AM, Ferhat Ziba wrote:
>
>  Hey guys,
>>
>> My name is Ferhat Ziba, I am student in Hamburg and study computer
>> science. I saw your project and it's awesome. I like the Idea developing os
>> x apps in ruby as first citizen programming language.
>>
>
> Thank you :)
>
>  After I get my fingers dirty with playing arround the source code, I have
>> some questions :
>>
>> 1. Where are the path to the mapping files from hotcocoa ? I found it in
>> the repository but not on my local machine. (I use the prebuild binary
>> package on the project site for installing macruby). I like to extend some
>> functionality for my (experimental) opensource project.
>>
>
> The mapping files are in the hotcocoa/mappings directory in the MacRuby's
> standard library. If you are willing to extend RubyCocoa I would recommend
> to install it from the sources, it will be easier for you to test /
> contribute your changes back.
>
>  2. When I write some mapping files ? Where should I send it ?
>>
>
> You can send them here or create a new ticket on the Trac and attach them.
>
> Regards,
> 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] Roadmap - Upgrade the wiki

2009-03-16 Thread Stéphane Wirtel

Hi all,

I registered on the Wiki but I can't change the Roadmap of the  
project, because the date for the version 0.4 is wrong !


Could you upgrade this wiki page ?

https://www.macruby.org/trac/wiki/MacRubyRoadmap
Date of 0.4: 03/08/2009

Thanks

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


Re: [MacRuby-devel] Roadmap - Upgrade the wiki

2009-03-16 Thread Matt Aimonetti
Thanks Stephane I just added the release date, I guess we do need to clean
up this section tho.

Merci,

- Matt

On Mon, Mar 16, 2009 at 12:03 PM, Stéphane Wirtel  wrote:

> Hi all,
>
> I registered on the Wiki but I can't change the Roadmap of the project,
> because the date for the version 0.4 is wrong !
>
> Could you upgrade this wiki page ?
>
> https://www.macruby.org/trac/wiki/MacRubyRoadmap
> Date of 0.4: 03/08/2009
>
> Thanks
>
> Stephane
> ___
> 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] Roadmap - Upgrade the wiki

2009-03-16 Thread Stephane Wirtel
Welcome,

2009/3/16 Matt Aimonetti 

> Thanks Stephane I just added the release date, I guess we do need to clean
> up this section tho.
>
> Merci,
>
> - Matt
>
> On Mon, Mar 16, 2009 at 12:03 PM, Stéphane Wirtel <
> [email protected]> wrote:
>
>> Hi all,
>>
>> I registered on the Wiki but I can't change the Roadmap of the project,
>> because the date for the version 0.4 is wrong !
>>
>> Could you upgrade this wiki page ?
>>
>> https://www.macruby.org/trac/wiki/MacRubyRoadmap
>> Date of 0.4: 03/08/2009
>>
>> Thanks
>>
>> Stephane
>> ___
>> 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
>
>


-- 
LinkedIn: http://www.linkedin.com/in/stephanewirtel
Blog: http://simwi.blogspot.com
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Roadmap - Upgrade the wiki

2009-03-16 Thread Laurent Sansonetti

The new website will make this kind of contributions easier :-)

Hopefully it should be live this week.

Sent from my iPhone

On Mar 16, 2009, at 12:07 PM, Matt Aimonetti   
wrote:


Thanks Stephane I just added the release date, I guess we do need to  
clean up this section tho.


Merci,

- Matt

On Mon, Mar 16, 2009 at 12:03 PM, Stéphane Wirtel m> wrote:

Hi all,

I registered on the Wiki but I can't change the Roadmap of the  
project, because the date for the version 0.4 is wrong !


Could you upgrade this wiki page ?

https://www.macruby.org/trac/wiki/MacRubyRoadmap
Date of 0.4: 03/08/2009

Thanks

Stephane
___
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] Roadmap - Upgrade the wiki

2009-03-16 Thread Stéphane Wirtel

Thanks for this information.

On 16 Mar 2009, at 20:34, Laurent Sansonetti wrote:


The new website will make this kind of contributions easier :-)

Hopefully it should be live this week.

Sent from my iPhone

On Mar 16, 2009, at 12:07 PM, Matt Aimonetti  
 wrote:


Thanks Stephane I just added the release date, I guess we do need  
to clean up this section tho.


Merci,

- Matt

On Mon, Mar 16, 2009 at 12:03 PM, Stéphane Wirtel > wrote:

Hi all,

I registered on the Wiki but I can't change the Roadmap of the  
project, because the date for the version 0.4 is wrong !


Could you upgrade this wiki page ?

https://www.macruby.org/trac/wiki/MacRubyRoadmap
Date of 0.4: 03/08/2009

Thanks

Stephane
___
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


[MacRuby-devel] Interfacing with C (not objective C)

2009-03-16 Thread Martin Hess
My apologies if this has been covered somewhere else, but how do you  
interface with C in MacRuby. I know you can just write a C extension  
for Ruby but it appears that MacRuby makes this easier but it is  
unclear to me how far its support goes and when you should write an  
extension.


Someone was asking about OpenGL in another thread which is a great  
example of a more difficult case but I don't think it covers all cases  
in a general sense. I'll break up the problem as I see it:


1) External C routines can be asynchronous
	a) Memory handed to the asynchronous routine can't move i.e. no  
garbage collection

b) Call backs (i.e. passing in function pointers to a C routine)
i.  Asynchronous routines can show up at anytime

2) Function pointers as parameters to external C routines
	a) Function signature has to match exactly i.e. can't pass in a Ruby  
method pointer


3) Memory
a) Allocated by external C routine
i) How to delete if it is the callers responsibility to delete
b) Allocated by caller
		i) How to allocate and get valid pointer to memory that isn't going  
to get garbage collected away

c) Reading and writing allocated memory
i) This is raw memory with no type information
		ii) How do you give it shape so you can read and write symbolically  
i.e. no peek/poke

iii) Reading and writing packed bitfields


So how are each of these things done in MacRuby? 
___

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


Re: [MacRuby-devel] How do I handle file drop events in HotCocoa?

2009-03-16 Thread Jeff Cohen
Hi Laurant,

Thanks a lot for your reply.  And perhaps I misspoke somewhat - I'm not
trying to implement full drag and drop within my application, but only
receive simple filename drop events that originate from outside the
application.  I think that it's just a matter of adding a few extra delegate
mappings, but I don't understand how to "extend" more mappings into the
hotcocoa wrapper classes.

Perhaps instead I will try to build from source and add the mappings there,
and use a local build to test with.  If a miracle occurs and I can figure it
out, I will submit a patch. :-)

Thanks again!
Jeff


On Mon, Mar 16, 2009 at 1:02 PM, Laurent Sansonetti
wrote:

> Hi Jeff,
>
> (Sorry for the late reply.)
>
>
> On Mar 14, 2009, at 9:09 PM, Jeff Cohen wrote:
>
>  Hello,
>>
>> I'm just getting started with MacRuby and HotCocoa (was a longtime .NET
>> developer, and wasn't interested in learning Cocoa until MacRuby came
>> along).  I have a simple HotCocoa app with just a table view, and I'd like
>> the user to be able to drop a filename from the Finder onto the table view
>> (or anywhere in my app). I can call registerForDraggedTypes() on my table
>> view object successfully.  But I'm not sure how to have events delegated to
>> my Application class (or if that's even possible).
>>
>> Looking at the hotcocoa source for wrapping NSView (view.rb), I don't see
>> delegate mappings for the draggingEntered or performDragOperation events.  I
>> think I need to do something like the mapping code does and write code like
>> this:
>>
>> delegating "draggingEntered", :to => :dragging_entered
>>
>> but I don't know where I can or should do that, or if I'm even on the
>> right track.
>>
>> Any hint of where I should get started would be appreciated.
>>
>
> I don't think HotCocoa exposes drag and drop facilities yet. In general
> drag and drop in Cocoa is non trivial to do (esp. if you want to integrate
> it with complex views such as NSTableViews).
>
> The following article describes how to implement drag and drop in Cocoa:
>
>
> http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html
>
> It even has a special section dedicated to NSTableViews.
>
> You should be able to do everything  described in this article using "pure"
> MacRuby code but if you want to use some kind of syntax sugar via HotCocoa
> I'm afraid you will have to wait until someone implements them.
>
> HTH,
> 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


Re: [MacRuby-devel] How do I handle file drop events in HotCocoa?

2009-03-16 Thread Matt Aimonetti
You can define your own mapping within your app or extend the existing ones,
delegation can also be added on each instance of any object.

Here is a sample app I wrote with a custom mapping (which was later on
merged in HotCocoa):
http://github.com/mattetti/macruby-examples/blob/fe06617645c8809183fb15bca025016937e1c84b/download/lib/progress_indicator.rb

You can see that I defined my mapping like any other mappings and just
required the file in my application.rb file:
http://github.com/mattetti/macruby-examples/blob/fe06617645c8809183fb15bca025016937e1c84b/download/lib/application.rb#L5

- Matt

2009/3/16 Jeff Cohen 

> Hi Laurant,
>
> Thanks a lot for your reply.  And perhaps I misspoke somewhat - I'm not
> trying to implement full drag and drop within my application, but only
> receive simple filename drop events that originate from outside the
> application.  I think that it's just a matter of adding a few extra delegate
> mappings, but I don't understand how to "extend" more mappings into the
> hotcocoa wrapper classes.
>
> Perhaps instead I will try to build from source and add the mappings there,
> and use a local build to test with.  If a miracle occurs and I can figure it
> out, I will submit a patch. :-)
>
> Thanks again!
> Jeff
>
>
>
> On Mon, Mar 16, 2009 at 1:02 PM, Laurent Sansonetti  > wrote:
>
>> Hi Jeff,
>>
>> (Sorry for the late reply.)
>>
>>
>> On Mar 14, 2009, at 9:09 PM, Jeff Cohen wrote:
>>
>>  Hello,
>>>
>>> I'm just getting started with MacRuby and HotCocoa (was a longtime .NET
>>> developer, and wasn't interested in learning Cocoa until MacRuby came
>>> along).  I have a simple HotCocoa app with just a table view, and I'd like
>>> the user to be able to drop a filename from the Finder onto the table view
>>> (or anywhere in my app). I can call registerForDraggedTypes() on my table
>>> view object successfully.  But I'm not sure how to have events delegated to
>>> my Application class (or if that's even possible).
>>>
>>> Looking at the hotcocoa source for wrapping NSView (view.rb), I don't see
>>> delegate mappings for the draggingEntered or performDragOperation events.  I
>>> think I need to do something like the mapping code does and write code like
>>> this:
>>>
>>> delegating "draggingEntered", :to => :dragging_entered
>>>
>>> but I don't know where I can or should do that, or if I'm even on the
>>> right track.
>>>
>>> Any hint of where I should get started would be appreciated.
>>>
>>
>> I don't think HotCocoa exposes drag and drop facilities yet. In general
>> drag and drop in Cocoa is non trivial to do (esp. if you want to integrate
>> it with complex views such as NSTableViews).
>>
>> The following article describes how to implement drag and drop in Cocoa:
>>
>>
>> http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html
>>
>> It even has a special section dedicated to NSTableViews.
>>
>> You should be able to do everything  described in this article using
>> "pure" MacRuby code but if you want to use some kind of syntax sugar via
>> HotCocoa I'm afraid you will have to wait until someone implements them.
>>
>> HTH,
>> 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] [MacRuby] #232: Examples macruby apps don't work on Leopard

2009-03-16 Thread MacRuby
#232: Examples macruby apps don't work on Leopard
---+
 Reporter:  anildigi...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  blocker|   Milestone:  MacRuby 0.4  
Component:  MacRuby|Keywords:   
---+
 /Developer/Examples/Ruby/MacRuby$ macruby buildall.rb
 /Users/anildigital/Desktop/temp
 Successful to build: ABPresence, AnimatingViews, CircleView, DotView,
 EmbeddedMacRuby, FlickrDemo, OutlineView, PagePacker, PathDemo,
 RoundTransparentWindow, ViewModelDemo
 Failed to build: None

 I have attached example .app file

-- 
Ticket URL: 
MacRuby 

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


[MacRuby-devel] [MacRuby] #233: Examples macruby apps don't work on Leopard

2009-03-16 Thread MacRuby
#233: Examples macruby apps don't work on Leopard
---+
 Reporter:  anildigi...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  blocker|   Milestone:  MacRuby 0.4  
Component:  MacRuby|Keywords:  macruby  
---+
 /Developer/Examples/Ruby/MacRuby$ macruby buildall.rb
 /Users/anildigital/Desktop/temp
 Successful to build: ABPresence, AnimatingViews, CircleView, DotView,
 EmbeddedMacRuby, FlickrDemo, OutlineView, PagePacker, PathDemo,
 RoundTransparentWindow, ViewModelDemo
 Failed to build: None

-- 
Ticket URL: 
MacRuby 

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