When I can control DC_HtmlBrowse I will try to develop a DC_FINDBROWSE().

This forum is for eXpress++ general support.
Post Reply
Message
Author
Diego Euri Almanzar
Posts: 155
Joined: Thu Nov 05, 2020 10:51 am
Location: DOMINICAN REPUBLIC

When I can control DC_HtmlBrowse I will try to develop a DC_FINDBROWSE().

#1 Post by Diego Euri Almanzar »

Dear friends,

DC_HtmlBrowse is the only EXPRESS GUI I haven't been able to control. And, a GUI without BROWSE is practically nothing.

Even if I could perfectly handle the DC_HtmlBrowse, I would try to develop a kind of DC_FINDBROWSE()
@DCFINDBROWSE is a utility command that paints a browse with user-defined columns and an entry GET for the user to enter keyboard characters. The keys entered will automatically seek the selected index and refresh the browse. I don't know if this can be achieved in a WEB environment. I have not seen any intelligent search in a WEB environment. I hope one day something as wonderful can be developed, like DC_FINDBROWSE() in a WEB environment.

As Mr. Roger informed me, that for an indefinite time, he will not give follow-up to the WEB GUI of the EXPRESS library, I was required to know other GUI. Being the easiest, the POWERWEB library. And finally, buy the POWERWEB library. But the way of working EXPRESS is still superior, much easier. EXPRESS has a way of programming which is easier for me to understand. That's why I bought all the versions from EXPRESS.

As I get to know POWERWEB programming commands, I have invented a hybrid. Look for the EXPRESS HTML commands and the I have put it to run with POWERWEB. Navigation and operation is great. Except when I use DC_HtmlBrowse. When I use DC_HtmlBrowse, it gives me the following error, (I have tried all the examples that ROGER has, with DCBROSE), and the following error persists:

Error in URL: PwTbl
Description: Object has no member with this name
Operation: font
File name:
Arguments: {DC_HtmlBrowse}

Hopefully someone can help me fix this error.

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: When I can control DC_HtmlBrowse I will try to develop a DC_FINDBROWSE().

#2 Post by rdonnay »

I think you are the only person who uses the DCHTML stuff.

This was only an experiment before the development of Javascript and other methods to create statefulness in web apps.

If you will give me a small sample program that shows the error, I will try to help.
The eXpress train is coming - and it has more cars.

Diego Euri Almanzar
Posts: 155
Joined: Thu Nov 05, 2020 10:51 am
Location: DOMINICAN REPUBLIC

Re: When I can control DC_HtmlBrowse I will try to develop a DC_FINDBROWSE().

#3 Post by Diego Euri Almanzar »

Hello, Roger

I apologize in advance for my insistence. I know you are a person very busy. Besides, this is not an emergency for me. I'm comfortable with @get, with @say, and with DCBROWSE, and all the
EXPRESS commands. I will try to adapt to the POWERWEB library.

The POWERWEB library is very good, but it only has 7 GUI commands, and no reporting functions.
Nothing can be printed. I take this opportunity to ask you, Express or XBase, do they have a way to produce an XML, or JSON, or PDF that can be printed in a WEB program?

Also, GUI commands must be written as a sum of characters, in order to produce the HTML. while with
the EXPRESS library, I can write the program code freely, and the HTML it is produced automatically. But no way, it's better for me to use POWERWEB to start learning JAVA, or another unknown language.

Although it is not an emergency, as I explained before, here I present
the source code. First I present to you, a source code that does not give an error
with the DCBROWSE, combining with other GUI. Although it does not give an error, the DCBROWSE is not displayed. And, a second source code, only with DCBROWSE, without other GUIs, gives an error.

I show you the result of the source that does not give an error, in an attached screenshot.

Thank you for your understanding and help.


1. it does not give an error, the DCBROWSE is not displayed.

FUNCTION PwTbl(oSrv)
**


html := HAPAGEBGN({"files/powerweb.css"},{"files/powerweb.js"},,,"Table Demo") +;
"<H1>Table Demo</H1>" + chrCRLF +;
GUIWebExpress()+;
HAPAGEEND()

ETURN html



FUNCTION GUIWebExpress()
LOCAL i, GetList[0], oHtml, oParent, oTable, cHtml, oMainHtml, oBrowse,;
aGetListItem, bBlock, aClass, aListItems, cUserId, cPassword, ;
lCheck, oForm

