EUforum Messages
- Powered by Euphoria -
Post Reply Previous Next All Messages
Date: Fri May 9 01:15
From: Mike777 <anon4321 at g?ail.c?m>
Subject: Re: win32Lib - newUIObj bug?

CChris met me on IRC and after a few pecks on the keyboard was able to determine
that it was, as expected, PBKAC.

Although thoroughly aware of the issue, instead of setting BOTH the name and
caption to the same string ("MySpecialWindow") I had set the name to "MySpecialWindow"
but I had set the caption to "Design Window".  

It is much better practice to initially establish the controls (windows included)
with the name and the caption set to the same thing.

One can reset the caption in Code without changing the internals of the system.

I am aware of this issue (I've actually ranted about it, IIRC), so it clearly
was PBKAC on this one.

Thanks to CChris for helping me track it down.

Mike


Mike777 wrote:
> 
> An interim report here: I have found that using the trace window is fundamentally
> inconsistent with the message_box function.  It, in itself, creates an infinite
> loop.  I need to eliminate that loop before I can get back to the main issue
> at hand.
> 
> Mike
> 
> Mike777 wrote:
> > 
> > CChris wrote:
> > > 
> > > getNameId() was changed in 70.4a. Please paste this to replace the current
body
> > > of getNameId(), and tell me if it gets you going:
> > > 
> > > global function getNameId(sequence pName)
> > >     integer p
> > > 
> > >     pName=makeStandardName(pName)
> > >     p=find(pName, ctrl_Name)
> > >     if p=0 then
> > >         return 0
> > >     end if
> > >     while not validId(p) do
> > >         p=find_from(pName, ctrl_Name,p+1)
> > >         if p=0 then
> > >             return 0
> > >         end if
> > >     end while
> > >     return p
> > > end function
> > > 
> > 
> > I wanted to take the time to do this, although I sort of knew it wouldn't help.
> >  At the point in CreateEx that the program attempts to assign the parent, it
> > has the value for the parent per the token (MySpecialWindow) but when I interrogate
> > the trace window for the values of all of my windows, they are not there.  Hence,
> > getNameId("avariablethatdoesnotexist") will always return a zero.
> > 
> > Something appears to be wrong with my scoping (which is truly bizarre), because
> > at this point, no matter how explicitly I set the Owner in the newUIObj instruction,
> > the createEx routine won't be able to assign the parent if the ids are just
> > not there.
> > 
> > I'm going to run this again and go through the procedure in detail for a control
> > where the parent IS set properly.
> > 
> > I'll post after that.
> > 
> > Thanks for trying.
> > 
> > Mike

 
Post Reply Previous Next All Messages