FiveWeb Questions

Re: FiveWeb Questions

Postby Antonio Linares » Sat Feb 20, 2016 5:18 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41448
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Antonio Linares » Sat Feb 20, 2016 6:21 pm

The new FiveWeb wiki at bitbucket:

https://bitbucket.org/fivetech/fiveweb/wiki/Home
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41448
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Maurizio » Mon Feb 22, 2016 7:46 am

Antonio ,
I have this message :

You do not have access to the wiki.
Use the links at the top to get back.

Maurizio
User avatar
Maurizio
 
Posts: 799
Joined: Mon Oct 10, 2005 1:29 pm

Re: FiveWeb Questions

Postby Antonio Linares » Mon Feb 22, 2016 7:50 am

Maurizio,

Fixed, thanks

Please try to access it again
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41448
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Tue Feb 23, 2016 12:59 pm

Hi Antonio,

Can you please add the WHEN clause to the ComboBox?

Also, I tried changing the code (my code and the code in Browse.prg) to use the "|" symbol and the "^" symbol.
It did not work :(
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Jeff Barnes » Tue Feb 23, 2016 1:44 pm

Hi Antonio,

I have added the WHEN clause to the Combobox.

FiveWeb.ch:
Code: Select all  Expand view

#xcommand @ <nRow>, <nCol> COMBOBOX [ <oCbx> ] ;
             [ VAR <uVar> ] ;
             [ <prm: PROMPT, ITEMS> <cItems,...> ] ;
             [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
             [ SIZE <nWidth>, <nHeight> ] ;
             [ WHEN <uWhen> ] ;
       => ;
          [ <oCbx> := ] TComboBox():New( <nRow>, <nCol>,;
             <nWidth>, <nHeight>, <oWnd>, {<cItems>}, [<(oCbx)>], [<uVar>], [<{uWhen}>] )

 


Combobox.prg
Code: Select all  Expand view

#include "FiveWeb.ch"

//----------------------------------------------------------------------------//

CLASS TComboBox FROM TControl

   DATA aItems

   CLASSDATA nCtrls INIT 1

   METHOD New( nRow, nCol, nWidth, nHeight, oWnd, aItems, cVarName, uVar, bWhen )

   METHOD Activate() VIRTUAL

ENDCLASS

//----------------------------------------------------------------------------//

METHOD New( nRow, nCol, nWidth, nHeight, oWnd, aItems, cVarName, uVar, bWhen ) CLASS TComboBox

   local n
   local lWhen := .t.
   
   DEFAULT nWidth := 300, nHeight := 300, aItems := {}
   DEFAULT cVarName := "oCbx" + AllTrim( Str( ::nCtrls ) )

   ::Super:New( nRow, nCol, nWidth, nHeight, cVarName, oWnd )

   if bWhen != nil
      ::bWhen = bWhen
      lWhen = Eval( bWhen )
   endif  

     
   ::aItems = aItems  


   ? '<div id="' + ::cVarName + '" '  + ;
     'class="ui.widget" ' + ;
     'style="' + "position: absolute; " + ;
     "top: " + AllTrim( Str( ::nTop ) ) + "px; " + ;
     "left: " + AllTrim( Str( ::nLeft ) ) + 'px;" >'
       
   ? '<select id="' + ::cVarName + '.at" '+IIF( ! lWhen,"disabled","")+'>'    

   for n = 1 to Len( aItems )
      if ValType( aItems[ n ] ) == "A" 
         ? '<option value="' + aItems[ n ][ 1 ] + '">' + aItems[ n ][ 1 ] + "</option>"
      else             
         ? '<option value="' + aItems[ n ] + '"' + ;
         If( AScan( aItems, uVar ) == n, " selected ", "" ) + '>' + aItems[ n ] + "</option>"
      endif
   next  

   ? '</select>'    
       
   ? "</div>"

return Self

//----------------------------------------------------------------------------//
 
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Wed Feb 24, 2016 8:30 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41448
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Wed Feb 24, 2016 1:10 pm

Added WHEN clause to GETS:

FiveWeb.ch
Code: Select all  Expand view

#xcommand @ <nRow>, <nCol> GET [ <oGet> VAR ] <uValue> ;
             [ SIZE <nWidth>, <nHeight> ] ;
             [ OF <oDlg> ] ;
             [ <lHide: HIDE > ] ;
             [ <lPassword: PASSWORD> ] ;
             [ PICTURE <cPict> ] ;
         [ <lMultiline: MEMO, TEXT, MULTILINE> ] ;
             [ WHEN <uWhen> ] ;      
       => ;
          [ <oGet> := ] TGet():New( <nRow>, <nCol>, <uValue>, <nWidth>, <nHeight>, <oDlg>,;
                                    [<(oGet)>], [<.lHide.>], [<.lPassword.>], [<cPict>], [<.lMultiline.>], [<{uWhen}>] )


 




Get.prg
Code: Select all  Expand view

#include "FiveWeb.ch"

//----------------------------------------------------------------------------//

CLASS TGet FROM TControl

   DATA  uValue
    
   DATA  cPicture   
   
   DATA  lMultiline

   CLASSDATA nGets INIT 1

   METHOD New( nRow, nCol, uValue, nWidth, nHeight, oWnd, cVarName, lHidden,;
               lPassword, cPicture, lMultiline, bWhen )

   METHOD Activate( lScript )

ENDCLASS

//----------------------------------------------------------------------------//

METHOD New( nRow, nCol, uValue, nWidth, nHeight, oWnd, cVarName, lHidden,;
            lPassword, cPicture, lMultiline, bWhen ) CLASS TGet

   Local lWhen := .t.
   
   DEFAULT cVarName := "oGet" + AllTrim( Str( ::nGets++ ) )
   DEFAULT nWidth  := Len( cValToChar( uValue ) ) * 8, nHeight := 40
   DEFAULT lHidden := .F., lPassword := .F., lMultiline := .F.
     
   ::Super:New( nRow, nCol, nWidth, nHeight, cVarName, oWnd )

   ::cPicture   = cPicture
   ::lMultiline = lMultiline

   if bWhen != nil
      ::bWhen = bWhen
      lWhen = Eval( bWhen )
   endif  


   if ! ::lMultiline
      if lHidden
         ? '<input type="hidden" id="' + ::cVarName + '" ' + ;
           'value = "' + cValToChar( uValue )+'"' + '>'
      else
         ? '<input type=' + If( lPassword, "password", "text" ) + If( ! lWhen, " disabled ", "" ) +;
           ' id="' + ::cVarName + '" ' + ;
           ' style="' + 'position: absolute; ' + ;
           'top: ' + AllTrim( Str( ::nTop ) ) + 'px; ' + ;
           'left: ' + AllTrim( Str( ::nLeft ) ) + 'px; ' + ;
           'width: ' + AllTrim( Str( ::nWidth ) ) + 'px; '  + ;
           'height: ' + AllTrim( Str( ::nHeight ) ) + 'px;" ' + ;
           'value = "' + cValToChar( uValue )+'"' + '>'
      endif    
   else
      if lHidden
         ? '<input type="hidden" id="' + ::cVarName + '" ' + ;
           'value = "' + cValToChar( uValue )+'"' + '>'
      else
         ? '<textarea' + If( ! lWhen, " disabled ", "" ) +;
           ' id="' + ::cVarName + '" ' + ;
           ' style="' + 'position: absolute; ' + ;
           'top: ' + AllTrim( Str( ::nTop ) ) + 'px; ' + ;
           'left: ' + AllTrim( Str( ::nLeft ) ) + 'px; ' + ;
           'width: ' + AllTrim( Str( ::nWidth ) ) + 'px; '  + ;
           'height: ' + AllTrim( Str( ::nHeight ) ) + 'px;">' + ;
           If( ! Empty( uValue ), cValToChar( uValue ), "" ) + ;
           '</textarea>'
      endif    
   endif

return Self

//----------------------------------------------------------------------------//

METHOD Activate( lScript ) CLASS TGet

   DEFAULT lScript := .T.

   if ! Empty( ::cPicture )
      if lScript
         ? "<script>"
      endif
   
      ? '$("#' + ::cVarName + '").mask("' + ::cPicture + '");'
     
      if lScript
         ? "</script>"     
      endif
   endif       

return nil

//----------------------------------------------------------------------------//
 
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Jeff Barnes » Wed Feb 24, 2016 1:31 pm

Added WHEN clause to Checkbox

FiveWeb.ch:
Code: Select all  Expand view

#xcommand @ <nRow>, <nCol> CHECKBOX [ <oCbx> VAR ] <lValue> ;
             [ PROMPT <cPrompt> ] ;
             [ SIZE <nWidth>, <nHeight> ] ;
             [ OF <oDlg> ] ;
             [ <lstyle: BUTTON > ] ;
             [ WHEN <uWhen> ] ;
       => ;
          [ <oCbx> := ] TCheckBox():New( <nRow>, <nCol>, <lValue>, <cPrompt>,;
                        <nWidth>, <nHeight>, <oDlg>, [<.lstyle.>], [<{uWhen}>] )
 


Checkbox.prg:
Code: Select all  Expand view

#include "FiveWeb.ch"

CLASS TCheckBox

   DATA  cPrompt
   DATA  nTop, nLeft
   DATA  nWidth, nHeight
   DATA  oWnd
   DATA  cVarName
   DATA  lChecked
   DATA lButtonStyle
   DATA bWhen

   CLASSDATA nBtns INIT 1

   METHOD New( nRow, nCol, lChecked, cPrompt, nWidth, nHeight, oWnd , lButtonStyle, bWhen )

   METHOD Activate( lScript )

ENDCLASS

//----------------------------------------------------------------------------//

METHOD New( nRow, nCol, lChecked, cPrompt, nWidth, nHeight, oWnd ,lButtonStyle, bWhen ) CLASS TCheckBox

    Local lWhen := .t.

   DEFAULT cPrompt := "CheckBox"
   DEFAULT lButtonStyle:= .f.

   ::nTop     = nRow
   ::nLeft    = nCol
   ::cPrompt  = cPrompt
   ::nWidth   = nWidth
   ::nHeight  = nHeight
   ::cVarName = "oChk" + AllTrim( Str( ::nBtns++ ) )
   ::lChecked = lChecked  
   ::lButtonStyle:= lButtonStyle

   if bWhen != nil
      ::bWhen = bWhen
      lWhen = Eval( bWhen )
   endif      
   
   ? '<div id="div"'+::cVarName +;
   ' style="' + "position: absolute; " + ;
     "top: " + AllTrim( Str( ::nTop ) ) + "px; " + ;
     "left: " + AllTrim( Str( ::nLeft ) ) + 'px;" >'
       
     
   ? '<input id="' + ::cVarName + '" ' + ;
     'type="checkbox" ' + If( lChecked, "checked", "" )+ If( ! lWhen, " disabled ", "" ) + '/>'
     
   ? "<label for='" + ::cVarName +"'>" + ::cPrompt
   ? "</label>"  
   ? "</div>"

   oWnd:AddControl( Self )


return Self

//----------------------------------------------------------------------------//

METHOD Activate( lScript ) CLASS TCheckBox

   DEFAULT lScript := .T.

   if ::lButtonStyle
 
      if lScript
         ? "<script>"
      endif
   
      ? '$( "#' + ::cVarName + '" ).button();'    
   
      if lScript
         ? "</script>"
      endif
   endif
   
return nil  

//----------------------------------------------------------------------------//
 
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Wed Feb 24, 2016 6:50 pm

Jeff,

Please email me your modified files and I will push them to bitbucket, thanks

Would you like to have rights to modify the FiveWeb sources in the bitbucket repository ?

Its easy and this way you can contribute your changes directly to the repository :-)

I will supervise your changes
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41448
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Wed Feb 24, 2016 8:12 pm

Hi Antonio,

Sure send the information/instructions to my email address.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Wed Feb 24, 2016 8:47 pm

Jeff,

I have sent you a bitbucket invitation to participate in the FiveWeb repository. You will have to register in bitbucket. Its free.

You need to install TortoiseGit also. If you don't know how to set it up, I may help you using TeamViewer or Google shared desktop
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41448
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Tue Mar 01, 2016 1:51 pm

Hi Antonio,

How would I run an exe on the server when the client clicks a button?
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Jeff Barnes » Tue Mar 01, 2016 1:58 pm

Forgot to mention ... a standard exe not a FiveWeb exe.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby cnavarro » Tue Mar 01, 2016 3:06 pm

Jeff, do not know if I understand correctly your problem
Let's see if it helps you

viewtopic.php?f=6&t=32021#p187310
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 63 guests

cron