aDir := Directory()

cUserId := Space(10)
cPassword := ''
lCheck := .t.
aListItems := { 'Men','Women','Dogs','Cats','Mice','Turkeys' }

DCFORM OBJECT oForm

DCTABLE OBJECT oTable ROWS 10 COLUMNS 2 BORDER 1 PARENT oForm

@ 1,1 DCSAY 'User ID' PARENT oTable
@ 1,2 DCINPUT VALUE cUserId NAME 'Input.Type.Text' ;
PARENT oTable MAXLENGTH 10

@ 2,1 DCSAY 'Password' PARENT oTable
@ 2,2 DCINPUT TYPE "password" VALUE cPassword ;
NAME 'Input.Type.PassWord' PARENT oTable MAXLENGTH 10

@ 3,1 DCSAY 'CheckBox' PARENT oTable

// @ 3,2 DCINPUT TYPE "checkbox" NAME 'Input.Type.CheckBox' ;
// VALUE lCheck CHECKED PARENT oTable

@ 4,1 DCSAY 'Radio Buttons' PARENT oTable
@ 4,2 DCINPUT TYPE "radio" VALUE 'M' NAME 'Input.Type.RadioButton' ;
PARENT oTable POST 'Mint<br>'
@ 4,2 DCINPUT TYPE "radio" VALUE 'E' NAME 'Input.Type.RadioButton' ;
PARENT oTable POST 'Excellent<br>'
// @ 4,2 DCINPUT TYPE "radio" VALUE 'G' NAME 'Input.Type.RadioButton' ;
// CHECKED PARENT oTable POST 'Good<br>'
@ 4,2 DCINPUT TYPE "radio" VALUE 'F' NAME 'Input.Type.RadioButton' ;
PARENT oTable POST 'Fair<br>'
@ 4,2 DCINPUT TYPE "radio" VALUE 'P' NAME 'Input.Type.RadioButton' ;
PARENT oTable POST 'Poor<br>'

@ 5,1 DCSAY 'Submit Button' PARENT oTable
@ 5,2 DCINPUT TYPE "submit" VALUE 'Hit Me!' ;
NAME 'Input.Type.Submit' PARENT oTable

@ 6,1 DCSAY 'Reset Button' PARENT oTable
@ 6,2 DCINPUT TYPE "reset" VALUE 'Reset Form!' ;
NAME 'Input.Type.Reset' PARENT oTable

@ 7,1 DCSAY 'Image' PARENT oTable
@ 7,2 DCINPUT TYPE "image" SRC '\exp18\images\express2.gif' ;
NAME 'Input.Type.Image' PARENT oTable

@ 8,1 DCSAY 'ComboBox' PARENT oTable
@ 8,2 DCINPUT TYPE "select" ;
LIST aListItems ;
NAME 'Input.Type.Select' PARENT oTable

@ 9,1 DCSAY 'File' PARENT oTable
@ 9,2 DCINPUT TYPE "file" ;
SIZE 40 ;
MAXLENGTH 100 ;
NAME 'Input.Type.File' PARENT oTable

@10,1 DCSAY 'Read Me' PARENT oTable
@10,2 DCINPUT ;
TYPE DCHTML_INPUT_TEXTAREA ;
WIDTH 60 HEIGHT 20 ;
NAME 'Input.Type.TextArea' ;
VALUE {||MemoRead('\exp18\samples\html\readme.txt')} ;
PARENT oTable


aClass := { { GETLIST_HTMLINPUT, {|o,a|DC_HtmlInput():new(o,a)} }, ;
{ GETLIST_HTMLTABLE, {|o,a|DC_HtmlTable():new(o,a)} }, ;
{ GETLIST_HTMLFORM, {|o,a|DC_HtmlForm():new(o,a)} }, ;
{ GETLIST_SAY , {|o,a|DC_HtmlSay():new(o,a)} } }

