Hi everybody,
This is my first message to the mailing list, I am a newbie in Cocoa
so please bear with me...
In my first serious MacRuby project, I have subclassed
NSTextFieldCell and I have redefined drawInteriorWithFrame with the
following code:
def drawInteriorWithFrame( rec
I think there's a problem with your method call. If you look at the
cocoa doc is has a selector with the signature:
drawInRect:fromRect:operation:fraction.
To call that from MacRuby you'd want to do something like:
icon.drawInRect(rect, fromRect:NSZeroRect,
operationNSCompositeSourceOver, fra
Sorry few typos in there, the only one that really matters is that the
method call should be:
icon.drawInRect(rect, fromRect:NSZeroRect,
operation:NSCompositeSourceOver, fraction:1.0)
On 13/11/2008, at 9:09 PM, Brad Wilson wrote:
I think there's a problem with your method call. If you look
#161: `macgem install` fails for the "wirble" gem
--+-
Reporter: [EMAIL PROTECTED] | Owner: [EMAIL PROTECTED]
Type: defect| Status: new
Priority: minor
Since I can't use mechanize, hpricot or nokogiri, what are my alternatives
to parse HTML/XML?
What about JSON?
Rich, I believe you showed me a twitter app you were working on, would you
mind sharing what libs you use?
Thanks,
-Matt
___
MacRuby-devel m
You can use NSXMLParser (its a SAX-style parser).
I mapped it into HotCocoa with xml_parser:
xml_parser(:file => "myfile.xml") do |parser|
# set of Delegate blocks (see below)
end.parse
Delegate blocks:
on_start_document
on_end_document
on_start_element { | element, namespace_uri, qualifie
Hi Brad,
That worked! Many thanks for putting me in the right path and next
time I will read the documentation twice!
Cheers,
Pedro.
On 13 Nov 2008, at 10:13, Brad Wilson wrote:
Sorry few typos in there, the only one that really matters is that
the method call should be:
icon.drawInRect(r