Now the line
SELF:AddItem(#DlnVorige,"Vorige"+MC_C_TAB+"PGUP","Vorige
persoon",KEYPAGEUP,FALSE,FALSE,FALSE)
will cause a 5333 while other KEYxx values like KEYF4 work fine.
What other value for PAGEUP and PAGEDOWN do I have to use ??
John
I did a test using KeyPageUp and KeyPageDown and it works with no
problem here.
hth
Saulo
So no compile and no runtime problem ?
My problem arises from the line:
SELF:ActivateAcceleratorKeys(oOwner)
I suppose you call this one too
If I comment the PgUp line out the problem is gone.
John
Saulo Rodrigues schreef:
> So no compile and no runtime problem ?
> My problem arises from the line:
> SELF:ActivateAcceleratorKeys(oOwner)
> I suppose you call this one too
Yes, I do. Anyway, have you tried it with another keys eg. KEYARROWUP?
Saulo
Same problem with KEYARROWUP.
No problem with KEYF4 etc.
Are you on VO 2.7 ?
With 2.6 I never had 5333's and 2.7 seems to be more critical with it.
John
Saulo Rodrigues schreef:
> Same problem with KEYARROWUP.
> No problem with KEYF4 etc.
> Are you on VO 2.7 ?
> With 2.6 I never had 5333's and 2.7 seems to be more critical with it.
VO2.7 (2740)
Are you using an inherited class? If so, try using the original class
instead to see if the problem persists.
Regards
Saulo
METHOD KeyUp(oKeyEvent) CLASS MC_SelectDataDialog
LOCAL DIM aKeyStates[256] AS BYTE
LOCAL oObject AS OBJECT
DO CASE
CASE oKeyEvent:KeyCode==KEYINSERT .AND.
LOGIC(_CAST,_And(GetKeyState(VK_CONTROL),SHORT(_CAST,0x8000)))
SELF:Append()
GetKeyboardState(@aKeyStates)
IF _And(aKeyStates[VK_INSERT+1],1)==0
aKeyStates[VK_INSERT+1]:=1
SetKeyboardState(@aKeyStates)
ELSEIF _And(aKeyStates[VK_INSERT+1],1)==1
aKeyStates[VK_INSERT+1]:=0
SetKeyboardState(@aKeyStates)
ENDIF
CASE oKeyEvent:KeyCode==KEYDELETE .AND.
LOGIC(_CAST,_And(GetKeyState(VK_CONTROL),SHORT(_CAST,0x8000)))
SELF:Delete()
CASE oKeyEvent:KeyCode==KEYARROWUP
IF !Empty(SELF:Server)
SELF:Server:Skip(-1)
IF SELF:Server:Bof
SELF:Server:GoTop()
END
END
CASE oKeyEvent:KeyCode==KEYARROWDOWN
IF !Empty(SELF:Server)
SELF:Server:Skip(1)
IF SELF:Server:Eof
SELF:Server:GoBottom()
END
END
CASE oKeyEvent:KeyCode==KEYPAGEUP
IF !Empty(SELF:Server)
SELF:SkipMultPrevious()
END
CASE oKeyEvent:KeyCode==KEYPAGEDOWN
IF !Empty(SELF:Server)
SELF:SkipMultNext()
END
CASE oKeyEvent:KeyCode==KEYHOME .AND.
LOGIC(_CAST,_And(GetKeyState(VK_CONTROL),SHORT(_CAST,0x8000)))
IF !Empty(SELF:Server)
SELF:Server:GoTop()
END
CASE oKeyEvent:KeyCode==KEYEND .AND.
LOGIC(_CAST,_And(GetKeyState(VK_CONTROL),SHORT(_CAST,0x8000)))
IF !Empty(SELF:Server)
SELF:Server:GoBottom()
END
CASE oKeyEvent:KeyCode==KEYF5
oObject:=GetFocusedObject()
IF oObject:NameSym==#FILTERSLE
SELF:SetFilterText()
RETURN 1L
END
END
RETURN SUPER:KeyUp(oKeyEvent)
"John Martens" <CA...@TennisHulp.info> schreef in bericht
news:458a3982$0$750$5fc...@dreader2.news.tiscali.nl...
I finaly found the problem. It was a coincident that the problem was in
PGUP. The real problem is this:
CLASS MC_AcceleratorKeys INHERIT vObject
HIDDEN DIM structAccelerator[24] IS _WINACCEL
HIDDEN nCount AS INT
HIDDEN hAccelerator AS PTR
Ading a 25th accelerator will give a normal error and direct after a 5333.
Simply changing 24 into 29 doesn't work.
What kind of limit is this ?
John
Marc Verkade [Marti IT] schreef:
HIDDEN DIM lpAccel[100] IS _WINACCEL
HIDDEN nCount AS INT
HIDDEN hAccel AS PTR
"John Martens" <CA...@TennisHulp.info> schreef in bericht
news:458bcc41$0$747$5fc...@dreader2.news.tiscali.nl...
I changed it in
CLASS MC_AcceleratorKeys INHERIT vObject
and then I still got an error, changing in
ACCESS GetAcceleratorHandle() CLASS MC_AcceleratorKeys
Did the job.
Now another problem: I started to convert to MC_menu because I saw that
Memory(MEMORY_REGISTERAXIT) went up and up when using another Menu class
that finaly gave me a 5333.
Now the 5333 is gone but I expected to get a stable number of
Memory(MEMORY_REGISTERAXIT) before opening a window and after closing it
and calling CollectForced().
When I do not assign a MC_menu to a window this is the case. The number
goes from lats say 80 upto 150 and down again to 80 when closing the
window and do a CollectForced().
When I assign MC_menu to a windo it goes from 80 upto 160 and only back
to 120, opening the window again it gets up to 200 and soforth.
Do you know what causes this and how can I avoid it ?
Here are our own classes, from Our lib so they will not compile.
www.marti.nl/mefs.zip
You can use them to compare if things are different in our production
classes.
Grtz, Marc
"John Martens" <CA...@TennisHulp.info> schreef in bericht
news:458bfffb$0$721$5fc...@dreader2.news.tiscali.nl...
Now MC_menu became as subclass of SEmenuXP so t it hard to see what
happens and whats in the SEmenu code (that I do not have).
The problem might be in the Destroy() methods. MC_menu that I downloaded
from your website does not have one.
The help file say's on Menu:Destroy()
Purpose
Provide a method to de-instantiate a Menu object.
Syntax
<oMenu>:Destroy() ---> NIL
Description
This method can be used when a Menu object is no longer needed.
Menu:Destroy() de-instantiates the Menu object and allows you to close
and free any resources that were opened or created by the object,
without waiting for the garbage collector.
Do I have to call a Destroy in the close of a window ?
Reading Geoffs 5333 paper I would say NO becuase the GC will get them
but by not doing anything after closing a window
Memory(MEMORY_REGISTERAXIT) wil go up and up so there are things in
memeory that are not removed by the CG.
Experimenting with Destroy() did the job.
I need to call SELF:Menu:Destroy() in the Close of a window in order to
get the menu out of the memory.
Memory(MEMORY_REGISTERAXIT) is now stable before opening a window and
afterwards.
John
Marc Verkade [Marti IT] schreef:
"John Martens" <CA...@TennisHulp.info> schreef in bericht
news:458eac65$0$732$5fc...@dreader2.news.tiscali.nl...
Grtz, Marc
"John Martens" <CA...@TennisHulp.info> schreef in bericht
news:458ea8c4$0$712$5fc...@dreader2.news.tiscali.nl...
There was no need to build a special MC_menu:Destroy(). The normal
Menu:Destroy() seems to do the job.
John
Marc Verkade (prive) schreef: