FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FiveWeb Questions
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Fri Jan 29, 2016 01:04 PM

Hi Antonio,

Folders now working :)

A couple of things I noticed:
1. When using folders the "Picture" clause on gets no longer seem to work.
2. "Mulitline" does not work on gets

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Fri Jan 29, 2016 07:03 PM
Jeff,

1. Fixed

2. I just implemented it

Please download the new version from here:
https://bitbucket.org/fivetech/fiveweb/downloads

There is a new samples\testmemo.prg
Code (fw): Select all Collapse
#include "FiveWeb.ch"

function Main()

   local oDlg, cText := PadR( "This is a text", 50 )

   DEFINE DIALOG oDlg

   @ 10, 10 GET cText MULTILINE OF oDlg SIZE 300, 200

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Fri Jan 29, 2016 07:13 PM
You can test samples\testmemo.prg from here:

http://www.fivetechsoft.net/cgi-bin/testmemo

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Wed Feb 03, 2016 07:13 PM
Hi Antonio,

Got the new version installed.

Looks like ComboBox and Checkbox might be ok in a typical dialog but not with folders.
It will not place them at the specified row/col when in a folder.

Also, would it be possible to add the "WHEN" clause to Buttons?

Please try this sample:

Code (fw): Select all Collapse
#include "FiveWeb.ch"

function Main()
   local oDlg, oCbx, cValue := "two"
   local oFld
   DEFINE DIALOG oDlg TITLE "Using a combobox"
    @ 0, 0 FOLDER oFld PROMPTS "One","Two" SIZE 500, 560 OF oDlg
    @ 130, 60 COMBOBOX oCbx VAR cValue ITEMS "one", "two", "three" OF oFld:aDialogs[1]
    @ 200, 120 BUTTON "Ok" OF oFld:aDialogs[1] ACTION alert( oCbx.value ) 
   ACTIVATE DIALOG oDlg NOWAIT
return nil
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Wed Feb 03, 2016 07:56 PM
Jeff,

Here it looks ok:


What WHEN expression do you plan to use ? I mean, is it an expression to evaluate in the server
or in the browser ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Wed Feb 03, 2016 08:55 PM
Hi Antonio,

Try it again and look at where it "should" be placing the control:
@ 130, 60 COMBOBOX oCbx VAR cValue ITEMS "one", "two", "three" OF oFld:aDialogs[1]

As for the button, I would like to be able to disable the button (but still show it on the screen).

Basically I want to be able to do something like:

lSave := .f.

Then in the button line:
@ x,y Button "Save" of oDlg Action SomeAction() WHEN lSave
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Thu Feb 04, 2016 08:34 AM
Jeff,

* Fixed COMBOBOX location

* Added support for ... BUTTON ... WHEN ...

Please download FiveWeb again from:
https://bitbucket.org/fivetech/fiveweb/downloads
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Fri Feb 05, 2016 07:59 PM

Hi Antonio,

When I try to send the data from the combobox it doesn't seem to work.

Gets work with:
'document.getElementById( "oGet26" ).value.trim() + ":" + '+ ;

But combobox does not:
'document.getElementById( "oCbx" ).value.trim() + ":" + '+ ;

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Fri Feb 05, 2016 09:02 PM

Also,

How would I properly set up a "Browse" so when I click an item will send the "Record Number" for the item clicked ?

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Fri Feb 05, 2016 11:34 PM
Jeff,

Jeff Barnes wrote:Hi Antonio,

When I try to send the data from the combobox it doesn't seem to work.

Gets work with:
'document.getElementById( "oGet26" ).value.trim() + ":" + '+ ;

But combobox does not:
'document.getElementById( "oCbx" ).value.trim() + ":" + '+ ;


Please try this:
'document.getElementById( "combobox" ).value.trim() + ":" + '+ ;

if it works, then we may need to make a little change in Class TComboBox, so each combobox control
uses a different Id
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Fri Feb 05, 2016 11:42 PM
Jeff,

Jeff Barnes wrote:Also,

How would I properly set up a "Browse" so when I click an item will send the "Record Number" for the item clicked ?


Please review this lines from samples\otto.prg:
Code (fw): Select all Collapse
   @ 10, 10 BROWSE oBrw SIZE 500, 400 OF oDlg ARRAY aDatos

    oBrw:cAction:= "Edita"

    oBrw:cClassTable:= "" //"browse"
    oBrw:cClassLine:="linea"
    obrw:cClassHead:= "boxtitulo"
    oBrw:lZebra:= .t.

    oBrw:CreateFromCode()


In class TBrowse we have this:
Code (fw): Select all Collapse
                 if(Empty(::cAction),'', ' onDblClick="'+"document.location = '"+(appname())+"?"+::cAction+":"+alltrim(str(x))+":"+alltrim(str(n )) +"'" +'"' )+;

so onDblClick the record number will be automatically provided as a parameter
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Sat Feb 06, 2016 11:49 AM
Hi Antonio,

For the combobox, this seems to work:
'document.getElementById( "combobox" ).value.trim() + ":" + '+ ;


For the Browse, I have tried Otto's example however it returns the item number in the order of the list (array).
If I build the array using a filtered list from my DBF the number returned does not line up with the record number in the DBF.

A very basic example:

If my DBF has 3 items
Item1
Item2
Item3

And I do something like:
Code (fw): Select all Collapse
IF LEN( aData ) = 0
   USE \mydata\TestDB SHARED NEW
   aadd( aData, {"A"} ) 
   go top
   do while ! eof()
      aadd(aData,{TestDB->A } )
      skip 2
   enddo
   CLOSE TestDB
ENDIF


My list in the browse will have:
Item1 (Record #1)
Item3 (Record #3)

If I double click on ITEM3 it will send ".....edittest:3:1".
I understand that the first number returned will be the line in the list and the second number is the cell location.
So, subtracting 1 from the first number (done to compensate for the header added to the array) will give me "2" which will display the info from the wrong record.
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Sat Feb 06, 2016 12:06 PM

Jeff,

you could modify browse.prg source code so it provides you the info that you need

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Sat Feb 06, 2016 01:27 PM

Perfect. Modified the Browse.prg and can get what I need now. Thanks.

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Sat Feb 06, 2016 08:48 PM

very good! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com