Re: Win32lib 0.60.6 and Judith Evans IDE (how to make it work)
- Posted by Greg Haberek <ghaberek at gmail.com> Feb 11, 2005
- 476 views
I've verified these changes, and I now have no issues creating controls and clicking on the form window in the IDE. Thanks Sascha!! ~Greg On Thu, 10 Feb 2005 22:36:58 +0100 (MET), Sascha Zindel <s.zindel at gmx.de> wrote: > > Hello again! > > After Derek pointed out that the function findParentWindows works fine with= > > his patch applied, > i took a closer look at the fDo..... Routines. > > Since findParentWindows can return a 0 if no parentWindow is existing, all > sequence handling > should be verified to not access sequence[0]. > >From what i found out, Derek already considered this in some calls, but not= > > in all the > necessary ones. > > The following changes need to applied to Win32Lib 0.60.6 to work properly > with Judith Evans IDE > and consider Dereks latest patch to findCurrentWindows (and hopefully not > break anything else -> > Derek, could you check this and tell me whether this is the right track to > follow?) > > Modify findCurrentWindows > ------------------------- > line 13579: > -- find the parent window > if (id <= 0) or (ctrl_Parent[id] = 0) then > -- The specified control has no parent > return 0 > end if > -- loop until I hit top of the tree or a Window control. > while id and (ctrl_Type[id] != Window) and (isTopLevelWindow(id) = > w32False) do > -- move up > id = ctrl_Parent[id] > end while > return id > end function > > Modify in function fDoMouse > --------------------------- > line 31247: > if (lParent != 0 and sequence(ctrl_Mousetrap[lParent])) then > > Modify in function fDoSetFocus > > line 31393: > if (lParentWindow != 0 and ctrl_Closed[lParentWindow] = 1) or (lParent = > !=0 > and ctrl_Closed[lParent] = 1) then > > Modify in function fDoKillFocus > > Modify in function fDoCommand > ----------------------------- > line 31655: > if (lParent != 0 and ctrl_Type[lParent] = TabItem) then > > On my system this patch works fine. I did intensive tests and compared the > behaviour between 0.60.4 and 0.60.6. So far everything seems fine. > > Greetings, > Sascha Zindel > > >=20 > >=20 > > Derek, > >=20 > > thanx for the info. Still funny because everything else seems to work and= > > > >from a short view to 0.60.4 i got the impresson that 0 might be correct.= > > >=20 > > Since i was away for a while, i would like to know if you still update th= > e > > code of win32lib or not? > >=20 > > In between i take your suggestion and try to find out what exactly happen= > s > > in the focus code. > >=20 > > Did i miss something else? It seems as if Judith is not doing any work on= > > > the IDE anymore.... > >=20 > > Greetings, > > Sascha > >=20 > > >=20 > > >=20 > > > posted by: Derek Parnell <ddparnell at bigpond.com> > > >=20 > > > Sascha Zindel wrote: > > > >=20 > > > > Hello, > > > > i have been away for a few months. > > > >=20 > > > > When i looked into the forum entries, i found that there was a > > > discussion > > > > about Win32lib 0.60.6 and Judith Evans IDE regarding problems with th= > e > > > Form > > > > Design Window. I am using Windows XP and have the same problem. > > > >=20 > > > > The solution posted by Derek did not work on my PC. This has been > > stated > > > by > > > > others in the forum. > > > >=20 > > > > So i took a small look at the code and found out that one return valu= > e > > > > incorrect. > > > >=20 > > > > The correct code should be: > > > > -- find the parent window > > > > if (id <= 0) or (ctrl_Parent[id] = 0) then=20 > > > > -- The specified control has no parent. > > > > -- the value below was 0, but it should be id > > > > return id > > > > end if <snip> > > >