On Wed, Feb 4, 2009 at 7:33 PM, Mapache <[email protected]> wrote:
>
> Hi,
>
> First of all, thanks for the great work in Ulipad!
>
> I'm trying to make a phpdoc pluging coping the wxpythondoc plugin.
> With Search&Replace all python references to php:
>
> ----------------------------------------------------------------------------------------------------------------
> __doc__ = 'Plugin: Show php doc'
>
> from modules import Mixin
> import wx
> import os
> import os.path
> import sys
>
> menulist = [ ('IDM_HELP', #parent menu id
> [
> (106, 'IDM_HELP_PHPDOC', tr('PHP Document'),
> wx.ITEM_NORMAL, 'OnHelpPHPDoc', tr('Show PHP document.')),
> ]),
> ]
> Mixin.setMixin('mainframe', 'menulist', menulist)
>
> def OnHelpPHPDoc(win, event):
> os.startfile(os.path.join('/home/mapache/dev/ulipad/trunk/plugins/
> phpdoc', 'wx.chm','php_manual_en.chm'))
> Mixin.setMixin('mainframe', 'OnHelpPHPDoc', OnHelpPHPDoc)
> ----------------------------------------------------------------------------------------------------------------
>
> The chm file is take from here http://es.php.net/docs-echm.php
>
> The plugins loads without problems, but I don't know how to apply it
> to php files...
>
> Any clues?
>
> Thanks in advance, and sorry for my poor english
> Mapache
>
I don't know what you mean? And I found a bug:
the line
os.startfile(os.path.join('/home/mapache/dev/ulipad/trunk/plugins/phpdoc',
'wx.chm','php_manual_en.chm'))
is not correct. os.path.join will combine stuff into one path, so
above code will produce:
/home/mapache/dev/ulipad/trunk/plugins/phpdoc/wx.chm/php_manual_en.chm
I think you should remove the wx.chm, just like:
os.startfile(os.path.join('/home/mapache/dev/ulipad/trunk/plugins/phpdoc',
'php_manual_en.chm'))
and startfile receices a normal path, so just write the right path is
enough, even don't need to use os.path.join().
--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
UliWeb <<simple web framework>>: http://uliwebproject.appspot.com
My Blog: (new)http://http://hi.baidu.com/limodou
(old)http://www.donews.net/limodou