Re: [Boa Constr] open Boa's editor at a specific line number
Status: Beta
Brought to you by:
riaan
From: Riaan B. <riaan@e.co.za> - 2001-08-17 04:16:13
|
Hello Tom, Tom Malcolmson wrote: > > > The way it works now, if a user clicks on any Python object that > > > represents some code then I open the corresponding file > > using whatever > > > editor is registered for the .py extension. > > > > What registration is this? > > The standard registration should run the file in the > > interpreter. PythonWin adds an edit option to the popup > > context menu and I've given instructions on the mailing list > > before for adding a similar > > entry for Boa. Is this what you are refering to? > > Yes, that is what I'm referring to. > I'm currently using the ShellExecute API and specifying the 'edit' > option. I don't want Boa to override Pythonwin so I've suggested adding it as 'Edit in Boa', this is not accessible from ShellExecute I suppose... > > > That is Ok, but I know the line number of the user's > > selection, so I > > > would like to open the file at that line number. > > > > > > Would it be possible for the next version of Boa to make this > > > possible? > > > > Sounds cool, is there some official way to specify this? > > I was thinking <filename>::<lineno> when passed on the command line. > > > > Also remember that every invocation on the command line will > > start up a new Boa (unless someone implements the necessary > > DDE support > > in Boa) > > I had been hoping that there would be a standard way to do this, but > apparently there isn't. I've now ripped the dde code from Pythonwin and it seems to work, you need to have Pythonwin installed so I don't know if that defeats your purpose. I'm still undecided if this should be on or off by default... > > I think it is unusual to run two command-line parameters together like > that (<filename>::<lineno>). I think it would be more common to specify > them with a space between them. But multiple files are already separated by spaces. Unless you choose a better separator (some standard one I don't know), it is still :: e.g. Boa.py d:\dev\tst.py::42 > > In an earlier thread you discussed starting just the editor. What was > the conclusion of that? Perhaps I could do that, so that the user would > only get multiple copies of the editor. It will happen after the next release. (Btw, *only* the editor is 90% of Boa ;) -- Riaan Booysen ___________________________________________________ Boa Constructor - RAD GUI building IDE for wxPython http://boa-constructor.sourceforge.net |