On 07/05/2010, at 4:01 PM, Thibault Martin-Lagardette wrote:
> The reason #new currently behaves this way is to work for every object,
> wether it's Ruby or Cocoa.
> For #new to work like you expect (which I agree totally makes sense), instead
> of having #new aliasing [[obj alloc] init], we cou
Hi!
I totally agree that it is a little confusing. But #new an #new(owner) are two
different methods, especially in Obj-C.
Calling A.new(arg) cannot call -init, since -init doesn't take any argument, so
it will call any initializer method that takes one argument :-).
This is why:
class A; def i
The reason #new currently behaves this way is to work for every object, wether
it's Ruby or Cocoa.
For #new to work like you expect (which I agree totally makes sense), instead
of having #new aliasing [[obj alloc] init], we could alias it to [[obj alloc]
initialize], and have -initialize redirec
On 07/05/2010, at 2:17 PM, Thibault Martin-Lagardette wrote:
> Glad it works :-)
>
> The reason why your example doesn't work is because in MacRuby, String
> descends from NSString, which is a Foundation object. Foundation objects use
> "init" and not "initalize", and for syntaxic sugar reasons
#612: RegexpError: U_REGEX_BAD_ESCAPE_SEQUENCE
-+--
Reporter: cehoff...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blocker
This is only true if you follow objc init I think... for example...
I came across this problem with NSWindowController and it took me a while to
figure out.
class PasswordController < NSWindowController
def initialize
initWithWindowNibName("Password") ##FAIL Never called! init called inste
#692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks
+---
Reporter: m...@… |Owner: lsansone...@…
Type: defect | Status: closed
On 07/05/2010, at 1:03 PM, Laurent Sansonetti wrote:
> Hi Paul,
>
> You're right, the Pointer class must be used. Sorry about the lack of
> documentation. Here is a snippet that might work:
>
> # n must be defined
> origins = Pointer.new(CGPoint.type, n) # this builds a pointer to n times
> CG
On 07/05/2010, at 1:08 PM, Matt Aimonetti wrote:
> Duly noted ;)
Actually Matt, could you perhaps consider a chapter on the subject of
interfacing MacRuby to the various "Core xxx" C-language frameworks, which is
not quite as straightforward as the seamless integration of MacRuby with Cocoa
cl
Glad it works :-)
The reason why your example doesn't work is because in MacRuby, String descends
from NSString, which is a Foundation object. Foundation objects use "init" and
not "initalize", and for syntaxic sugar reasons, #new is aliased to [[obj
alloc] init] on Foundation objects :-).
$>
> From: Thibault Martin-Lagardette
>
> What you can do is a "factory" just like this:
>
...
> You can also do a more Cocoa-ish way:
>
...
> Hope that helps!
yep, that all works... I'd rather be doing it in a more Ruby-ish way though...
:)
Is the fact that the Ruby-standard initialize meth
#697: potential regex bug
---+
Reporter: daniel.fonta...@… |Owner: lsansone...@…
Type: defect | Status: closed
Priority: blocker|
#679: U_REGEX_BAD_ESCAPE_SEQUENCE while requiring nokogiri
--+-
Reporter: dml...@… |Owner: lsansone...@…
Type: defect| Status: closed
Priority: major
Duly noted ;)
Sent from my iPhone
On May 6, 2010, at 20:06, "Jordan K. Hubbard" wrote:
On May 6, 2010, at 8:03 PM, Laurent Sansonetti wrote:
You're right, the Pointer class must be used. Sorry about the lack
of documentation. Here is a snippet that might work:
# n must be defined
origin
On May 6, 2010, at 8:03 PM, Laurent Sansonetti wrote:
> You're right, the Pointer class must be used. Sorry about the lack of
> documentation. Here is a snippet that might work:
>
> # n must be defined
> origins = Pointer.new(CGPoint.type, n) # this builds a pointer to n times
> CGPoint
> CTFr
Hi Paul,
On May 6, 2010, at 7:59 PM, Paul Howson wrote:
> I need some help with this example which arises at the boundary between
> MacRuby and the C Core Text framework.
>
> Consider the following Core Text function definition:
>
> void CTFrameGetLineOrigins( CTFrameRef frame, CFRange ran
I need some help with this example which arises at the boundary between MacRuby
and the C Core Text framework.
Consider the following Core Text function definition:
void CTFrameGetLineOrigins( CTFrameRef frame, CFRange range, CGPoint
origins[] )
The third argument is defined as:
"origins
#697: potential regex bug
---+
Reporter: daniel.fonta...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blocker|
#696: net/ftp doesn't work
---+
Reporter: daniel.fonta...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: blocker|
#695: Bitwise operations on Float results in Seg fault
---+
Reporter: nik...@… |Owner: lsansone...@…
Type: defect | Status: closed
Priority: major
#692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks
+---
Reporter: m...@… | Owner: lsansone...@…
Type: defect | Status: new
P
Hi Daniel,
This looks like a bug in MacRuby, could you report this to the tracker? We will
continue the investigation there.
Thanks,
Laurent
On May 5, 2010, at 5:07 PM, Daniel Fontaine wrote:
> Does Net::FTP not work on MacRuby 0.6? I am trying a simple
> Net::FTP.new(server, user, password)
Hi Dave,
#class is really a corner case here, we force the Ruby version when calling it
from Ruby because it's slightly different than the Cocoa version. (+[NSObject
class] returns self, while Ruby expects Module or Class to be returned). If you
want to use the Cocoa version, you can use -perfo
#692: Embedded MacRuby still tries to use ruby library from /Library/Frameworks
+---
Reporter: m...@… | Owner: lsansone...@…
Type: defect | Status: new
P
#669: Unable to find QTKit constant within a MacRuby app
+---
Reporter: martinlagarde...@… |Owner: lsansone...@…
Type: defect | Status: closed
Priori
#690: calling `!= nil' on an NSString raises a TypeError exception
---+
Reporter: lsansone...@… |Owner: lsansone...@…
Type: defect | Status: closed
Priori
#685: inject doesn't work with Procs
-+--
Reporter: hghoe...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major
#691: Runtime should allow pointer types for C-string arguments
+---
Reporter: m...@… |Owner: lsansone...@…
Type: enhancement | Status: closed
Priority: majo
#684: MacRuby cannot run tests using the Shoulda gem
+---
Reporter: m...@… |Owner: lsansone...@…
Type: defect | Status: closed
Priority: major
#695: Bitwise operations on Float results in Seg fault
---+
Reporter: nik...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major
Hi!
I cannot really reproduce this unfortunately, but I would have a couple of
questions:
- That might be stupid, but did you try rebooting?
- What language are you using on your system?
- Did you ever try to "shrink" applications by getting rid of different
languages?
Thanks :-)
--
Thibault
#695: Bitwise operations on Float results in Seg fault
---+
Reporter: nik...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major
#680: String.crypt crashes when called with no arguments
---+
Reporter: nik...@… |Owner: lsansone...@…
Type: defect | Status: closed
Priority: minor
#694: framework 'Cocoa' in macirb crashes 0.6, 0.7
-+--
Reporter: mar...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major
For example, the method 'class' is present in objective C as well as in Ruby
but invoking obj.class will use the Ruby version How do I force the objc
version to be used instead? Obviously if the two version do the same thing
then this is a moot issue but if they do different things you may nee
#695: Bitwise operations on Float results in Seg fault
---+
Reporter: nik...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major
#694: framework 'Cocoa' in macirb crashes 0.6, 0.7
-+--
Reporter: mar...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major
#694: framework 'Cocoa' in macirb crashes 0.6, 0.7
-+--
Reporter: mar...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major
#694: framework 'Cocoa' in macirb crashes 0.6, 0.7
-+--
Reporter: mar...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major
On 06/05/2010, at 1:18 PM, Laurent Sansonetti wrote:
> Hi Paul,
>
> On May 5, 2010, at 7:57 PM, Paul Howson wrote:
>
>> On 26/04/2010, at 1:33 PM, MacRuby wrote:
>>
>> Hi Laurent,
>>
>> What would be a feasible workaround for this problem, given than I'm using
>> MacRuby 0.5 ?
>>
>> i.e. I'm
40 matches
Mail list logo