You can subscribe to this list here.
| 2002 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(3) |
Nov
|
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(1) |
Feb
(11) |
Mar
(9) |
Apr
(1) |
May
(5) |
Jun
(5) |
Jul
(4) |
Aug
(3) |
Sep
(15) |
Oct
(8) |
Nov
(9) |
Dec
(11) |
| 2004 |
Jan
(5) |
Feb
(2) |
Mar
(1) |
Apr
(3) |
May
(6) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(3) |
| 2005 |
Jan
(1) |
Feb
(7) |
Mar
(6) |
Apr
(36) |
May
(20) |
Jun
(42) |
Jul
(21) |
Aug
(12) |
Sep
(56) |
Oct
(5) |
Nov
(55) |
Dec
(53) |
| 2006 |
Jan
(43) |
Feb
(83) |
Mar
(98) |
Apr
(42) |
May
(68) |
Jun
(55) |
Jul
(50) |
Aug
(104) |
Sep
(13) |
Oct
(70) |
Nov
(37) |
Dec
(42) |
| 2007 |
Jan
(56) |
Feb
(18) |
Mar
(43) |
Apr
(80) |
May
(65) |
Jun
(149) |
Jul
(103) |
Aug
(71) |
Sep
(62) |
Oct
(67) |
Nov
(72) |
Dec
(63) |
| 2008 |
Jan
(64) |
Feb
(63) |
Mar
(31) |
Apr
(42) |
May
(71) |
Jun
(62) |
Jul
(37) |
Aug
(25) |
Sep
(5) |
Oct
(2) |
Nov
(7) |
Dec
(14) |
| 2009 |
Jan
(20) |
Feb
(15) |
Mar
(19) |
Apr
(8) |
May
(7) |
Jun
|
Jul
(37) |
Aug
(12) |
Sep
(19) |
Oct
(5) |
Nov
(1) |
Dec
(4) |
| 2010 |
Jan
(5) |
Feb
(24) |
Mar
(16) |
Apr
(9) |
May
(4) |
Jun
|
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(7) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(5) |
Dec
|
| 2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: Yvon T. <tho...@fr...> - 2006-03-06 09:25:25
|
Hey all,
i want to use the Apple Event Manager iget URL.
i've allready started to implement the "(void)handleGetURLEvent:
(NSAppleEventDescriptor *)event withReplyEvent:
(NSAppleEventDescriptor *)replyEvent"
in ruby. This method is called when a type-in something like :
bmkm:0000000000
in the url field of Safaro or Firefox.
the ADC page on that subject says :
> Listing 3 Implementation of a get URL Apple event handler
>
> - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event
> withReplyEvent:(NSAppleEventDescriptor *)replyEvent
>
> {
>
> // Extract the URL from the Apple event and handle it here.
>
> }
which is a bit short and doen't explain at all how to extract the Url.
after some expiremntal work, i've found i've to look at
"OSX::NSAppleEventDescriptor.data", it's where i am.
if i print-out the event.data.class i get : OSX::OCObject.
then, if i print-out it's value i get (shorted) :
<646c6532 00000000 61657674 00000138 00000000 00000000 [...]
626d6b6d 3a303030 30303030 30303000 >
after i typed in safari "bmkm:0000000000" (ten zeros)
the ten lasts "30" is the hex code of the ascii char "0" (zero).
i've verified typing-in ten "1" and getting back ten "31".
how could i recover my string "bmkm:0000000000" from the above
returned value ?
i think i have something to do with unpack ?
Yvon
the full returned "value" :
<646c6532 00000000 61657674 00000138 00000000 00000000 0000011c
00000004 00000001 00000000 00000000 00000000 4755524c 4755524c
3d06029f 0000a601 0000a601 00722858 048e8d30 00000000 007908bc
00000000 00000001 001683f7 04ee497b 00000000 04ee7c00 00000014
03a40538 00000001 048e8d60 0000a601 0000a601 00722858 048e8d70
00000000 61657674 00010001 7472616e 6c6f6e67 00000004 00000000
61646472 70736e20 00000008 00000000 024e0001 74627363 70736e20
00000008 00000000 00000000 696e7465 6c6f6e67 00000004 00000070
72657071 6c6f6e67 00000004 00000000 74627363 70736e20 00000008
00000000 00000000 72656d6f 6c6f6e67 00000004 00000000 66726f6d
70736e20 00000008 00000000 024e0001 3b3b3b3b 2d2d2d2d 54455854
0000000f 626d6b6d 3a303030 30303030 30303000 >
|
|
From: Yvon T. <tho...@fr...> - 2006-03-06 06:29:10
|
Le 4 mars 06 =E0 21:37, Tim Burks a =E9crit : > You can find it here: http://www.rubycocoa.com/rubification-central > if i had read "2.3 While you are rubifying..." i'd avoid some probs i =20= get when rubyfying ))) Yvon= |
|
From: Jonathan P. <jp...@dc...> - 2006-03-05 22:18:11
|
On 5 Mar 2006, at 22:08, Yvon Thoraval wrote: > for the difference between N and L i must investigate further > because i didn't pass any arg for the time being, i need just a > string as it is done with the man: protocol able, on Safari, using > Sogudi, to display a well formated html page from the related man > page. I think definitely N is correct. On PowerPC there is no difference between N and L. However, if your code were to run on an Intel mac, it would not work if you used L. |
|
From: Yvon T. <tho...@fr...> - 2006-03-05 22:10:30
|
Le 5 mars 06 =E0 22:39, Jonathan Paisley a =E9crit : > Do you mean you have got it working? yes with GURL and L itlaunch the app if it isn't, even from Firefox now, i've discovered =20 a web page describing how to "Registering an unsupported protocol" =20 following a talk on usenet with Patrick Stabelman, if interested see =20 <http://kb.mozillazine.org/Register_protocol>. > >> it remains to me understanding why it is "#unpack('L')[0]" > > The constants are defined as 'abcd' in the C header file. 'abcd' is =20= > non-standard C syntax for a multi character literal integer, =20 > interpreted as four bytes 'a' 'b' 'c' and 'd', with 'a' being the =20 > most significant byte. > > Given these as a ruby string 'abcd', treating the four string bytes =20= > as an unsigned long gives the appropriate value. > > Having originally suggested the format specifier 'L' for unpack, I =20 > realise now it should actually be 'N', which treats the data in the =20= > correct order. The 'L' code would work properly on PowerPC, but not =20= > Intel. > > So 'gurl'.unpack('N')[0]. > i did some try-out : with 'GURL'.unpack('N')[0] (changing only L to N) i got : "handleGetURLEvent_withReplyEvent(event, replyEvent)" from : def handleGetURLEvent_withReplyEvent(event, replyEvent) p "handleGetURLEvent_withReplyEvent(event, replyEvent)" end then N works as well as L. i've tried also : 'gurl'.unpack('N')[0] which failed to work. i've read on a pyton list that it is GURL definitely. for the difference between N and L i must investigate further because =20= i didn't pass any arg for the time being, i need just a string as it =20 is done with the man: protocol able, on Safari, using Sogudi, to =20 display a well formated html page from the related man page. best, Yvon= |
|
From: Jonathan P. <jp...@dc...> - 2006-03-05 21:40:18
|
On 5 Mar 2006, at 19:36, Yvon Thoraval wrote:
> it is 'GURL' not 'gurl' working...
Do you mean you have got it working?
> it remains to me understanding why it is "#unpack('L')[0]"
The constants are defined as 'abcd' in the C header file. 'abcd' is
non-standard C syntax for a multi character literal integer,
interpreted as four bytes 'a' 'b' 'c' and 'd', with 'a' being the
most significant byte.
Given these as a ruby string 'abcd', treating the four string bytes
as an unsigned long gives the appropriate value.
Having originally suggested the format specifier 'L' for unpack, I
realise now it should actually be 'N', which treats the data in the
correct order. The 'L' code would work properly on PowerPC, but not
Intel.
So 'gurl'.unpack('N')[0].
|
|
From: Yvon T. <tho...@fr...> - 2006-03-05 20:10:50
|
Hey all,
i'm using an NSAlert as a sheet then i need to pass some args within
contextInfo in order to know what to do within
"#alertDidEnd_returnCode_contextInfo(alert, returnCode, contextInfo)"
for example what method to call with which objects.
i had a look about the class of the returned contextInfo giving :
contextInfo.class = OSX::ObjcPtr (presumably an Obj-C Pointer) ?
my first try used a string as a contextInfo : "this is the contextInfo".
the value returned by contextInfo.to_s was : #<OSX::ObjcPtr:0x3b3f510>
is their a way to transform that into a ruby object ?
as for example using #to_rbobj ???
the better for me would be to pass a method with it's associated args
for example :
saveFile("thisFileName")
how could i implement that with contextInfo ???
Yvon |
|
From: Yvon T. <tho...@fr...> - 2006-03-05 19:38:31
|
Le 4 mars 06 =E0 17:31, Jonathan Paisley a =E9crit :
> 'handleGetURLEvent:withReplyEvent:', 'gurl'.unpack('L')[0], =20
> 'gurl'.unpack('L')[0])
it is 'GURL' not 'gurl' working...
it remains to me understanding why it is "#unpack('L')[0]"
i've understood what is unpack['L']
according to <http://www.rubycentral.com/book/=20
ref_c_string.html#String.unpack> :
L Treat four1 successive characters as an unsigned native long =20
integer.
but not from where i would have been able to find that by myself ))
Yvon=
|
|
From: Tim B. <tim...@gm...> - 2006-03-05 12:44:57
|
Hi Yvon, Thanks, that's great! I've set up an article to present the =20 conversions and included some guidelines for contributors. You can find it here: http://www.rubycocoa.com/rubification-central Tim On Mar 4, 2006, at 5:36 AM, Yvon Thoraval wrote: > > Le 4 mars 06 =E0 03:12, Tim Burks a =E9crit : > >> If anyone else is willing to share conversions of their own, I'd =20 >> gladly host those online as well. > > I've finished the "Rubyfication" of "NameAndAddress" let me know =20 > what text to add around for your pages. > > the Cocoa-Obj-C lying at : > <http://developer.apple.com/samplecode/NameAndAddress/=20 > NameAndAddress.html> > > best, > > Yvon |
|
From: Yvon T. <tho...@fr...> - 2006-03-04 16:56:49
|
Le 4 mars 06 =E0 17:48, Yvon Thoraval a =E9crit : > > also Apple says the best place is to put that in =20 > "applicationWillFinishLaunching", i'll try that. > > nothing more too ))) Yvon= |
|
From: Yvon T. <tho...@fr...> - 2006-03-04 16:50:31
|
Le 4 mars 06 =E0 17:31, Jonathan Paisley a =E9crit :
> If your handler is called 'handleGetURLEvent_withReplyEvent', then =20
> the 'andSelector' argument above must be =20
> 'handleGetURLEvent:withReplyEvent:'. i.e.:
>
> =20
> appleEventManager.setEventHandler_andSelector_forEventClass_andEventID=20=
> (self,
> 'handleGetURLEvent:withReplyEvent:', 'gurl'.unpack('L')[0], =20
> 'gurl'.unpack('L')[0])
>
nothing more...
even if i put :
@appleEventManager=3DOSX::NSAppleEventManager...
in the method :
windowDidBecomeMain(sender)
because i had the feeling it might be too early in awakeFromNib"
also Apple says the best place is to put that in =20
"applicationWillFinishLaunching", i'll try that.
Yvon=
|
|
From: Jonathan P. <jp...@dc...> - 2006-03-04 16:31:54
|
On 4 Mar 2006, at 16:17, Yvon Thoraval wrote:
>
> @appleEventManager.setEventHandler_andSelector_forEventClass_andEventI
> D(self,
> 'GURL', 'gurl'.unpack('L')[0].to_i, 'gurl'.unpack('L')[0].to_i)
> def handleGetURLEvent_withReplyEvent(event, replyEvent)
If your handler is called 'handleGetURLEvent_withReplyEvent', then
the 'andSelector' argument above must be
'handleGetURLEvent:withReplyEvent:'. i.e.:
appleEventManager.setEventHandler_andSelector_forEventClass_andEventID
(self,
'handleGetURLEvent:withReplyEvent:', 'gurl'.unpack('L')[0],
'gurl'.unpack('L')[0])
|
|
From: Jonathan P. <jp...@dc...> - 2006-03-04 16:29:37
|
On 4 Mar 2006, at 16:04, Yvon Thoraval wrote: > 2006-03-04 16:58:32.982 NameAndAddress[9232] Exception raised > during posting of notification. Ignored. > exception: NSTextField#id - methodSignature is nil. > Ah, sorry. __ocid__ is what I was looking for. However, this is an internal of RubyCocoa, so it's not something that should be relied upon. |
|
From: Yvon T. <tho...@fr...> - 2006-03-04 16:19:20
|
Hey all,
following Jonathan advices i've put in "awakeFromNib" :
@appleEventManager=OSX::NSAppleEventManager.sharedAppleEventManager
@appleEventManager.setEventHandler_andSelector_forEventClass_andEventID(
self, 'GURL', 'gurl'.unpack('L')[0].to_i, 'gurl'.unpack('L')[0].to_i)
however the following :
def handleGetURLEvent_withReplyEvent(event, replyEvent)
p "handleGetURLEvent_withReplyEvent(event, replyEvent)"
end
is never called, even if i type in the Safari' url field "bmkm:blahblah"
the application get frontmost then "bmkm:" is recognize by the Apple
Event Manager send to the correct app (in case it isn't running the
app shows up).
some light upon that ?
Yvon |
|
From: Yvon T. <tho...@fr...> - 2006-03-04 16:06:22
|
Le 4 mars 06 =E0 16:52, Jonathan Paisley a =E9crit :
>
> foo.oc_id =3D=3D bar.oc_id
>
> 'oc_id' refers to the native objective c object value.
using :
def controlTextDidChange(notification)
textField=3Dnotification.object
button =3D (textField.oc_id =3D=3D @iPAddressField.oc_id) ? =20
@hostNameButton : @iPAddressButton
#button =3D (textField.tag.to_i =3D=3D @iPAddressField.tag.to_i) =
? =20
@hostNameButton : @iPAddressButton
(textField.stringValue.to_s.strip =3D=3D "")? button.setEnabled=20=
(false) : button.setEnabled(true)
button.oc_display
end
i got :
2006-03-04 16:58:32.982 NameAndAddress[9232] Exception raised during =20
posting of notification. Ignored.
exception: NSTextField#id - methodSignature is nil.
however, using hash it's ok, without any tag value... :
button =3D (textField.hash =3D=3D @iPAddressField.hash) ? =
@hostNameButton : =20
@iPAddressButton
that's not a big prob, better to know.
Yvon=
|
|
From: Jonathan P. <jp...@dc...> - 2006-03-04 15:52:30
|
On 4 Mar 2006, at 13:09, Yvon Thoraval wrote: > then it seems the reference of those two object coudn't be the same > in RubyCoca, even if they're the same object ???? > I think that's a limitation of how RubyCocoa operates at the moment. I have a patch in the works for it, but unfinished as yet. You could try: foo.oc_id == bar.oc_id 'oc_id' refers to the native objective c object value. |
|
From: Yvon T. <tho...@fr...> - 2006-03-04 13:38:24
|
Le 4 mars 06 =E0 03:12, Tim Burks a =E9crit : > If anyone else is willing to share conversions of their own, I'd =20 > gladly host those online as well. I've finished the "Rubyfication" of "NameAndAddress" let me know what =20= text to add around for your pages. the Cocoa-Obj-C lying at : <http://developer.apple.com/samplecode/NameAndAddress/=20 NameAndAddress.html> best, Yvon= |
|
From: Yvon T. <tho...@fr...> - 2006-03-04 13:10:57
|
Le 4 mars 06 =E0 11:24, Jonathan Paisley a =E9crit :
>
> I found that surprising too!
>
something surprising also is object comparison here it is :
in Obj-C :
- (void)controlTextDidChange:(NSNotification *)notification
{
NSControl *textField;
NSButton *button;
// get the field that is sending the notification
textField =3D [notification object];
// get the button that corresponds to the field
button =3D (textField =3D=3D IPAddressField) ? hostNameButton : =20
IPAddressButton; #### <=3D=3D=3D HERE
// disable that button if the field is empty
[[textField stringValue] isEqualToString:@""] ? [button =20
setEnabled:NO] : [button setEnabled:YES];
}
if i translate to :
def controlTextDidChange(notification)
textField=3Dnotification.object
button =3D (textField =3D=3D @iPAddressField) ? @hostNameButton : =
=20
@iPAddressButton #### <=3D=3D=3D HERE
(textField.stringValue.to_s =3D=3D "")? button.setEnabled(false) =
: =20
button.setEnabled(true)
button.oc_display
end
the comparison ("(textField =3D=3D @iPAddressField)") returns always =20
false, meaning a notification.object coundn't be the "same" object as =20=
@iPAddressField ???
(never got that strange behaviour in Cocoa-Java, may be i'm wrong in =20
the ruby side)
then, i had to add two different tag values in Inteface Builder giving :
def controlTextDidChange(notification)
textField=3Dnotification.object
button =3D (textField.tag.to_i =3D=3D @iPAddressField.tag.to_i) ? =
=20
@hostNameButton : @iPAddressButton #### <=3D=3D=3D HERE
(textField.stringValue.to_s =3D=3D "")? button.setEnabled(false) =
: =20
button.setEnabled(true)
button.oc_display
end
and that works.
then it seems the reference of those two object coudn't be the same =20
in RubyCoca, even if they're the same object ????
again, i feel i'm misunderstanding something for that particular point.
Yvon
|
|
From: Yvon T. <tho...@fr...> - 2006-03-04 12:30:46
|
Le 4 mars 06 =E0 11:38, Jonathan Paisley a =E9crit : > >> ents/Resources/nameAndAddress.rb:21: class/module name must be =20 >> CONSTANT (SyntaxError) > > Class names must start with a capital [1]. The rails trend appears =20 > to be naming the file in the lowercase_underscores scheme. So a =20 > class called MyImportantThing would go in my_important_thing.rb. in the same area, i've found that an "ib_outlet" could only start =20 with a lower case letter otherwise it is taken, by Ruby, as a =20 constant then, if not initialized as such, return a NilClass... this as to be written somewhere on the Tim's pages speaking about =20 Rubyfication... best, Yvon= |
|
From: Yvon T. <tho...@fr...> - 2006-03-04 11:47:24
|
Le 4 mars 06 =E0 12:20, Jonathan Paisley a =E9crit :
>
> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/=20=
> Frameworks/AE.framework/Versions/A/Headers/AERegistry.h
i've seen this file.
>
> Command-double-click is the same as control-click (context menu) -> =20=
> Jump to Definition. It only works if Xcode has seen the symbol in =20
> question whilst building the project. Try upgrading the target to =20
> native: "Project" menu -> "Upgrade all targets in project to =20
> native" and ensuring that the new '(Upgraded)' target is selected.
the new upgraded was selected but i don't get the header file even =20
with contextual menu.
and even after a failed build because of the added =20
"kAEInternetSuite" ...
>
>> NSHost *host;
>>
>> host =3D [NSHost currentHost];
>
> OSX::NSHost.currentHost
>
> This is the same thing as you had to do for
>
> [NSAppleEventManager sharedAppleEventManager] // objective C
>
> OSX::NSAppleEventManager.sharedAppleEventManager // ruby
>
ok, i get it in between :
@host=3DOSX::NSHost
@hostNameField.setStringValue @host.currentHost.name.to_s
best,
Yvon=
|
|
From: Jonathan P. <jp...@dc...> - 2006-03-04 11:21:11
|
>>
>> Try typing 'kAEInternetSuite' into the 'main.m' file (anywhere)
>> and command-double-clicking on it. This should bring up the
>> AERegistry.h header file:
>
> i'ce carrefully look at the XCode preferences but find no way to
> allow that, command double-clicking doesn't open the header file.
Hmmn. The file you need is:
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
Frameworks/AE.framework/Versions/A/Headers/AERegistry.h
Command-double-click is the same as control-click (context menu) ->
Jump to Definition. It only works if Xcode has seen the symbol in
question whilst building the project. Try upgrading the target to
native: "Project" menu -> "Upgrade all targets in project to native"
and ensuring that the new '(Upgraded)' target is selected.
> NSHost *host;
>
> host = [NSHost currentHost];
OSX::NSHost.currentHost
This is the same thing as you had to do for
[NSAppleEventManager sharedAppleEventManager] // objective C
OSX::NSAppleEventManager.sharedAppleEventManager // ruby
|
|
From: Yvon T. <tho...@fr...> - 2006-03-04 10:45:57
|
Le 4 mars 06 =E0 11:00, Jonathan Paisley a =E9crit :
>
> Those constants aren't wrapped at the moment. But you can look them =20=
> up yourself in the C header file.
yes it's best giving to me tricks letting me arranged by myself.
> Try typing 'kAEInternetSuite' into the 'main.m' file (anywhere) and =20=
> command-double-clicking on it. This should bring up the =20
> AERegistry.h header file:
i'ce carrefully look at the XCode preferences but find no way to =20
allow that, command double-clicking doesn't open the header file.
>
> kAEInternetSuite =3D 'gurl',
> kAEISGetURL =3D 'gurl',
>
> (they happen to be the same). This will need to be converted to an =20
> integer, so you could try
>
ok, i need first to find a way to read headers by command double-=20
clicking, because i get somehow the same prob in order to translate =20
into ruby the following Obj-C (in "NameAndAddress") :
NSHost *host;
host =3D [NSHost currentHost];
i've tried :
@host=3DOSX::NSHost(OSX::NSHost.currentHost)
getting :
2006-03-04 11:41:54.096 NameAndAddress[5069] Exception raised during =20
posting of notification. Ignored. exception: undefined method =20
`NSHost' for OSX:Module
and :
@host=3DOSX.NSHost(OSX.NSHost.currentHost)
getting the same error :
2006-03-04 11:43:12.157 NameAndAddress[5139] Exception raised during =20
posting of notification. Ignored. exception: undefined method =20
`NSHost' for OSX:Module
best,
Yvon=
|
|
From: Jonathan P. <jp...@dc...> - 2006-03-04 10:39:10
|
On 4 Mar 2006, at 10:32, Yvon Thoraval wrote: > also i've find that i can't named the "nameAndAddress.rb" because > this is a class and must start with an upper letter. The case of the file name doesn't matter, but... > ents/Resources/nameAndAddress.rb:21: class/module name must be > CONSTANT (SyntaxError) Class names must start with a capital [1]. The rails trend appears to be naming the file in the lowercase_underscores scheme. So a class called MyImportantThing would go in my_important_thing.rb. > Am I discovering Ruby ? I think so! :) [1] This is because classes get assigned to a constant, and constants in ruby must start with a capital letter. |
|
From: Yvon T. <tho...@fr...> - 2006-03-04 10:34:45
|
Le 4 mars 06 =E0 11:24, Jonathan Paisley a =E9crit : > > I found that surprising too! > > I would say it's probably not worth changing 'rb_main.rb' - the =20 > purpose of it is to load any other .rb files you have created. So =20 > just make yourfile.rb and it'll get loaded. Also, standaloneify.rb =20 > depends on file being called 'rb_main.rb' (because it patches the =20 > file before running the application). right ! i don't think i'll standalonify this try-out "NameAndAddress" also i've find that i can't named the "nameAndAddress.rb" because =20 this is a class and must start with an upper letter. otherwise you get the error message : /Users/yvon/work/CocoaRubyfication/NameAndAddress/build/Default/=20 NameAndAddress.app/Contents/Resources/nameAndAddress_main.rb:16:in =20 `require': /Users/yvon/work/CocoaRubyfication/NameAndAddress/build/=20 Default/NameAndAddress.app/Contents/Resources/nameAndAddress.rb:21: =20 class/module name must be CONSTANT (SyntaxError) class nameAndAddress < OSX::NSObject Am I discovering Ruby ? best, Yvon= |
|
From: Jonathan P. <jp...@dc...> - 2006-03-04 10:24:25
|
> and i've discovered, what i've never used before, that a method, > within ruby, couldn't start with an upper case letter ))) I found that surprising too! I would say it's probably not worth changing 'rb_main.rb' - the purpose of it is to load any other .rb files you have created. So just make yourfile.rb and it'll get loaded. Also, standaloneify.rb depends on file being called 'rb_main.rb' (because it patches the file before running the application). |
|
From: Jonathan P. <jp...@dc...> - 2006-03-04 10:00:49
|
On 4 Mar 2006, at 6:00, Yvon Thoraval wrote:
> very good, i apreciate very much your effort, i'm reading your
> pages right now hopping i could find a solution where i'm stuck :
>
> @appleEventManager=OSX::NSAppleEventManager.sharedAppleEventManager #
> ## OK
> @appleEventManager.setEventHandler_andSelector_forEventClass_andEventI
> D(self, 'GURL', <?>.kAEInternetSuite, <?>.kAEISGetURL)
>
> with two args in order to implement Apple Event "Get URL".
>
Those constants aren't wrapped at the moment. But you can look them
up yourself in the C header file. Try typing 'kAEInternetSuite' into
the 'main.m' file (anywhere) and command-double-clicking on it. This
should bring up the AERegistry.h header file:
kAEInternetSuite = 'gurl',
kAEISGetURL = 'gurl',
(they happen to be the same). This will need to be converted to an
integer, so you could try
'gurl'.unpack('L')[0]
|