Hi Daniel,
the last one on the list (mine) has code which is getting very old and
crusty now - developed on 0.4 - I am not sure the code is all that useful
anymore - in fact i was just about to remove the examples.
Feel free to take copies of course (very soon) - but I a doubt there is too
much of
yes, agreed as far as tutorials are concerned.
Regarding example/sample code i think we have a few issues.
i) Laurent and the core team are too busy to do the mundane task of checking
example code,
ii) because the oficial MacRuby example code is an apple distribution it needs
to be always worki
orrect these and see if I can make the code function
> again.
>
> It would be great if we could assemble a web page that documents some of the
> required knowledge on MAcRuby Pointers for OpenGL.
>
> regards, Jonathan
>
>
> On 22 Jan 2010, at 16:06, John Shea wr
- my interest is in visualisations rather than games. Right now I'm just greatfull that folks like you are willing to share their hard earned skills.Best wishes, Jonathanjonathan 'at' waddilove.netOn 22 Jan 2010, at 09:28, John Shea wrote:Jonathan,I made some games in opengl this time las
ing any framework that
lacks bridge support.
Many thank, Jonathan
On 21 Jan 2010, at 20:56, John Shea wrote:
Yes as far as I know bridge support does not support GLUT.
So you (obviously) have two other options other than
gen_bridge_metadata (which I gave up on after a few tries) :
- don
Yes as far as I know bridge support does not support GLUT.
So you (obviously) have two other options other than gen_bridge_metadata (which
I gave up on after a few tries) :
- don't use GLUT - use the equivalent (set of) non GLUT openGL calls
- place the GLUT calls in an ObjC class - and call out
Perhaps it is this bug here: https://www.macruby.org/trac/ticket/473
In my case with the current 0.5 beta2 no float or integer binding to nscontrol
works (I get all 1's) unless the float or integer is converted to an
NSDecimalNumber using a ValueTransformer.
This is what i use for each float bin
oObject:floater, withKeyPath:"work", options:options)
obie = Observa.new(floater)
2.times do
floater.setValue(rand(10) * 1.234, forKey:"work")
sleep 1
p "avalue work #{avalue.work}. #{avalue.work.class}"
end
p "--"
2.times do
floater.setValue(rand(
Hi Steve,
I agree with Ernie.
I am always happy to answer questions if I think the person is not rude, or
asking me to write their entire app - and that is, so far, rare on this list.
Usually when I get it wrong other people pipe up ;-).
Some seemingly simple questions do often lead to a bug f
Yes, as you have probably realised you need to reinstall MacRuby.
In my case it did not affect my iphone SDK after reinstalling MacRuby.
J
On Dec 4, 2009, at 13:00 , Robinson, John MD PhD wrote:
> Hi all,
>
> I am new to the list.
>
> While working through Geoffrey Grosenbach's tutorial on pee
cally. NSDecimalNumber seems to be
> left untouched, which could explain why the normal arithmetic operators do
> not work.
>
> Laurent
>
> On Nov 27, 2009, at 7:50 AM, John Shea wrote:
>
>> Hi all,
>>
>> does any one know whether there is an issue with b
Hi all,
does any one know whether there is an issue with binding to floats, doubles in
core data with macruby?
For example:
1 I firstly, create an attribute foo which is set as a double or a float in the
core data model
2. i bind it to a table column
3. I set foo to 300.3 in code (not through
Hi Gareth,
Have a look at the examples in Developer/Examples/Ruby/MacRuby - there are
good examples there which might be useful for you.
In this case your init method is an obvious problem, it must (as in
objective C) return self.
The super call is interesting because normally in ruby it will ca
. Prabhakar, Ph.D. wrote:
> Hi John,
>
> On Nov 23, 2009, at 12:55 PM, John Shea wrote:
>> No I assume at some stage the ruby block has to be turned into a C block
>> with associated scope - and from my limited knowledge on GCD that does not
>> seem so easy.
>
> Agai
>
>
> Did you mean the other way around? You seem to be discussing how to turn
> C blocks into Ruby blocks.
>
hmmm? no that was not my intent.
No I assume at some stage the ruby block has to be turned into a C block
with associated scope - and from my limited knowledge on GCD that does not
seem
Hi Pete,
I imagine that this bug is similar to one I posted (420). I was getting
similar behaviour and things much improved when I unrolled the loop. Maybe
you could try that? (or try what i suggest below).
I am waiting with bated breath to see Laurent's GCD code in the macruby
version of Sinatra
Hi Uliano,
The way I get the JIT to preprocess your fib code is simply to call the method
once. For example I wrapped your code in a class (not that I am saying that it
is necessary to do this - its just the first thing i tried and it worked) and
then.
(for example)
afib.fib_iter(sum,10)
and
I always assumed (with no direct evidence) that it was because in
Ruby, constants have to start with an uppercase letter, and so to
match various method signatures/types sent through BridgeSupport,
constant types must be passed as constant types.
Anyway for supported frameworks capitalising
gt; but undo is not there yet.
>
> Thanks,
>
> Steve
>
>
> On Oct 26, 2009, at 1:22 AM, John Shea wrote:
>
> Hi Steve,
> did you solve this one?
> if not perhaps you could post somewhere the MyDocument.rb code for us to
> look at?
> Cheers,
> J
>
> On
Hi Steve,
did you solve this one?
if not perhaps you could post somewhere the MyDocument.rb code for us to
look at?
Cheers,
J
On Sun, Oct 25, 2009 at 7:17 PM, s.ross wrote:
> I'm trying to implement the RaiseMan example from Aaron Hillegass's book in
> MacRuby. All has gone pretty well until I r
cores - so it
should be interesting.
Cheers,
John
On Oct 22, 2009, at 3:02 AM, Laurent Sansonetti wrote:
Hi John,
On Oct 20, 2009, at 10:11 AM, John Shea wrote:
Dear All,
(sorry for the long post)
I have been experimenting a bit with GCD in MacRuby 0.5 beta.
Cool!
I have managed to get
Dear All,
(sorry for the long post)
I have been experimenting a bit with GCD in MacRuby 0.5 beta.
I have managed to get some code working as I would expect it to work,
and I am wondering if a few of you could provide a sanity check that
everything i am doing is above board and not the resul
Hi Bernd,
YES and NO in ObjC are translated to true and false in MacRuby.
so you were probably after:
NSNumber.numberWithBool(false)
(I am curious as to how often that is useful actually)
I will leave the table idea for others to comment - I actually think
in the end there are only a few r
Hi Bob,
(you are going to kick yourself) you have misplaced the colon between
target and self - there is a comma there, and the colon has been
placed in front of "target", so the method is not being recognised.
eg:
@synchro_timer =
NSTimer.scheduledTimerWithTimeInterval(TIME_INTERVAL
Hello everyone.
So I think this topic is going to rear its ugly/pretty head until a
solution becomes available, and I myself would really like to be able
to use macruby code on the iphone.
So I have put down my naive thoughts as to what are the issues.
I am a complete novice when it comes
Hi Marinus / Rien,
I just did a quick test, given a nib with window and a controller ruby
file.
1. I dragged a checkbox NSButton onto the window
2. i created an attr_accessor :check in my controller
3. I created a method called test_check in my controller:
def test_check(sender)
p @che
Hello all,
anyone using DRb and macruby?
I know next to nothing about DRb but its giving me some crashes in
macirb that it is not in irb, for setting variables on the server side.
For example (I have coloured responses so its easier to see the
difference between input and output):
with t
Hi Paul,
I think when I first did it I just copied what an objective C document
based application did.
The thing that was not so obvious to me at the time was putting the
appropriate text in the Info.plist file.
I have a few document based application examples translated from
Hillegas a
I have translated and created some examples using opengl with MacRuby
here:
http://www.johnmacshea.org/examples/GameRelated/
The directory Mine/ has examples which although longer - are "cleaner"
HTH,
John
On May 25, 2009, at 20:59 , Matt Aimonetti wrote:
There is problem with macgem not i
Hi Timothy,
maybe you have figured it all out by now - but when doing openGL stuff
it is usually in the context (literally and metaphorically) of an
NSOpenGLView, you also have to overwrite the initWithFrame method and
a few other methods in this class. Within the init method you set up
t
al )
elsif to_yaml_properties.empty?
out.scalar( taguri, self, self =~ /^:/ ? :quote2 :
to_yaml_style )
else
out.map( taguri, to_yaml_style ) do |map|
map.add( 'str', "#{self}" )
to_yaml_properties.each do |m|
map.add( m, inst
Hello everyone,
I notice that NSMutableString nicely turns into a plain string when
you #to_yaml it.
Thats great since plays nicely with other ruby code.
NSString however becomes "!str:NSString" - is that by
design?
It would not matter to me except that #stringValue from NSTe
Hello Victor,
I see that there is not much action on the list at the moment - so I
will reply - the heavyweights do eventually drop by - but they are
very busy so it is a bit sporadic (unless its just my gmail playing up
again).
I haven't actually tried 2 and 3 on your list since I am try
Brian Marick has a good chapter on testing in his "RubyCocoa, bringing
some love. " using standard ruby testing methodologies. You can
get this as a pdf book (its not out in print yet)
(I am in no way affiliated to Brian, Aaron and the other Cocoa/Ruby
authors i mention on this list -
I guess the another thing to check is that you have actually set your
class (with the code below) to be the delegate in IB?
On Apr 3, 2009, at 14:56 , Brad Wilson wrote:
Haha I am out of ideas sorry Frisco. Good luck with it!
On 03/04/2009, at 10:25 PM, Frisco Del Rosario wrote:
Brad Wils
Hi there,
if you look about a quarter of the way down this page ( the introductory
tutorial) http://www.macruby.org/documentation/tutorial.html
you will see it all explained.
In this case:
- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)proposedFrame
could become:
windowShoul
oper Network podcast interview with
Aaron Hillegass on the Responder Chain:
http://www.mac-developer-network.com/shows/podcasts/lnc/lnc009/
Brian
2009/4/1 John Shea :
Hi Dave,
thanks for your answer.
On Apr 1, 2009, at 14:39 , Dave Baldwin wrote:
I haven't had any problems using delegate
Hi Dave,
thanks for your answer.
On Apr 1, 2009, at 14:39 , Dave Baldwin wrote:
I haven't had any problems using delegate methods. For example I do:
@tableView.delegate = self
and define a delegate method:
def tableView (table, shouldEditTableColumn: c, row: r)
Hi Dave,
I am actually wrestling with a similar problem.
I believe I have solved your problem, maybe you can solve mine ;-) ??
in the start method I placed:
@my_table_view.setTarget(self)
@my_table_view.setDoubleAction(:double)
and then later on a method:
def double
NSLog
Hi Matt,
you said:
> If you were thinking about helping out, be reassured, help is always welcome
> ;)
I would happily spend some time on MacRuby, but I have no idea where to start.
I downloaded the experimental branch - was not really sure to go from
there but tried running some simple ruby cod
Hello Edward,
well since no one else has answered i will speculate a bit (it might
provoke someone wiser).
I assume that the Ruby and the Objective C class are magically married
together perhaps via some sort of proxy class - since you cant as far
as i know add to an objective C class more instan
Here is the blurb:
http://www.macruby.org/project.html
J
On Mar 30, 2009, at 16:53 , Joel Reymont wrote:
How many people are actively developing MacRuby apart from Laurent?
Thanks, Joel
---
http://tinyco.de
Mac, Lisp, OCaml
___
MacRuby-d
Did I miss the answer to this one?
I have a similar issue returning bytes, voids, GLfloats etc
J
On Mar 22, 2009, at 11:18 PM, Pete Yandell wrote:
I'd like to use something like Ruby's String#unpack to pull some
info out of an NSData, but I'm stumped as to how to do it.
NSData.bytes returns
Hello Frisco,
one option for you is to become an expert in something MacRuby.
One area for example that could give you some good skills and could be good
for the MacRuby community (if you release the results) is the CoreAnimation
area, an area I was hoping I would have time for but will not.
So:
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 objec
Hi Laurent,
What sort of articles are you thinking of? I assume the blog's aim is to
attract new people.
I personally would not mind seeing an article on deploying an app to Leopard
without ruby/MacRuby installed.
I guess there will need to be a 0.4 article also (which i assume you are the
only o
, 2009 at 7:29 PM, Timothy McDowell wrote:
>
>> Can't download the files or even view them at your site/iDisk there...
>>
>> On Sun, Feb 15, 2009 at 11:06 AM, Jordan K. Hubbard wrote:
>>
>>>
>>> On Feb 14, 2009, at 11:37 PM, John Shea wrote:
>>>
&g
Hi Timothy,
I have converted Tim Burks RubyRocks - a simple Asteroids game to
MacRuby - with NSViews and another version to use OpenGL.
The OpenGL version has some ObjC code to get access to pixels.
They are at johmacshea.org - which bounces to my idisk while I am on
holidays - in the MacRu
Have to agree with Brian regarding Hillegass.
You can compare with my examples here : (http://www.johnmacshea.org/examples/
- which i will try to keep mirrored here:http://idisk.mac.com/johnmshea-Public?view=web
since i may turn my mac mini off when i go on holidays).
I would suggest tryin
Did someone answer this one - and I missed it?
I too am interested in what the current way to do this is.
Cheers,
J
On Jan 22, 2009, at 7:31 , Dr Nic Williams wrote:
I recently shared a MacRuby app with a friend, with MacRuby.framework
included in the .app via a Copy Files target; but the ap
textView seems rather tedious compared to textField to me.
Here is what I do (which does work when the view is made not editable):
class Controller
attr_writer :text_view #linked to the IB textView on your window
def awakeFromNib
replace_all_range = NSRange.new
you really need to do the allocation
yourself, it is significantly less painful and less error-prone to
have it done automatically, especially if you're using CoreGraphics
from MacRuby.
Brian
On Fri, Jan 9, 2009 at 12:00 AM, John Shea
wrote:
Thanks for the pointer ( ;-)) Dave,
I assu
t; structs, etc.
>
> Dave
>
> On Sat, Jan 3, 2009 at 12:28 AM, John Shea wrote:
> > So kind of on this topic ..
> > which one of these ("c", "i", "s" etc) do I use for void pointers (to
> > memory) eg. the data parameter in the metho
So kind of on this topic ..
which one of these ("c", "i", "s" etc) do I use for void pointers (to
memory) eg. the data parameter in the method below? (when otherwise
appropriately changed to ruby and Application.services imported etc).
CGContextRef CGBitmapContextCreate (
void *data,
Hi again Jim,
another note, down the bottom of the MacRuby tutorial
http://www.macruby.org/trac/wiki/MacRubyTutorial, you will see the words:
"On some occasions. you will want to load bridge support files that you
personally generated using gen_bridge_metadata(1). To do that, you can use
the Kerne
Hi Jim,looks like no one who really knows this stuff is offering anything -
so I will suggest some of my naive solutions / possibilities:
- as far as I know C functions, structs etc are brought into macruby by the
bridgesupport project: http://bridgesupport.macosforge.org/trac/ - however I
cannot
(I accidently sent this from the wrong email account initially)
Hello everyone,
Anyone done any macruby opengl?
I am trying to get Hillegass's opengl example going in MacRuby.
My MacRuby version falls over in the drawRect method of an
NSOpenGLView subclass, when it hits the glut function cal
That was it - the assign statement. Thanks very much!
I just assumed I was getting the object and not a copy ..
(and sorry I should have checked the samples first)
Cheers and thanks,
J
On Dec 3, 2008, at 23:00 , Laurent Sansonetti wrote:
Hi John,
On Dec 3, 2008, at 8:45 AM, John Shea
Hello all,
has anyone done any printing in MacRuby?
I can get it to print ok - if I select the page range, otherwise the
print routine wants to print thousands (or more - i got scared and
stopped it) pages.
The rectForPage and the drawRect get called those thousands of times -
even thoug
I think its interesting that Hot Cocoa in inspiring such different
ideas, I must admit my thoughts had not run anywhere as complex as
those below.
My first thought was "Wow! I can make a generic (or fairly static)
launcher and get it to load remotely both my view and model from ruby
file
Hi Ben,
thanks for your answer.
I tried that initially, but my subclass was having problems being
added to the layout view.
Anyway - somehow I got something going a little further - the
important thing was to have a create method which has :
alloc.initWithFrame([0, 0, *GameSize]) in my NS
Hi Yehuda,
Laurent kindly responded to a similar query from me :
His reply (Novemebr 24th):
In order to use these methods I introduced in trunk a class named
Pointer. You allocate a Pointer object by using the #new_with_type
method in which you pass the Objective-C type encoding. @ is for
Hi folks,
I am sure there is an easy answer to this question, but I have not
figured it out after some experimenting (nor can I find an example in
the examples)
What do I do if i want to subclass (say) an NSView ? And yet still
employ that subclass with all the rest of the hot cocoa magic
The RubyConf talk is up on confreaks too, for those of us not in the US:
http://rubyconf2008.confreaks.com/macruby-ruby-for-your-mac.html
J
On Nov 26, 2008, at 9:57 PM, Rich Morin wrote:
FYI...
Laurent Sansonetti of Apple will reprise his RubyConf 2008
talk on MacRuby, a version of Ruby 1.9
Hi Michael,
I too have difficulties with IB and bindings - mainly because they are
hard to debug - well I find them so (and not just in MacRuby).
When in doubt I blame an IB setting.
I quickly threw together something similar to what you have (except
with sliders) , and pretty quickly came
65 matches
Mail list logo