whta's wrong about "[" in acp file?

7 views
Skip to first unread message

shomain

unread,
Jan 17, 2008, 9:03:47 AM1/17/08
to ulipad
i defined next text in python.acp file:
[autostring_append]
'="!^'"
"='!^"'
(="!^)"
{="!^}"
[="!^]"
...
but when i type [,it does not append ]
why?

limodou

unread,
Jan 17, 2008, 7:33:13 PM1/17/08
to uli...@googlegroups.com

I think maybe '[' is the same with [section], so UliPad may treat it
as a beginning of a section, and I'll try to fix it.

Thanks.

--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
meide <<wxPython UI module>>: http://code.google.com/p/meide/
My Blog: http://www.donews.net/limodou

limodou

unread,
Jan 17, 2008, 7:34:57 PM1/17/08
to uli...@googlegroups.com
On Jan 18, 2008 8:33 AM, limodou <lim...@gmail.com> wrote:
>
> On Jan 17, 2008 10:03 PM, shomain <sho...@gmail.com> wrote:
> >
> > i defined next text in python.acp file:
> > [autostring_append]
> > '="!^'"
> > "='!^"'
> > (="!^)"
> > {="!^}"
> > [="!^]"
> > ...
> > but when i type [,it does not append ]
> > why?
> >
>
> I think maybe '[' is the same with [section], so UliPad may treat it
> as a beginning of a section, and I'll try to fix it.
>
> Thanks.
>
Oh, I found it, you can define some special character as:

KEYS = {'<space>':' ', '<equal>':'=', '<div>':'/', '<square>':'['}

so '[' should be '<square>', try it.

limodou

unread,
Jan 17, 2008, 7:36:27 PM1/17/08
to uli...@googlegroups.com
> Oh, I found it, you can define some special character as:
>
> KEYS = {'<space>':' ', '<equal>':'=', '<div>':'/', '<square>':'['}
>
> so '[' should be '<square>', try it.
>
And you can also find the document about these in
doc/en/howto_input_assistant.txt(.html)

1. Notices

* The acp file is an ini-like format file
* The `key` can not include equal symbol(`'='`), if you want to
use it you should
use escape string <equal>
* There are serval escape string like <equal> for now they are::

'=' <equal>
'\t' <tab> ;but it's some problems for now
'/' <div>
' ' <space>
'[' <square>
* The `key` is just a pattern, and when you press a keystroke, if
it matches the last
character of a key, then the value of this key will replace or
append or popup a list
for current input word. For example, there is a key pattern
`def<space>`, when you
entered `def` string, and press space keystroke, it will match
the `def<space>` pattern,
so the InputAssistant will take place.
* There are three kind of results: replace, append and popup a list.
* If the `value` is defined as a list, when InputAssistant taking
place it'll popup a list,
and let user to choose one.

shomain

unread,
Jan 18, 2008, 9:49:56 AM1/18/08
to ulipad
thank you,limodou!

nmweizi

unread,
Feb 12, 2008, 7:16:00 PM2/12/08
to ulipad
ulipad,你好
 
我的系统unbuntu 7.10打上了最新补丁,wx 2.8.4(gtk2-unicode),ulipad是svn的版本Revision: 236,python 2.5.1


1、用OnOpenCmdWindow,shell在不退出的情况下,wx.shell不能返回,整个ulipad被锁住.只有退出这个用wx.shell执行的gnome-terminal时才可以用ulipad。
建议mEditorCtrl.py"中300行,在此打开命令窗口"改为
#wx.Shell(cmdline)
wx.Execute(cmdline)

 
2、我发现在unbuntu 7.10下,ulipad toolbar上粘贴功能的图标在频繁的闪烁,好像一会便灰,一会变可用,一秒时间里能闪很多次。这个现象不是总能重现,很是奇怪。如果这种现象出现时,ulipad运行就变得非常慢了。
我发现和窗口菜单中的打开shell窗口一定关系。当启动ulipad后重来没有打开过shell窗口时,toolbar上粘贴功能的图标基本不闪烁,ulipad运行也很快,但打开shell窗口时后,每次在shell窗口内输入内容并回车时,粘贴图标都闪烁,同时当光标回到编辑窗口时,图标开始出现频繁的闪烁现象。而这些现象在window下没有。
 
3、ulipad和fcitx还是存在兼容性问题。
主要表现在ulipad中可以输入汉字,但是不能选择第二个字(如有5个同音字,键入3可以选择第三个,但唯独不能选择第二个,输入2,没反应)。再一个就是如果正在输入拼音,如pinyin,但输成了piuyin,想用bksp键删除,但这删除的不是拼音行上的内容及piuyin,而是删成了ulipad编辑文件的内容。fcitx输入法在unbuntu 自带的文本编辑器和openoffice中使用这些没有问题。
 
 
写到这突然想到,2和3的现象会不会是同一个问题呢?
 
启动时的信息
begin... 19:37:08
(python:7772): Gtk-WARNING **: /build/buildd/gtk+2.0-2.12.0/gtk/gtkwidget.c:4249: no accelerator (114,4) installed in accel group (0x8ae9d00) for GtkImageMenuItem (0x8ae7f08)
(python:7772): Gtk-WARNING **: /build/buildd/gtk+2.0-2.12.0/gtk/gtkwidget.c:4249: no accelerator (102,4) installed in accel group (0x8ae9d00) for GtkImageMenuItem (0x8ae7e38)
(python:7772): Gtk-WARNING **: /build/buildd/gtk+2.0-2.12.0/gtk/gtkwidget.c:4249: no accelerator (113,4) installed in accel group (0x8aad1c0) for GtkImageMenuItem (0x8acb480)
end... 19:37:12
 
nmweizi,nmw...@163.com
2008-02-10

limodou

unread,
Feb 12, 2008, 8:24:46 PM2/12/08
to uli...@googlegroups.com
2008/2/13 nmweizi <nmw...@163.com>:

>
>
> ulipad,你好
>
> 我的系统unbuntu 7.10打上了最新补丁,wx 2.8.4(gtk2-unicode),ulipad是svn的版本Revision:
> 236,python 2.5.1
> 。
>
> 1、用OnOpenCmdWindow,shell在不退出的情况下,wx.shell不能返回,整个ulipad被锁住.只有退出这个用wx.shell执行的gnome-terminal时才可以用ulipad。
> 建议mEditorCtrl.py"中300行,在此打开命令窗口"改为
> #wx.Shell(cmdline)
> wx.Execute(cmdline)
>
已经改了。

>
> 2、我发现在unbuntu 7.10下,ulipad
> toolbar上粘贴功能的图标在频繁的闪烁,好像一会便灰,一会变可用,一秒时间里能闪很多次。这个现象不是总能重现,很是奇怪。如果这种现象出现时,ulipad运行就变得非常慢了。
> 我发现和窗口菜单中的打开shell窗口一定关系。当启动ulipad后重来没有打开过shell窗口时,toolbar上粘贴功能的图标基本不闪烁,ulipad运行也很快,但打开shell窗口时后,每次在shell窗口内输入内容并回车时,粘贴图标都闪烁,同时当光标回到编辑窗口时,图标开始出现频繁的闪烁现象。而这些现象在window下没有。

这个我再查一下,的确很难查,一直都没有查出来为什么。


>
> 3、ulipad和fcitx还是存在兼容性问题。
> 主要表现在ulipad中可以输入汉字,但是不能选择第二个字(如有5个同音字,键入3可以选择第三个,但唯独不能选择第二个,输入2,没反应)。再一个就是如果正在输入拼音,如pinyin,但输成了piuyin,想用bksp键删除,但这删除的不是拼音行上的内容及piuyin,而是删成了ulipad编辑文件的内容。fcitx输入法在unbuntu
> 自带的文本编辑器和openoffice中使用这些没有问题。
>
>
> 写到这突然想到,2和3的现象会不会是同一个问题呢?
>
> 启动时的信息
> begin... 19:37:08
> (python:7772): Gtk-WARNING **:
> /build/buildd/gtk+2.0-2.12.0/gtk/gtkwidget.c:4249: no accelerator (114,4)
> installed in accel group (0x8ae9d00) for GtkImageMenuItem (0x8ae7f08)
> (python:7772): Gtk-WARNING **:
> /build/buildd/gtk+2.0-2.12.0/gtk/gtkwidget.c:4249: no accelerator (102,4)
> installed in accel group (0x8ae9d00) for GtkImageMenuItem (0x8ae7e38)
> (python:7772): Gtk-WARNING **:
> /build/buildd/gtk+2.0-2.12.0/gtk/gtkwidget.c:4249: no accelerator (113,4)
> installed in accel group (0x8aad1c0) for GtkImageMenuItem (0x8acb480)
> end... 19:37:12
>

每次启动都有,但是看不出是什么错误。输秒法可能与wxPython本身有关。你可以试一下wxPython
demo中的stc的例子,好象也是这样的。使用scim试试。

Reply all
Reply to author
Forward
0 new messages