Re: find and replace in files

Davide Ficano <[email protected]>
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
Trent Mick ha scritto:
> Davide Ficano wrote:
>> If I submit the patch I must be compliant with find2.p.js 
>> implementation? I know you answer :P
>> This requires to rewrite my code.
> 
> That's why I'd be happy to just have you point out what you were doing. 
> It would of course be helpful for you to put the patch against 
> find2.p.js together, but I don't *expect* you to do the work. :)

Ok now I can't refactor code so users will need to use MoreKomodo :D
I hope to adapt code to Komodo gurus style very soon
You can find my poor implementation at

http://dafizilla.svn.sourceforge.net/viewvc/dafizilla/komodo/morekomodo/src/main/content/morekomodo/findfiles/findInFilesWidgetsInitializer.js?view=markup

> 
> 
>> If you accept the actual MoreKomodo implementation I can
>>
>> - add the id="search-in-files" to find2.p.xul (this simplifies access)
> 
> Agreed. That should definitely be added. I'll add that for subsequent 
> 5.0.x and 5.1.x builds. Done (see 
> http://svn.openkomodo.com/openkomodo/revision?rev=2852):
> 
>  komodo r26051 (trunk)
>  openkomodo r2852 (trunk)
>  komodo r26052 (5.0.x branch)
>  openkomodo r2853 (5.0.x branch)

Simply fantastic. I've added its usage to MoreKomodo

> 
> However, can you not just look at the menulist's value:
> 
>    document.getElementById("search-in-menu").value
> 
> ?

Sure I already use it but I need to verify if last used item can be restored.
This isn't possible if 'hidden' attribute is set (eg the project was closed)
So I use id to find element and check its 'hidden' attribute.
I also handle "search-in-collection".

I'm sure a better way exists but my single-neuron brain doesn't found it.

> 
> 
>> - add code directly on find2.p.js _init() and on_unload()
>>
>> Actually the dialog is a xul window and when it is closed the 
>> window.close() is used.
>> This make difficult (for me) distinguishing between accept or cancel.
>> If user changes context and then closes (cancelling) window the last 
>> settings is *always* stored but this is wrong.
>> I'm trying to find a solution.
> 
> Is it wrong to do that? Take this scenario:
> 
> - open find dialog
> - select find "in Files"
> - do one or more "Find Next"'s
> - close the dialog with "Cancel"
> 
> In that case I think the "in Files" should be saved. That's the way some 
> of the other options work. For example, if I:
> 
> - open find dialog
> - click the "Word" checkbox to search for whole words
> - close the dialog with "Cancel"
> 
> then the "Word" checked-state *is* saved.

Ok it sounds reasonable

thanks for your support,

davide

PS
ActiveState will be present at FOSDEM 2009?
_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.