FOR i := 1 TO Len(GetList)
oParent := nil
aGetListItem := GetList
IF Valtype(bBlock := DC_GetBlock(aGetListItem[bGETLIST_PARENT])) == 'B'
oParent := Eval(bBlock) // get parent
ENDIF
IF (nIndex := AScan( aClass, {|a|a[1]==aGetListItem[nGETLIST_TYPE]} )) > 0
oHtml := Eval(aClass[nIndex,2],oParent,aGetListItem)
ENDIF
IF Empty(oMainHtml)
oMainHtml := oHtml
ENDIF
IF Valtype(bBlock := DC_GetBlock(aGetListItem[bGETLIST_GROUP])) == 'B'
Eval(bBlock,oHtml) // anchor object to variable
ENDIF
NEXT



@ 0,72 DCBROWSE oBrowse SIZE 4,10 DATA aDir PARENT oTable

DCBROWSECOL ELEMENT 1 HEADER 'File Name' PARENT oBrowse
DCBROWSECOL ELEMENT 2 HEADER 'File Size' PARENT oBrowse
DCBROWSECOL ELEMENT 3 HEADER 'File Date' PARENT oBrowse
DCBROWSECOL ELEMENT 4 HEADER 'File Time' PARENT oBrowse

FOR i := 1 TO Len(GetList)
aGetListItem := GetList
IF Valtype(bBlock := DC_GetBlock(aGetListItem[bGETLIST_PARENT])) == 'B'
oParent := Eval(bBlock) // get parent
ENDIF
IF aGetListItem[nGETLIST_TYPE] == GETLIST_BROWSE
oHtml := DC_HtmlBrowse():new(oParent,aGetListItem)
ELSEIF aGetListItem[nGETLIST_TYPE] == GETLIST_BROWSECOL
oHtml := DC_HtmlColumn():new(oParent,aGetListItem)
ENDIF
IF Empty(oMainHtml)
oMainHtml := oHtml
ENDIF
IF Valtype(bBlock := DC_GetBlock(aGetListItem[bGETLIST_GROUP])) == 'B'
Eval(bBlock,oHtml) // anchor object to variable
ENDIF
NEXT


cHtml := oMainHtml:writeHtml()

// MemoWrit('TEST.HTM',cHtml)
RETURN cHtml







2. A second source code, only with DCBROWSE, without other GUIs, gives an error.


FUNCTION PwTbl(oSrv)
**


html := HAPAGEBGN({"files/powerweb.css"},{"files/powerweb.js"},,,"Table Demo") +;
"<H1>Table Demo</H1>" + chrCRLF +;
GUIWebExpress()+;
HAPAGEEND()

ETURN html



FUNCTION GUIWebExpress()
LOCAL i, GetList[0], oHtml, oParent, oTable, cHtml, oMainHtml, oBrowse,;
aGetListItem, bBlock, aClass, aListItems, cUserId, cPassword, ;
lCheck, oForm

aDir := Directory()


@ 0,72 DCBROWSE oBrowse SIZE 4,10 DATA aDir PARENT oTable

DCBROWSECOL ELEMENT 1 HEADER 'File Name' PARENT oBrowse
DCBROWSECOL ELEMENT 2 HEADER 'File Size' PARENT oBrowse
DCBROWSECOL ELEMENT 3 HEADER 'File Date' PARENT oBrowse
DCBROWSECOL ELEMENT 4 HEADER 'File Time' PARENT oBrowse

FOR i := 1 TO Len(GetList)
aGetListItem := GetList
IF Valtype(bBlock := DC_GetBlock(aGetListItem[bGETLIST_PARENT])) == 'B'
oParent := Eval(bBlock) // get parent
ENDIF
IF aGetListItem[nGETLIST_TYPE] == GETLIST_BROWSE
oHtml := DC_HtmlBrowse():new(oParent,aGetListItem)
ELSEIF aGetListItem[nGETLIST_TYPE] == GETLIST_BROWSECOL
oHtml := DC_HtmlColumn():new(oParent,aGetListItem)
ENDIF
IF Empty(oMainHtml)
oMainHtml := oHtml
ENDIF
IF Valtype(bBlock := DC_GetBlock(aGetListItem[bGETLIST_GROUP])) == 'B'
Eval(bBlock,oHtml) // anchor object to variable
ENDIF
NEXT


cHtml := oMainHtml:writeHtml()

// MemoWrit('TEST.HTM',cHtml)
RETURN cHtml


Attachments
1GUIWEBEXPRESS.jpg
1GUIWEBEXPRESS.jpg (111.07 KiB) Viewed 1929 times

Post Reply