[Rubycocoa-devel 110] Re: Sample contribution

Back to archive index

kimura wataru kimur****@i*****
Sat Oct 15 21:39:45 JST 2005


Hi,

Thanks for your contribution. I have some suggestions about your code.

(1) latest CVS version of RubyCocoa supports Key-Value Coding. So, 
    Spotlight.app runs without KeyValueCoding.rb.
(2) I wrote a patch to ignore parse failure of a invalid search format.

--- Spotlight.rb.org    2005-09-14 21:36:45.000000000 +0900
+++ Spotlight.rb    2005-09-14 22:24:26.000000000 +0900
@@ -21,7 +21,11 @@
    end
    
    def search
-       predicateToRun = OSX::NSPredicate.predicateWithFormat(@predicate, nil)
+    begin
+         predicateToRun = OSX::NSPredicate.predicateWithFormat(@predicate, nil)
+    rescue 
+      return # stop search when NSPredicate fails to parse
+    end
        @query.setPredicate(predicateToRun)
        @query.startQuery()
    end


If you allow, I will add your sample to RubyCocoa with the changes.


>Please, let me know if you need something else.
> Regards,
> Norberto Ortigoza
>
> On 10/13/05, FUJIMOTO Hisa <hisa****@fobj*****> wrote:
>>
>> Hi Norberto-san,
>>
>> 2005/9/21, Norberto Ortigoza <norbe****@gmail*****>:
>> > On 9/21/05, FUJIMOTO Hisa <hisa****@fobj*****> wrote:
>> > > Hola Norberto,
>> > > Then, rubycocoa-0.4.2 will be released which include CoreData support
>> > > and Norberto-san's contibuted sample code.
>>
>> Kimura-san (who is active rubycocoa developer) may send an e-mail about
>> detail of Norbero-san's code to you.
>>



-- 
kimura wataru
<mailto:kimur****@i*****>



More information about the Rubycocoa-devel mailing list
Back to archive index