FiveWeb Questions

Re: FiveWeb Questions

Postby Jeff Barnes » Fri Jan 29, 2016 1: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Fri Jan 29, 2016 7: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: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Antonio Linares » Fri Jan 29, 2016 7:13 pm

You can test samples\testmemo.prg from here:

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

Image
regards, saludos

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

Re: FiveWeb Questions

Postby Jeff Barnes » Wed Feb 03, 2016 7: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: Select all  Expand view

#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)
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 03, 2016 7:56 pm

Jeff,

Here it looks ok:
Image

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Wed Feb 03, 2016 8: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Thu Feb 04, 2016 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Fri Feb 05, 2016 7: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Jeff Barnes » Fri Feb 05, 2016 9: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Antonio Linares » 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: Select all  Expand view

   @ 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: Select all  Expand view
                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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » 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: Select all  Expand view

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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Sat Feb 06, 2016 1: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Sat Feb 06, 2016 8:48 pm

very good! :-)
regards, saludos

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

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 65 guests