Skip to content

Commit d9adeb8

Browse files
Beta 5.
- New: load .frm files for editing. Up until beta 4 only .frmbin files could be loaded back into the Editor after creation. With this update, you can import .frm files with your manual customizations and continue editing it with the WYSIWYG editor. Formatting rules are strict and even capitalization and spacing must be maintained as originally output by InForm (a=true is not the same as a = True, for instance and will be ignored).
1 parent 5f09dc8 commit d9adeb8

File tree

6 files changed

+348
-12
lines changed

6 files changed

+348
-12
lines changed

InForm/InFormVersion.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CONST __UI_Version = "Beta version 4"
1+
CONST __UI_Version = "Beta version 5"

InForm/UiEditor.bas

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,12 +1247,14 @@ SUB __UI_OnLoad
12471247

12481248
IF _FILEEXISTS(COMMAND$) THEN
12491249
SELECT CASE LCASE$(RIGHT$(COMMAND$, 4))
1250-
CASE ".bas", ".frm"
1250+
CASE ".bas"
12511251
IF _FILEEXISTS(LEFT$(COMMAND$, LEN(COMMAND$) - 4) + ".frmbin") THEN
12521252
FileToOpen$ = LEFT$(COMMAND$, LEN(COMMAND$) - 4) + ".frmbin"
1253+
ELSEIF _FILEEXISTS(LEFT$(COMMAND$, LEN(COMMAND$) - 4) + ".frm") THEN
1254+
FileToOpen$ = LEFT$(COMMAND$, LEN(COMMAND$) - 4) + ".frm"
12531255
END IF
12541256
CASE ELSE
1255-
IF LCASE$(RIGHT$(COMMAND$, 7)) = ".frmbin" THEN
1257+
IF LCASE$(RIGHT$(COMMAND$, 7)) = ".frmbin" OR LCASE$(RIGHT$(COMMAND$, 4)) = ".frm" THEN
12561258
FileToOpen$ = COMMAND$
12571259
END IF
12581260
END SELECT
@@ -6148,14 +6150,14 @@ END SUB
61486150

61496151
'FUNCTION idezfilelist$ and idezpathlist$ (and helper functions) were
61506152
'adapted from ide_methods.bas (QB64):
6151-
FUNCTION idezfilelist$ (path$, method, TotalFound AS INTEGER) 'method0=*.bas, method1=*.*
6153+
FUNCTION idezfilelist$ (path$, method, TotalFound AS INTEGER) 'method0=*.frm and *.frmbin, method1=*.*
61526154
DIM sep AS STRING * 1, filelist$, a$
61536155
sep = CHR$(13)
61546156

61556157
TotalFound = 0
61566158
$IF WIN THEN
61576159
OPEN "opendlgfiles.dat" FOR OUTPUT AS #150: CLOSE #150
6158-
IF method = 0 THEN SHELL _HIDE "dir /b /ON /A-D " + QuotedFilename$(path$) + "\*.frmbin >opendlgfiles.dat"
6160+
IF method = 0 THEN SHELL _HIDE "dir /b /ON /A-D " + QuotedFilename$(path$) + "\*.frm >opendlgfiles.dat"
61596161
IF method = 1 THEN SHELL _HIDE "dir /b /ON /A-D " + QuotedFilename$(path$) + "\*.* >opendlgfiles.dat"
61606162
filelist$ = ""
61616163
OPEN "opendlgfiles.dat" FOR INPUT AS #150
@@ -6176,8 +6178,8 @@ FUNCTION idezfilelist$ (path$, method, TotalFound AS INTEGER) 'method0=*.bas, me
61766178
FOR i = 1 TO 2 - method
61776179
OPEN "opendlgfiles.dat" FOR OUTPUT AS #150: CLOSE #150
61786180
IF method = 0 THEN
6179-
IF i = 1 THEN SHELL _HIDE "find " + QuotedFilename$(path$) + " -maxdepth 1 -type f -name " + CHR$(34) + "*.frmbin" + CHR$(34) + " >opendlgfiles.dat"
6180-
IF i = 2 THEN SHELL _HIDE "find " + QuotedFilename$(path$) + " -maxdepth 1 -type f -name " + CHR$(34) + "*.FRMBIN" + CHR$(34) + " >opendlgfiles.dat"
6181+
IF i = 1 THEN SHELL _HIDE "find " + QuotedFilename$(path$) + " -maxdepth 1 -type f -name " + CHR$(34) + "*.frm*" + CHR$(34) + " >opendlgfiles.dat"
6182+
IF i = 2 THEN SHELL _HIDE "find " + QuotedFilename$(path$) + " -maxdepth 1 -type f -name " + CHR$(34) + "*.FRM*" + CHR$(34) + " >opendlgfiles.dat"
61816183
END IF
61826184
IF method = 1 THEN
61836185
IF i = 1 THEN SHELL _HIDE "find " + QuotedFilename$(path$) + " -maxdepth 1 -type f -name " + CHR$(34) + "*" + CHR$(34) + " >opendlgfiles.dat"

InForm/UiEditor.frm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ SUB __UI_LoadForm
5858

5959
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuSaveFrm", 91, 18, 0, 22, __UI_GetID("FileMenu"))
6060
SetCaption __UI_NewID, "&Save form only-"
61-
ToolTip(__UI_NewID) = "File names are automatically taken from your form's name property" + CHR$(10) + _
62-
"Only the .frm and .frmbin files will be updated."
61+
ToolTip(__UI_NewID) = "File names are automatically taken from your form's name property" + CHR$(10) + "Only the .frm and .frmbin files will be updated."
6362

6463
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "FileMenuExit", 56, 18, 0, 40, __UI_GetID("FileMenu"))
6564
SetCaption __UI_NewID, "E&xit"
@@ -390,7 +389,7 @@ SUB __UI_LoadForm
390389
Control(__UI_NewID).CanHaveFocus = True
391390

392391
__UI_NewID = __UI_NewControl(__UI_Type_CheckBox, "ShowOnlyFrmbinFilesCB", 200, 23, 25, 255, __UI_GetID("OpenFrame"))
393-
SetCaption __UI_NewID, "Show only .frmbin files"
392+
SetCaption __UI_NewID, "Show only compatible files"
394393
Control(__UI_NewID).Value = -1
395394
Control(__UI_NewID).CanHaveFocus = True
396395
Control(__UI_NewID).BackStyle = __UI_Transparent

0 commit comments

Comments
 (0)