Hello all,
While working on my PG project, I discovered something that doesn't seem to work as expected. I traced it to this code in the PG runtime (FN pGfixMenus):
FOR loop = 1 TO itemCount
CALL GETITEM(mHndl&,loop,t$)
SELECT t$
CASE saveName$
MENU fileMenu,loop,-(gDirty <> 0)
IF BestWindow = 0 THEN MENU fileMenu,loop,0
CASE saveAsName$
MENU fileMenu,loop,-(LEN(gSaveName$) > 0)
IF BestWindow = 0 THEN MENU fileMenu,loop,0
If gDirty is true, it enables the Save menuitem, but not the Save As
If gSaveName$ contains a string, it enables Save As, but not Save.
Isn't this backwards? Shouldn't the two variables be reversed?:
FOR loop = 1 TO itemCount
CALL GETITEM(mHndl&,loop,t$)
SELECT t$
CASE saveAsName$ '
MENU fileMenu,loop,-(gDirty <> 0)
IF BestWindow = 0 THEN MENU fileMenu,loop,0
CASE saveName$
MENU fileMenu,loop,-(LEN(gSaveName$) > 0)
IF BestWindow = 0 THEN MENU fileMenu,loop,0
Has anyone else run into this? Is it documented? Or am I confused? I can change it easily enough in my current project, but how can I change it in PG so it won't confuse me again in future projects?
0"0
=J= a y
"