Re: Win32lib 0.60.6 and Judith Evans IDE (how to make it work)

new topic     » goto parent     » topic index » view thread      » older message » newer message

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


>
>
> Derek,
>
> 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.=

>
> Since i was away for a while, i would like to know if you still update th=
e
> code of win32lib or not?
>
> In between i take your suggestion and try to find out what exactly happen=
s
> in the focus code.
>
> Did i miss something else? It seems as if Judith is not doing any work on=

> the IDE anymore....
>
> Greetings,
> Sascha
>
> >=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
> > >=20
> > >     -- loop until I hit top of the tree or a 'window'-type 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
> > >=20
> > > After implementing this change i started the IDE and .. surprise .. i=
t
> > works
> > > as it should.
> > >=20
> > > I do not know if somebody else already found a solution for this, but=

> > maybe
> > > someone could try this out and let me know if everything works well o=
n
> > other
> > > pcs (and OS) as well.
> >=20
> > Sorry to disagree with you guys, but your 'fix' is not the correct one.=

> > Even
> > though it might repair the use of the IDE, it is not the correct way to=

> > fix the problem.
> >=20
> > The findParentWindow() function is working correctly. It is *meant* to
> > return zero if the id does not have a parent window. I suspect that the=

> > function is not being used correctly elsewhere in the win32lib, probabl=
y
> > the stuff that handles focus setting.
> >=20
> > The version in 0.60.6 had a bug; namely it did what you have now 'fixed=
'
> > it to do. That was wrong.=20
> >=20
> > --=20
> > Derek Parnell
> > Melbourne, Australia
> > irc://irc.sorcery.net:9000/euphoria
> >=20
> >=20
> >=20
> >=20

--
DSL Komplett von GMX +++ Superg=FCnstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu