topic
stringlengths
1
63
text
stringlengths
1
577k
xBrowse + EDIT_GET
There are well known tables customer and states and in addition, more tables. You can use customer and states. Or you can create your own table and fill some dummy data or 2 rows. Please try this small sample to view the tables [code=fw:1c79um45]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCn<br /><br />&nbsp; &nbsp;SET DATE ITALIAN<br />&nbsp; &nbsp;SET CENTURY <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;FW_SetUnicode<span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oCn &nbsp; := FW_DemoDB<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;XBROWSER oCn:<span style="color: #000000;">ListTables</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Dbl-Click to View Table"</span> ;<br />&nbsp; &nbsp; &nbsp; SETUP ;<br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLDClickData</span> := ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> |r,c,f,o| ShowTable<span style="color: #000000;">&#40;</span> oCn, o:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oCn:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">function</span> ShowTable<span style="color: #000000;">&#40;</span> oCn, cTable <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oRs<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> cTable == <span style="color: #ff0000;">"custbig"</span><br />&nbsp; &nbsp; &nbsp; MsgRun<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Reading "</span> + cTable, <span style="color: #ff0000;">"Please wait"</span>, <span style="color: #000000;">&#123;</span> || oRs &nbsp; := oCn:<span style="color: #000000;">RecSet</span><span style="color: #000000;">&#40;</span> cTable, <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; MsgRun<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Reading "</span> + cTable, <span style="color: #ff0000;">"Please wait"</span>, <span style="color: #000000;">&#123;</span> || oRs &nbsp; := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">&#40;</span> cTable <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;XBROWSER oRs <span style="color: #0000ff;">TITLE</span> cTable FASTEDIT NOMODAL SHOW RECID<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1c79um45]
xBrowse + EDIT_GET
Mr Rao, IF I create the rowset only with the table CUSTOMER everything is fine. Is there some table that has a relation with this table ?
xBrowse + EDIT_GET
[code=fw:1xnmjucj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">TEXT</span> INTO cSql<br />&nbsp; &nbsp;<span style="color: #0000ff;">select</span> c.* ,s.code as statecode, s.<span style="color: #0000ff;">name</span> as statename<br />&nbsp; &nbsp;<span style="color: #0000ff;">from</span> customer c <br />&nbsp; &nbsp;<span style="color: #0000ff;">left</span> <span style="color: #0000ff;">join</span> states s <span style="color: #0000ff;">on</span> c.`state` = s.code<br />ENDTEXT<br />&nbsp;</div>[/code:1xnmjucj]
xBrowse + EDIT_GET
Mr Rao, Here is it: [code=fw:btzyssjr]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Splitter.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCn, oRs,nSec:=Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oQryMvg,oItalic,oBold,aCols,oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,oWndAgd,oCol,oPanel<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,oVSplit,oPanelExplorer,oExBar,oMenu<br /><br />&nbsp; &nbsp;oCn &nbsp; := FW_DemoDB<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//QUERY DE GUIAS</span><br />&nbsp; &nbsp;oQryMvg := oCN:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"SELECT cus.*,sta.name FROM customer AS cus LEFT JOIN states AS sta ON cus.state = sta.code WHERE cus.state = ?"</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"WA"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//EXIBE JANELA DA AGENDA</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold &nbsp; <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span> bold<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oItalic <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span> italic<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndAgd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ordens de Serviço para "</span>+Dtoc<span style="color: #000000;">&#40;</span>date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">MENU</span> oMenu<br /><br />&nbsp; &nbsp; &nbsp; oExBar := TExplorerBar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">300</span>, oPanelExplorer <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//CRIA BROWSE DE VEÍCULOS</span><br />&nbsp; &nbsp; &nbsp; oPanel<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := oExBar:<span style="color: #000000;">AddPanel</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Veículos"</span>,,<span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//CRIA BROWSE DE EQUIPES</span><br />&nbsp; &nbsp; &nbsp; oPanel<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := oExBar:<span style="color: #000000;">AddPanel</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Equipe"</span> ,,<span style="color: #000000;">165</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//BROWSE DE OS</span><br />&nbsp; &nbsp; &nbsp; aCols := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"first"</span>,<span style="color: #ff0000;">"Nº Terminal"</span>,,<span style="color: #000000;">85</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span>|| oQryMvg:<span style="color: #000000;">street</span>+CRLF+oQryMvg:<span style="color: #000000;">city</span><span style="color: #000000;">&#125;</span>,<span style="color: #ff0000;">"Cliente/Local"</span>,,<span style="color: #000000;">300</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"state"</span>,<span style="color: #ff0000;">"Viatura"</span>,<span style="color: #ff0000;">"!!!!!"</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"zip"</span>,<span style="color: #ff0000;">"Operador/Fiel"</span>,,<span style="color: #000000;">200</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"name"</span>,<span style="color: #ff0000;">"Hr.Inicio"</span>,,<span style="color: #000000;">50</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"salary"</span>,<span style="color: #ff0000;">"Valor"</span>,<span style="color: #ff0000;">"999,999,999.99"</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">00</span>,<span style="color: #000000;">255</span> <span style="color: #0000ff;">XBROWSE</span> oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oWndAgd COLUMNS aCols DATASOURCE oQryMvg CELL LINES FASTEDIT AUTOSORT <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nRowHeight</span> &nbsp; &nbsp;:= <span style="color: #000000;">35</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nStretchCol</span> &nbsp; := STRETCHCOL_LAST<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:= oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:<span style="color: #000000;">nEditType</span> &nbsp; := EDIT_GET<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//oCol:bEditBlock &nbsp;:= { |r,c,oCol| MsgInfo("Test 1"),NIL }</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//the problem is happening in this column</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:= oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCol:<span style="color: #000000;">nEditType</span> &nbsp; := EDIT_GET<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//oCol:bEditBlock &nbsp;:= { |r,c,oCol| MsgInfo("Test 2"),NIL }</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">0</span>,<span style="color: #000000;">255</span> &nbsp; &nbsp;SPLITTER oVSplit ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VERTICAL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PREVIOUS CONTROLS oExBar ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HINDS CONTROLS oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">LEFT</span> MARGIN <span style="color: #000000;">250</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RIGHT</span> MARGIN <span style="color: #000000;">80</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">355</span> &nbsp;<span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oWndAgd ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_3DLOOK<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndAgd <span style="color: #0000ff;">MAXIMIZED</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> RESIZE <span style="color: #000000;">&#40;</span>oVSplit:<span style="color: #000000;">AdjRight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oItalic:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBold:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oCn:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />&nbsp;</div>[/code:btzyssjr]
xBrowse + EDIT_GET
I will check it now.
xBrowse + EDIT_GET
5th column in the browse shows the field "name" in the query. This is a field from joined table "states", not the base table "customer" By default, only the fields in the basetable are editable. Other fields read from joined tables are flagged as readonly. Now why do you want to modify the name of state in the states table, while browsing customer table? What is your requirement?
xBrowse + EDIT_GET
In my program, this is a column of other table that I want to edit, that is I'm editing two tables at the same time. I believe I will have to save the content by myself, probably using bOnPostEdit, isn't it ? I just want the user can type the value in the xbrowse.
xBrowse + EDIT_GET
Ok. That means in the above case, we want to save the changed name in states table. Example, we like to change "Washington" as "Washigton DC" and save in the states table. Right?
xBrowse + EDIT_GET
Yes, It's.
xBrowse + EDIT_GET
I suggest two alternatives. In both the cases please remember to read primary key of the joined table also. 1) Update states table at xbrowse level. [code=fw:ag4v4x8w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCn, oRs, cSql<br /><br /><span style="color: #0000ff;">TEXT</span> INTO cSql<br />&nbsp; &nbsp;<span style="color: #0000ff;">SELECT</span> C.*, S.<span style="color: #0000ff;">ID</span> AS StateID, S.<span style="color: #0000ff;">NAME</span> AS StateName<br />&nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> customer C <span style="color: #0000ff;">LEFT</span> <span style="color: #0000ff;">JOIN</span> states S <span style="color: #0000ff;">ON</span> C.STATE = S.CODE<br />ENDTEXT<br /><br />&nbsp; &nbsp;oCn &nbsp; := FW_DemoDB<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRs &nbsp; := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;XBROWSER oRs COLUMNS <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"City"</span>, <span style="color: #ff0000;">"State"</span>, <span style="color: #ff0000;">"StateName"</span> FASTEDIT SETUP MySetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> MySetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oRs &nbsp; := oBrw:<span style="color: #000000;">oDbf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cSql<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw:<span style="color: #000000;">StateName</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lReadOnly</span> &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bOnPostEdit</span> &nbsp; := &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;< |oCol, xVal, nKey|<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> nKey != VK_ESCAPE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oRs:<span style="color: #000000;">oCn</span>:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"states"</span>, <span style="color: #ff0000;">"name"</span>, <span style="color: #000000;">&#123;</span> xVal <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"id="</span> + oRs:<span style="color: #000000;">oCn</span>:<span style="color: #000000;">ValToSQL</span><span style="color: #000000;">&#40;</span> oRs:<span style="color: #000000;">StateID</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oRs:<span style="color: #000000;">ReQuery</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:ag4v4x8w] 2. Update states table at RowSet level: [code=fw:ag4v4x8w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Splitter.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCn, oRs, cSql<br /><br /><span style="color: #0000ff;">TEXT</span> INTO cSql<br />&nbsp; &nbsp;<span style="color: #0000ff;">SELECT</span> C.*, S.<span style="color: #0000ff;">ID</span> AS StateID, S.<span style="color: #0000ff;">NAME</span> AS StateName<br />&nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> customer C <span style="color: #0000ff;">LEFT</span> <span style="color: #0000ff;">JOIN</span> states S <span style="color: #0000ff;">ON</span> C.STATE = S.CODE<br />ENDTEXT<br /><br />&nbsp; &nbsp;oCn &nbsp; := FW_DemoDB<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRs &nbsp; := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;WITH OBJECT oRs<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"statename"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">lReadOnly</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bTrigger</span> := <span style="color: #000000;">&#123;</span> |rs,fldname| MyTrigger<span style="color: #000000;">&#40;</span> rs, fldname <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;XBROWSER oRs COLUMNS <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"City"</span>, <span style="color: #ff0000;">"State"</span>, <span style="color: #ff0000;">"StateName"</span> FASTEDIT<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> MyTrigger<span style="color: #000000;">&#40;</span> oRs, cFieldName <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> cFieldName == <span style="color: #ff0000;">"statename"</span> &nbsp;<span style="color: #B900B9;">// all lower</span><br />&nbsp; &nbsp; &nbsp; oRs:<span style="color: #000000;">oCn</span>:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"states"</span>, <span style="color: #ff0000;">"name"</span>, <span style="color: #000000;">&#123;</span> oRs:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> cFieldName <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"id="</span> + oRs:<span style="color: #000000;">oCn</span>:<span style="color: #000000;">ValToSQL</span><span style="color: #000000;">&#40;</span> oRs:<span style="color: #000000;">StateID</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oRs:<span style="color: #000000;">requery</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:ag4v4x8w] First build and run both the programs and then adopt to your requirements. I feel the 1st alternative is a simpler approach.
xBrowse + EDIT_GET
Mr Rao, Thank You. It's working now <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xBrowse + EDIT_GET
Based on the samples below, I made a small program that create's the browse I want, But the update of field (Cat_Pos = position) is not done. There is something missing, most likely with the primary keys not included ? For : PS_category_product I see id_category id_product For : PS_product_lang id_product id_shop id_lang [code=fw:14ukzysj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oCn, oRs<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oFont, oBrwParent, oBrwChild<br />   <span style="color: #00C800;">local</span> oStates, oCust, oProduct<br />  <br />   FW_SetUnicode<span style="color: #000000;">&#40;</span> .f. <span style="color: #000000;">&#41;</span><br /><br />  Serversetup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />  FWCONNECT oCn HOST cServer USER cUser PASSWORD cPassword DATABASE cDatabase<br /><br />  <span style="color: #00C800;">if</span> oCn == <span style="color: #00C800;">nil</span><br />     ? <span style="color: #ff0000;">"Failed to connect"</span><br />     <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />  <span style="color: #00C800;">endif</span><br /><br /><span style="color: #0000ff;">TEXT</span> INTO cSql<br /><br /><span style="color: #0000ff;">SELECT</span><br />  a.id_category as Cat_Id,<br />  a.<span style="color: #0000ff;">name</span> as Cat_Name,<br />  b.position as Cat_Pos,<br />  b.id_product,<br />  b.id_category,<br />  c.<span style="color: #0000ff;">name</span> as Pro_Name,<br />  c.id_product<br /><span style="color: #0000ff;">FROM</span><br />  ps_category_lang as a<br /><span style="color: #0000ff;">LEFT</span> <span style="color: #0000ff;">JOIN</span><br />  ps_category_product as b<br />    <span style="color: #0000ff;">ON</span> a.id_category = b.id_category<br /><span style="color: #0000ff;">LEFT</span> <span style="color: #0000ff;">JOIN</span><br />  ps_product_lang as c<br />    <span style="color: #0000ff;">ON</span> c.id_product = b.id_product<br />    <span style="color: #0000ff;">where</span> a.id_lang = <span style="color: #000000;">1</span> and c.id_lang = <span style="color: #000000;">1</span><br /><span style="color: #0000ff;">order by</span> Cat_Id, Cat_Pos<br /><br />ENDTEXT<br /><br />oRs := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><br />XBROWSER oRs COLUMNS <span style="color: #ff0000;">"Cat_Id"</span>, <span style="color: #ff0000;">"Cat_Name"</span>,<span style="color: #ff0000;">"Cat_Pos"</span>,<span style="color: #ff0000;">"Pro_Name"</span> FASTEDIT SETUP MySetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />ocn:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//***********************************************************</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> MySetup<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oRs   := oBrw:<span style="color: #000000;">oDbf</span><br />   <span style="color: #00C800;">local</span> cSql<br /><br />   WITH OBJECT oBrw:<span style="color: #000000;">Cat_Pos</span><br />      :<span style="color: #000000;">lReadOnly</span>     := .f.<br />      :<span style="color: #000000;">bOnPostEdit</span>   :=    ;<br />         < |oCol, xVal, nKey|<br />         <span style="color: #00C800;">if</span> nKey != VK_ESCAPE<br />            oRs:<span style="color: #000000;">oCn</span>:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ps_category_product"</span>, <span style="color: #ff0000;">"position"</span>, <span style="color: #000000;">&#123;</span> xVal <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"id="</span> + oRs:<span style="color: #000000;">oCn</span>:<span style="color: #000000;">ValToSQL</span><span style="color: #000000;">&#40;</span> oRs:<span style="color: #000000;">Cat_Pos</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            oRs:<span style="color: #000000;">ReQuery</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />         <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />         ><br />   END<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:14ukzysj]
xBrowse + Imagenes
Buenos días foro!! Tengo un problemilla y es que tengo un array como el siguiente: { {1,"Tipo 1"}, {2,"Tipo 2"}, {3,"Tipo 3"}, } La primera columna puede contener valores desde 1 hasta 5, me gustaría, en base a este valor, mostrar 5 bmp, ¿teneis un ejemplo de cómo hacerlo? Muchas Gracias.
xBrowse + Imagenes
Colega ver si ayuda [code=fw:1xqi80n6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"COR1"</span> <span style="color: #000000;">&#41;</span> <br /> oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"COR2"</span> <span style="color: #000000;">&#41;</span> <br /> oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"COR3"</span> <span style="color: #000000;">&#41;</span>  <br /> oCol:<span style="color: #000000;">bBmpData</span>         := <span style="color: #000000;">&#123;</span> || iif<span style="color: #000000;">&#40;</span>produto->PrEstq=<span style="color: #000000;">0</span>,<span style="color: #000000;">1</span>,iif<span style="color: #000000;">&#40;</span>produto->prestq<<span style="color: #000000;">0</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:1xqi80n6] Luiz Fernando
xBrowse + Imagenes
Muchas Gracias Luiz por la información, en nuestro caso era AddBmpFile en vez de AddResource y el tratamiento era con un array, pero haciendo las modificaciones pertinentes me ha funcionado correctamente.
xBrowse + MySql and SetCheck ( logic field )
Hi, Can you share with a sample for logic field with 2 state bitmaps ? I found samples in testxbrw.prg and xbrowgrd.prg . But something can't understand and that isn't working for me , I'm not seeing bitmaps ... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Here is mine source : [code=fw:osw4drbj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Užsakymai"</span> <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> wndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <br />@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE oQry COLUMNS aCol HEADERS aHdr<br /><br />oBrw:<span style="color: #000000;">nMarqueeStyle</span>       := MARQSTYLE_HIGHLCELL<br />oBrw:<span style="color: #000000;">nColDividerStyle</span>    := LINESTYLE_BLACK<br />oBrw:<span style="color: #000000;">nRowDividerStyle</span>    := LINESTYLE_BLACK<br />oBrw:<span style="color: #000000;">lColDividerComplete</span> := .t.<br />oBrw:<span style="color: #000000;">nFreeze</span>             := <span style="color: #000000;">3</span><br /><br /><span style="color: #B900B9;">//oBrw:Svarbus:AddResource( "ON" )</span><br /><span style="color: #B900B9;">//oBrw:Svarbus:AddResource( "OFF" )</span><br />oBrw:<span style="color: #000000;">Svarbus</span>:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ON"</span>, <span style="color: #ff0000;">"OFF"</span> <span style="color: #000000;">&#125;</span>, EDIT_LISTBOX, <span style="color: #000000;">&#123;</span> cYs, cNo <span style="color: #000000;">&#125;</span>  <span style="color: #000000;">&#41;</span><br /><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:osw4drbj] At this moment bitmaps in RC . Can this be done with bitmaps files instead RC ? MySql boolean type for column isn't strong define . I'm using "smallint" : 1 for true , 0 - false ... Thanks in advance ! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xBrowse + MySql and SetCheck ( logic field )
Please set [code=fw:uznatcqa]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">Svarbus</span>:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> || oQry:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <nFldNo> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:uznatcqa] where <nFldNo> is the field number to display as logical value. After this call SetCheck() method
xBrowse + MySql and SetCheck ( logic field )
[quote="nageswaragunupudi":1h0ekthr]Please set [code=fw:1h0ekthr]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">Svarbus</span>:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> || oQry:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <nFldNo> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:1h0ekthr] where <nFldNo> is the field number to display as logical value. After this call SetCheck() method[/quote:1h0ekthr] Thanks Rao ! This worked ! Very fine ! Can you explain also how to do "Yes/No" combobox for that to change values ? Many thanks ! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse + MySql and SetCheck ( logic field )
Either you need to show checkbox or combobox. Not both. If instead of checkbox you like to show combobox. [code=fw:3jnydvx7]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oBrw:<span style="color: #000000;">Svarbus</span><br />&nbsp; &nbsp;:<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> |n| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span> nFld, n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oQry:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">bStrData</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">Svarbus</span>:<span style="color: #000000;">Value</span> == <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"Yes"</span>, <span style="color: #ff0000;">"No "</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; := EDIT_LISTBOX<br />&nbsp; &nbsp;:<span style="color: #000000;">aEditListTxt</span> &nbsp;:= <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Yes"</span>, <span style="color: #ff0000;">"No "</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">aEditListBound</span>:= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> &nbsp;<br />END</div>[/code:3jnydvx7]
xBrowse + MySql and SetCheck ( logic field )
[quote="nageswaragunupudi":sdd26ide]Either you need to show checkbox or combobox. Not both. If instead of checkbox you like to show combobox. [code=fw:sdd26ide]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oBrw:<span style="color: #000000;">Svarbus</span><br />   :<span style="color: #000000;">bEditValue</span>    := <span style="color: #000000;">&#123;</span> |n| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span> nFld, n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oQry:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   :<span style="color: #000000;">bStrData</span>      := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">Svarbus</span>:<span style="color: #000000;">Value</span> == <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"Yes"</span>, <span style="color: #ff0000;">"No "</span> <span style="color: #000000;">&#125;</span><br />   :<span style="color: #000000;">nEditType</span>     := EDIT_LISTBOX<br />   :<span style="color: #000000;">aEditListTxt</span>  := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Yes"</span>, <span style="color: #ff0000;">"No "</span> <span style="color: #000000;">&#125;</span><br />   :<span style="color: #000000;">aEditListBound</span>:= <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>  <br />END</div>[/code:sdd26ide][/quote:sdd26ide] How we can edit checkbox ? Thanks !
xBrowse + MySql and SetCheck ( logic field )
Please let me know the code you have to write to set a new value to a field and save it to the table with TMySql library you are using.
xBrowse + MySql and column sequence ...
Hi, I'm trying to rewrite one appl. from dbfs to mysql db . The first problem is to restore clients directed column sequence . That is at first was "order_id,item_id", but client moved columns "item_id,order_id" . Working with dbfs I used Hernans wbrowse class adopted for mine needs . Then I could create array for codeblocks in needfuls sequence and oBrw:bLine := { || brw_line( aFlds) } works fine ... OK , let say that I retored needful sequence columns for client . From MySql server query I can to do : aDgr := grd_set( cTbl, aGrd, cLg ) // restore settings of columns - sequence , width , visible ... etc. cFld := aDgr[ 1, 1 ]; cSql := "select " + cFld + " from " + cTbl + " where " + cTbl + ".db = '" + cDb_id + "'" oQry := oServ:Query( cSql ) Now begin to describe xBrowse : aFld := aDgr[ 2 ] // fields in needfuls sequence ... oBrw := TXBrowse():New( oWnd ) oBrw:SetMySQL( @oQry ) for u := 1 to len( aFld ) oCol := oBrw:AddCol() oCol:bStrData := { ||oQry:aFld[ u ] } ... next Here I stoped . I didn't tried this yet , because I'm in doubt . Question : will this oCol:bStrData := { ||oQry:aFld[ u ] } work ? If not , how can this be done ? Thanks in advance ! Rimantas
xBrowse + MySql and column sequence ...
Please try [code=fw:1ikxb54b]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE oQry ;<br />&nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">"fldName1"</span>, <span style="color: #ff0000;">"fldName2"</span>, ..., <span style="color: #ff0000;">"fldNameN"</span><br />&nbsp;</div>[/code:1ikxb54b] Note: Even while coding the old style, please do not use bStrData. Instead use bEditValue.
xBrowse + MySql and column sequence ...
[quote="nageswaragunupudi":2ijurscf]Please try [code=fw:2ijurscf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE oQry ;<br />    COLUMNS <span style="color: #ff0000;">"fldName1"</span>, <span style="color: #ff0000;">"fldName2"</span>, ..., <span style="color: #ff0000;">"fldNameN"</span><br /> </div>[/code:2ijurscf] Note: Even while coding the old style, please do not use bStrData. Instead use bEditValue.[/quote:2ijurscf] Thanks for the reply ! Thanks for advice to use bEitValue . OK , let say that at first described XBROWSE with COLUMNS manier . User changed cols sequence , I saved new sequence . Now closing and opeing window I must to restore saved column sequence . It will be suffice to direct new column sequence ? As I can understand I must to use vars instead fieldnames . It will looks like that : "@ 0,0 XBROWSE oBrw OF oWnd DATASOURCE oQry COLUMNS cMineColumnSquence" Not worked with FWH about 1 year . Have FWH 11.12 version . Do not have experience with xBrowse . So excuse for stupid questions ... I'm coming back ! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse + MySql and column sequence ...
To save the last used state of xbrowse, we can save the state with cSaveState := oBrw:SaveState() and in the next session restore the same the state with oBrw:RestoreState( cSavedState ) We need not always specify the column names as literals. We can use an array like this: aColNames := { "FIRSTNAME", "LASTNAME", "CITY". ...... } and then @ 10,10 XBROWSE oBrw ............ COLUMNS aColNames ............etc
xBrowse + MySql and column sequence ...
[quote="nageswaragunupudi":36mxfuax]To save the last used state of xbrowse, we can save the state with cSaveState := oBrw:SaveState() and in the next session restore the same the state with oBrw:RestoreState( cSavedState ) We need not always specify the column names as literals. We can use an array like this: aColNames := { "FIRSTNAME", "LASTNAME", "CITY". ...... } and then @ 10,10 XBROWSE oBrw ............ COLUMNS aColNames ............etc[/quote:36mxfuax] Thanks for your help ! At first I created xbrowse without any descriptions of cols . Mine code : [code=fw:36mxfuax]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">local</span> oWnd, oBrw, oQry<br /><span style="color: #00C800;">local</span> aDgr, aCol<br /><span style="color: #00C800;">local</span> cFld<br /><span style="color: #00C800;">local</span> cSql<br /><span style="color: #00C800;">local</span> cTbl := <span style="color: #ff0000;">"uzsakym"</span><br /><span style="color: #00C800;">local</span> aGrd := <span style="color: #000000;">&#123;</span> ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"uzsak"</span>        , <span style="color: #ff0000;">"Order.ID"</span>         <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"telkinys"</span>     , <span style="color: #ff0000;">"Pool"</span>             <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"preke"</span>        , <span style="color: #ff0000;">"Item ID"</span>          <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"uzs_kiekis"</span>   , <span style="color: #ff0000;">"Qty."</span>             <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"svarbus"</span>      , <span style="color: #ff0000;">"Import."</span>          <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"specai"</span>       , <span style="color: #ff0000;">"Spec."</span>            <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mazi"</span>         , <span style="color: #ff0000;">"Smalls"</span>           <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"uzs_spalv"</span>    , <span style="color: #ff0000;">"Ord.colors"</span>       <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"uzs_data"</span>     , <span style="color: #ff0000;">"Ord.date"</span>         <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"uzs_sav"</span>      , <span style="color: #ff0000;">"Ord.week"</span>         <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"graz_data"</span>    , <span style="color: #ff0000;">"Ret.date"</span>         <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"graz_sav"</span>     , <span style="color: #ff0000;">"Ret.week"</span>         <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"fakt_data"</span>    , <span style="color: #ff0000;">"Fact.date"</span>        <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"fakt_sav"</span>     , <span style="color: #ff0000;">"Fact.week"</span>        <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pastabos_ord"</span> , <span style="color: #ff0000;">"Ord.note"</span>         <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"zymos"</span>        , <span style="color: #ff0000;">"Notes"</span>            <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"kerpa"</span>        , <span style="color: #ff0000;">"Cutting"</span>          <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"sukirp_lap"</span>   , <span style="color: #ff0000;">"Cut.page"</span>         <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"etiketes"</span>     , <span style="color: #ff0000;">"Labels"</span>           <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"gav_data"</span>     , <span style="color: #ff0000;">"Recv.date"</span>        <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"subrang"</span>      , <span style="color: #ff0000;">"Subcontr."</span>        <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"aud_nuras"</span>    , <span style="color: #ff0000;">"Mater.off"</span>        <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"frn_nuras"</span>    , <span style="color: #ff0000;">"Furnit.off"</span>       <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"invc_nuras"</span>   , <span style="color: #ff0000;">"Invoice off"</span>      <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"nav_nuras"</span>    , <span style="color: #ff0000;">"NAV off"</span>          <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pasel_prad"</span>   , <span style="color: #ff0000;">"Mak.begin"</span>        <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pokav_prad"</span>   , <span style="color: #ff0000;">"Pack.begin"</span>       <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"prilyg_mod"</span>   , <span style="color: #ff0000;">"Equat.model"</span>      <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"prilyg_kiekis"</span>, <span style="color: #ff0000;">"Eq.qty"</span>           <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pastabos_buh"</span> , <span style="color: #ff0000;">"Account notes"</span>    <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"buh_specas"</span>   , <span style="color: #ff0000;">"Buh.spec"</span>         <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pastabos_zs"</span>  , <span style="color: #ff0000;">"Notes of Zarasai"</span> <span style="color: #000000;">&#125;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pok_lap_mod"</span>  , <span style="color: #ff0000;">"Pack.list model"</span>  <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />aDgr := grd_set<span style="color: #000000;">&#40;</span> cTbl, aGrd, cLg <span style="color: #000000;">&#41;</span><br />cFld := aDgr<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />aCol := aDgr<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />cSql := <span style="color: #ff0000;">"select "</span> + cFld + <span style="color: #ff0000;">" from uzsakym where uzsakym.db = '"</span> + cDb_id + <span style="color: #ff0000;">"'"</span><br />oQry := oServ:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cFld <span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> valtoprg<span style="color: #000000;">&#40;</span> aCol <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Užsakymai"</span> <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> wndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <br />@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE oQry COLUMNS aCol <br />oBrw:<span style="color: #000000;">SetMySQL</span><span style="color: #000000;">&#40;</span> oQry <span style="color: #000000;">&#41;</span><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:36mxfuax] But it returns error : [code=fw:36mxfuax]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br />   Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">D</span>:\A\Amdi2\engel.exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">3</span>,<span style="color: #000000;">318</span>,<span style="color: #000000;">757</span> bytes<br />   Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.1</span>.0dev <span style="color: #000000;">&#40;</span>Rev. <span style="color: #000000;">17140</span><span style="color: #000000;">&#41;</span><br />   FiveWin  Version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">11.10</span><br />   Windows version: <span style="color: #000000;">6.1</span>, Build <span style="color: #000000;">7601</span> Service Pack <span style="color: #000000;">1</span><br /><br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">7</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">2013.03</span><span style="color: #000000;">.01</span>, <span style="color: #000000;">18</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">05</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">44</span>  Assigned value is wrong <span style="color: #00C800;">class</span>: <span style="color: #000000;">TXBROWSE</span>:<span style="color: #000000;">NLEN</span><br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = C   <br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => TXBROWSE:_NLEN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TXBROWSE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">KEYCOUNT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">ADJUST</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">CREATEFROMCODE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">uzs</span>.prg => UZSAK<span style="color: #000000;">&#40;</span> <span style="color: #000000;">62</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">engel</span>.prg => RUN_PRG<span style="color: #000000;">&#40;</span> <span style="color: #000000;">441</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">engel</span>.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>MENU_RUN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">433</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\VISTAMNU.PRG => TVISTAMENU:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TVISTAMENU:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WINRUN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">engel</span>.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">243</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:36mxfuax] Added xbrowse.prg from sources to mine project. Now it's directed to error line ( 407 ) . This line : METHOD KeyCount() INLINE ( ::nLen := Eval( ::bKeyCount ),; iif(::oVScroll != nil ,; ( ::VSetRange( 1, ::nLen ), ::VUpdatePos() ), ),; ::nLen ) What that mean ? Empty query ? I also added this : u := 0 oQry:GoTop() while !oQry:eof() MsgInfo( oQry:uzsak + " " + oQry:preke ) oQry:skip() u ++ if ( u == 5 ) exit endif enddo Query isn't empty . Also tried with only first 3 columns : "uzsak", "telkinys", "preke" . They are varchar types only . The same result ... What that is bad ? Can you help me ? P.S.: At this moment I noticed that mine version of Fwh is 11.11 , not 11.12 ... <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> With best regards ! Rimantas ADDED ! This problem solved : Simply in xBrowse was query method ::oMysql:RecCount() , but in TMySql is ::oMysql:LastRec() . Changed , now I can see data of query in xBrowse ... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xBrowse + MySql and column sequence ...
1. @ r,c XBROWSE .... command itself calls oBrw:SetMySql(oQry). Please remove the specific call to SetMySql in the next line and try. 2. I do not have the version 11.11 with me. In the absence of the actual source code, I may not be able to advise you correctly. It will be helpful if you can send me the source of xbrowse.prg of 11.11 version to my personal email : <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->. That helps me to help you in future.
xBrowse + MySql and column sequence ...
[quote:36mrnpmd]1. @ r,c XBROWSE .... command itself calls oBrw:SetMySql(oQry). Please remove the specific call to SetMySql in the next line and try. [/quote:36mrnpmd] Have you tried this? May I know the result? I have received the xbrowse.prg. I shall refer to that whenever necessary.
xBrowse + MySql and column sequence ...
[quote="nageswaragunupudi":2q09qxjb][quote:2q09qxjb]1. @ r,c XBROWSE .... command itself calls oBrw:SetMySql(oQry). Please remove the specific call to SetMySql in the next line and try. [/quote:2q09qxjb] Have you tried this? May I know the result? I have received the xbrowse.prg. I shall refer to that whenever necessary.[/quote:2q09qxjb] Yes , I tried this . Working fine ! Thank yoo , Rao ... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xBrowse + OO Array
Hello, I have a class for manipulate Arrays like TdataBase, there are method like skip, bof, fieldget fieldname, recno, etc My question is how can I use xBrowse for navigate in the array like a datasource, I want to define columns with field names not by column number or array position number With xBrowse is possible to do this? regards Marcelo
xBrowse + OO Array
Marcelo, I wrote a similar class for arrays some time ago and was also hoping to use it with browses, etc. However, I found that xbrowse can't handle it because it has been modified to handle arrays as arrays. If I remember correctly the issue is that array class doesn't have an alias and if xbrowse doesn't find an alias then it assumes the datasource is a database. Personally, I think it would have been better to use classes for arrays and other data sources rather than attempt to build all the special code into the browse. This would be more in keeping with OOP design principles, and it would have made it easier to setup browses since all the setups would have been the same. However, it is too late for that now. Regards, James
xBrowse + OO Array
Marcelo, Have you tried to inherit your class to manage arrays from TDataBase and adjust whatever is needed ? (not sure if it will be too messy) CLASS TArrayData FROM TDataBase this way the browse will think that its using a TDataBase object. I agree with James, a generic Class TDataSource would have been the best solution, and then inherit from it to implement TDbfSource, TArraySource, etc.
xBrowse + OO Array
Antonio, the inherit from TdataBase is a good idea I will try. The tDataSource Class will be the best way, I think is not late to implement it Gracias por la respuesta Antonio y James saludos Marcelo
xBrowse + OO Array
Marcelo, It seems easy to implement a Class TDataSource, the problem would be regarding the xbrowse that it is not designed for it. Anyhow, Rao is our XBrowse expert, so he has the final word <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse + OO Array
I don't see any advantage to inheriting from TDatabase. Almost every method would have to be overridden anyway. I wrote mine from scratch with all the same data and methods as TDatabase. As I mentioned before, I think the problem I found was with xBrowse needing an alias otherwise it treats the data class as an array instead of a database object. I don't have my old notes with me right now, but I will try to remember to look them up tonight for more specific information. It may be that creating a subclass of xBrowse would solve the problem. James
xBrowse + OO Array
James, The only advantage is that xbrowse then would recognize the TDataArray as a TDataBase object too, and not as an array, anyhow as you explained, many methods would have to be overriden.
xBrowse + OO Array
Antonio, What did you have in mind for a TDataSource class? It seems to me that (ideally) all we need is to assign any data object to xBrowse. Since all data objects would have the same properties and methods then xBrowse would not need to handle all this internally. We could also use these non-dbf database classes anywhere else a DBF is normally used. So we could have an array class, a SQLite class, a MySQL class, etc. A TDataSource class could be a parent class of these various types of classes that is never actually instantiated by itself, but rather just used as an inheritance source. I have seen this done before. James
xBrowse + OO Array
Antonio, yes, tDataSource only need to be an skeleton like interface in java and James, yes the solution is xBrowse, it needs to work with tDataSource structure regards Marcelo
xBrowse + OO Array
James, [quote="James Bott":jr8tmhp9]A TDataSource class could be a parent class of these various types of classes that is never actually instantiated by itself, but rather just used as an inheritance source. I have seen this done before.[/quote:jr8tmhp9] Yes, in OOD they call it an "interface", if I remember correctly. EMG
xBrowse + OO Array
Enrico, According to the book, "Business Engineering with Object Technology," by David A. Taylor, P 91, classes that never get instantiated themselves are called "abstract" classes. If they are instantiated themselves, then they are called "concrete" classes. Perhaps they are also called "interface" classes. James
xBrowse + OO Array
James, [quote="James Bott":1js7pn5r]Enrico, According to the book, "Business Engineering with Object Technology," by David A. Taylor, P 91, classes that never get instantiated themselves are called "abstract" classes. If they are instantiated themselves, then they are called "concrete" classes. Perhaps they are also called "interface" classes. James[/quote:1js7pn5r] Yes, right. EMG
xBrowse + OO Array
James, I have just been having a look at Borland's Class TDataSource: [url:1d5pvuzs]http&#58;//docs&#46;embarcadero&#46;com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/DB_TDataSource&#46;html[/url:1d5pvuzs] and though it has many things that we don't need, we can get some ideas of what we could use. I would propose a few of them: [code=fw:1d5pvuzs]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">CLASS</span> TDataSource<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp;lAutoEdit <span style="color: #0000ff;">INIT</span> .F.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">Self</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GoBottom<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Skip<span style="color: #000000;">&#40;</span> nRecords <span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Set<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Count</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GetPos<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> VIRTUAL <span style="color: #B900B9;">// equivalent for RecNo()</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetPos<span style="color: #000000;">&#40;</span> nPos <span style="color: #000000;">&#41;</span> VIRTUAL <span style="color: #B900B9;">// equivalent for GoTo()</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Automatically build an editing interface</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> OnDataChange<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<br /><span style="color: #00C800;">ENDCLASS</span><br />&nbsp;</div>[/code:1d5pvuzs]
xBrowse + OO Array
TDataSource is a good idea. I think FWH would soon implement it. This can be the base class for Arrays, DBF, RecordSets and anything else we can imagine. As far as XBrowse is concerned: XBrowse is made to work with any user defined class [b:1buiok0n]PROVIDED[/b:1buiok0n] that you define some methods and data. There are basically two alternatives: [b:1buiok0n]Alternative-1:[/b:1buiok0n] Define a METHOD SetXBrowse( oBrw, aCols, lAutoSort, lAutoCols ) In this method you write code similar to that in SetODbf() method of xbrowse. You need to take care of all xbrowse settings. Then you define XBROWSE the same way like you define XBROWSE for RDD/ADO. If your class has method SetXBrowse, XBrowse will call your method instead of its own SetODbf. You are responsible to do what SetoDbf does for TDataBase inside your method SetXBrowse() [b:1buiok0n]Alternative-2[/b:1buiok0n] You define the following methods in your class, with the same functionality as in TDatabase: [b:1buiok0n]Compulsory methods:[/b:1buiok0n] 1) Bof() 2) Eof() // note: Set eof only when nAt > nLen 3) GoTop() 4) GoBottom() 5) RecNo() 6) GoTo( nRec ) 7) KeyNo() 8 ) KeyGoTo( nKey ) 9) KeyCount() 10) RecCount() 11) SetOrder( cColumnName ) --> Oldorder name // This should exactly work like OrdSetFocus() Most important method: 12) Skipper( n ) --> nSkipped [b:1buiok0n]Compulosry DATA[/b:1buiok0n] Actually optional, but you can not use columns clause without this data. So consider it as compulsory: DATA aStruct aStruct should be an array similar to DbStruct(), with field name, type, len and dec. XBrowse uses this array to work with the column definitions in your class. I presume you have implemented on error method so that : obj:<colname> returns value of the column and obj:<colname> := x sets the new value of to the colname [b:1buiok0n]Optional but highly Desirable Methods:[/b:1buiok0n] 1) Seek( cSeek, lSoftSeek, lWildSeek ) // if the method exists, XBrowse uses this for incremental seeks. XBrowse uses only 1st and 3rd parameters. 2) Delete() 3) OrdDescend( cOrder, <ignore>, lDescend ) // Works like OrdDescend() function If you provide these methods in your class with appropriate functionality, you can use it with xbrowse like any other dbf/rdd/ado/tdolphin, etc. @ r,c XBROWSE oBrw OF oWnd [b:1buiok0n]DATASOURCE oMySpecalObject[/b:1buiok0n] COLUMNS cCol1, cCol2 ................... and same like other browses ...... XBrowse detects that you are using an Object. Then it decides that your object is not TDatabase, RecordSet, SqlQuery but something else. Then XBrowse checks to see if your Object has method "SetXBrowse". If so, xbrowse simply calls your method SetXBrowse and hands over total responsibility to your method. If not it checks if your object has the methods I stated above and if so goes ahead and constructs the browse using your methods. If not it simply offers to browse your object as an unknown object ( Hope you know we can browse oDlg, oWnd, etc .. any object ) ------------- Having said this, let me add a few notes: Hereafter no new methods like SetAdo, SetArray, etc will not be added to accommodate new classes. It is enough if the class is designed providing above methods and any such object can be xbrowsed just like any other rdd/ado, etc. If we acquire a class from some source, which does not provide these methods, then our advice is to write a small wrapper class providing the above methods. Now the class is ready to be xbrowsed. PS: I personally use my own classes TArray (like yours) and TAdoBase for recordsets for many years. I did not modify XBrowse for my classes. My classes use the above mechanism and my programs use the same syntax like other xbrowses for browing my classes.
xBrowse + OO Array
In case you feel implementation of the above suggestion may take time and you want a quick start, please add this one method to your class: [code=fw:1skskppk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> SetXBrowse<span style="color: #000000;">&#40;</span> oBrw, aCols, lAutoSort, lAutoCols <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TArray <span style="color: #B900B9;">// (your class name)</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aHead, n, nAt<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> aCols == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; lAutoCols &nbsp; := .t.<br />&nbsp; &nbsp; &nbsp; aHead &nbsp; &nbsp; &nbsp; := ArrTranspose<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aStruct</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; aCols &nbsp; &nbsp; &nbsp; := .t.<br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; lAutoCols &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; aHead &nbsp; &nbsp; &nbsp; := AClone<span style="color: #000000;">&#40;</span> aCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> &nbsp;:= <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, AScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aStruct</span>, <span style="color: #000000;">&#123;</span> |a| Upper<span style="color: #000000;">&#40;</span> aCols<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == Upper<span style="color: #000000;">&#40;</span> a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span> n<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span>, lAutoSort, <span style="color: #000000;">1</span>, aCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cHeaders</span> &nbsp; &nbsp; &nbsp;:= aHead<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cDataType</span> &nbsp; &nbsp; := ::<span style="color: #000000;">aStruct</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nDataLen</span> &nbsp; &nbsp; &nbsp;:= ::<span style="color: #000000;">aStruct</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nDataDec</span> &nbsp; &nbsp; &nbsp;:= ::<span style="color: #000000;">aStruct</span><span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">cDataType</span> == <span style="color: #ff0000;">'N'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">cEditPicture</span> &nbsp;:= NumPict<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">nDataLen</span>, :<span style="color: #000000;">nDataDec</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">return</span> oBrw<br />&nbsp;</div>[/code:1skskppk] In the above code, please substitute TArray with the name of your class. ::aStruct with the name of the DATA holding the structure ::aData with the name of the DATA holding the array data Note: I did not test the code. Please correct if there are any syntax errors. After adding this method you are ready to XBrowse your class just like any other browse.
xBrowse + OO Array
Mr Rao, thanks very much, with the two methods the array (OO) with xBrowse work well, in the first was necessary to add oBrw:setArray( oArray:aData ), without it, xbrowse shows more data that array has, and the navigation work bad, I think I need to review some method like EOF or skipper. regards Marcelo
xBrowse + OO Array
[quote="Marcelo Via Giglio":3sjbm9go]Mr Rao, thanks very much, with the two methods the array (OO) with xBrowse work well, in the first was necessary to add oBrw:setArray( oArray:aData ), without it, xbrowse shows more data that array has, and the navigation work bad, I think I need to review some method like EOF or skipper. regards Marcelo[/quote:3sjbm9go] 1) I have just posted a sample SetXBrowse() method calling SetArray() internally. We have done this because the internal data is an array. That may not the case in all kinds of classes. 2) It is possible to define a SetXBrowse() even in this case without calling SetArray() ( not using any XBrowse's native Set....() methods). Performance should be as good or as bad as the native navigation performance of the class. I shall post a sample later. You may start with SetXBrowse. Because that gives a quick start. But my advice is to follow the second method finally.
xBrowse + SQLRDD
Saludos a todos: Estoy Usando SQLRDD y MySQL, y tengo problemas con el xBrowse. Al elegir un elemento de la lista, ese elemento lo mueve al primero en la ventana asi que es algo molesto. La pregunta es que debo modificar para eleminar el ordkeyno() por Recno(), sin tener problemas con el Scrollbar del xBrowse. Ya que lo modifique de manera directa con : [code=fw:q3h2wndz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oxBrw:<span style="color: #000000;">bKeyNo</span>   = <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span> oxBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> Recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:q3h2wndz] Pero aqui tengo lios con el scrollbar, ya que pierdo la relacion entre la posicion de la barra y el registro actual.
xBrowse + SQLRDD
After creating the xBrowse as usual, please add these lines: [code=fw:3rcuyj57]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bKeyNo</span> := oBrw:<span style="color: #000000;">bBookMark</span><br />oBrw:<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> LastRec<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:3rcuyj57] Please let us know if xbrowse works well with these changes
xBrowse + SQLRDD
Rao, estoy usando xbrowse+tmysql y en mis grid siempre me agrega un registro al final en blanco y esto provoca extraños comportamientos con felcha arriba, flecha abajo asi tengo mi codigo oBrw2 := TXBrowse():New( oDlg ) oBrw2:SetMySql( oQry2, .F. ) probe agregando esto a xbrowse.prg para ver la cantidad de registros que lleva mi query: ? ::oMysql:LastRec(),::oMysql:RecCount() y si me muestra la cantidad de registros correctos agrego imagen: <!-- m --><a class="postlink" href="http://imageshack.us/photo/my-images/825/recblank.jpg/">http://imageshack.us/photo/my-images/825/recblank.jpg/</a><!-- m --> [url=http&#58;//imageshack&#46;us/photo/my-images/825/recblank&#46;jpg/:ewumrrfa][img:ewumrrfa]http&#58;//img825&#46;imageshack&#46;us/img825/2033/recblank&#46;th&#46;jpg[/img:ewumrrfa][/url:ewumrrfa] Uploaded with [url=http&#58;//imageshack&#46;us:ewumrrfa]ImageShack.us[/url:ewumrrfa] me trae vuelto loco, estoy usando tmysql de las contrib+fwh1103 gracias saludos paco
xBrowse + SQLRDD
Mr. Francis Please see <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=21888&p=116553#p116553">viewtopic.php?f=3&t=21888&p=116553#p116553</a><!-- l -->
xBrowse + SQLRDD
thanks, paco
xBrowse + SQLRDD
[quote="nageswaragunupudi":3if2tylu]After creating the xBrowse as usual, please add these lines: [code=fw:3if2tylu]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bKeyNo</span> := oBrw:<span style="color: #000000;">bBookMark</span><br />oBrw:<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> LastRec<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:3if2tylu] Please let us know if xbrowse works well with these changes[/quote:3if2tylu] Saludos Rao Hice las modificaciones y aun el SCrollbar, se desplaza aleatoriamente, trato de avanzar algunos registros y se mueve de arriba a abajo. Saludos
xBrowse + SetTree() + TDolphin
Gente; alguien que me pueda brindar un ejemplo sencillo. gracias
xBrowse + SetTree() + TDolphin
Esto es lo que hago, aunque me da error (seguramente porque no entiendo el concepto) [code=fw:r6lijaca]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #B900B9;">// Browse Obras</span><br />   oQryOb:= oConx:<span style="color: #000000;">SelectObras</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oTree := ::<span style="color: #000000;">MakeTree</span><span style="color: #000000;">&#40;</span> oQryOb <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrwOb COLUMNS <span style="color: #ff0000;">"desc_tipo"</span>,<span style="color: #ff0000;">"desc_obra"</span> OBJECT oQryOb <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">aoMn</span><span style="color: #000000;">&#91;</span>_OL2003<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">SIZE</span> ::<span style="color: #000000;">aoMn</span><span style="color: #000000;">&#91;</span>_OL2003<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-2</span>, <span style="color: #000000;">250</span> <span style="color: #0000ff;">PIXEL</span><br /><br />   oBrwOb:<span style="color: #000000;">SetTree</span><span style="color: #000000;">&#40;</span> oTree,                      ; <span style="color: #B900B9;">// Tree object</span><br />                   <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"OPEN"</span>,<span style="color: #ff0000;">"CLOSE"</span>,<span style="color: #ff0000;">"GREEN"</span> <span style="color: #000000;">&#125;</span>  <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// [Optional] Bitmap Resources Open, Close and NoChildren</span><br /><br />   ADD <span style="color: #0000ff;">TO</span> oBrwOb <span style="color: #00C800;">DATA</span> oBrwOb:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">Cargo</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />   ADD <span style="color: #0000ff;">TO</span> oBrwOb <span style="color: #00C800;">DATA</span> oBrwOb:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">Cargo</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br /><br />   WITH OBJECT oBrwOb<br />      :<span style="color: #000000;">lHScroll</span>:= <span style="color: #00C800;">FALSE</span><br /><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />...<br /><span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">METHOD</span> MakeTree<span style="color: #000000;">&#40;</span> oQryOb <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Menues<br />   <span style="color: #00C800;">local</span> oTree<br />   <span style="color: #00C800;">local</span> cState<br /><br />   oQryOb:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   TREE oTree<br />   <span style="color: #00C800;">while</span> !oQryOb:<span style="color: #000000;">Eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> oQryOb:<span style="color: #000000;">desc_tipo</span> == cState<br />         _TreeItem<span style="color: #000000;">&#40;</span> oQryOb:<span style="color: #000000;">desc_tipo</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">&#123;</span> oQryOb:<span style="color: #000000;">desc_obra</span> <span style="color: #000000;">&#125;</span><br />      <span style="color: #00C800;">else</span><br />         <span style="color: #00C800;">if</span> cState != <span style="color: #00C800;">nil</span><br />            ENDTREE<br />         <span style="color: #00C800;">endif</span><br />         _TreeItem<span style="color: #000000;">&#40;</span> oQryOb:<span style="color: #000000;">desc_tipo</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">&#123;</span> oQryOb:<span style="color: #000000;">desc_obra</span> <span style="color: #000000;">&#125;</span><br />         cState   := oQryOb:<span style="color: #000000;">desc_tipo</span><br />         TREE<br />      <span style="color: #00C800;">endif</span><br />      oQryOb:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">enddo</span><br />   ENDTREE<br />   ENDTREE<br />   oQryOb:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> oTree <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// Fin</span><br /> </div>[/code:r6lijaca] el error: [list:r6lijaca]Descripción de Error generado: ___________________________________________________ Error BASE/1005 Class: 'NIL' has no property: OPREV Args: [ 1] = U [ 2] = O TTREEITEM Llamadas al Stack: ___________________________________________________ Llamado desde: _OPREV(0) Llamado desde: .\source\classes\TREES.PRG TREEEND(72) Llamado desde: D:\Fuen32\SiGIC\CI2\Source\Menues.prg MENUES:MAKETREE(138) Llamado desde: D:\Fuen32\SiGIC\CI2\Source\Menues.prg MENUES:CREATEMENUPPL(63) Llamado desde: D:\Fuen32\SiGIC\CI2\Source\CtrlPpl.prg CONTROLADORPPL:CONCEPTOMENUES(56) Llamado desde: D:\Fuen32\SiGIC\CI2\Source\CI2_Main.prg (b)MGMAIN(36) Llamado desde: .\source\classes\WINDOW.PRG TWINDOW:ACTIVATE(973) Llamado desde: D:\Fuen32\SiGIC\CI2\Source\CI2_Main.prg MGMAIN(36) [/list:u:r6lijaca]
xBrowse + SetTree() + TDolphin
Hola Mario podrias colocarnos un ejemplo autocontenido que podamos construir para probar lo que estas haciendo... gracias
xBrowse + SetTree() + TDolphin
Mario aqui tienes un ejemplo funcional tomado de los samples de fivewin, donde cambio el uso de ADO por Dolphin [code=fw:15yfzrl6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oTest := TestTree<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oTest:<span style="color: #000000;">Run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">CLASS</span> TestTree<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> oWnd<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> oCon<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> oRs<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MainMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Run<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> TreeBrowse<span style="color: #000000;">&#40;</span>n<span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> MakeTree<span style="color: #000000;">&#40;</span>n<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> TDolphinGetTotals<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> TDolphinGetsummary<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> ConnectToDolphin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><br /><span style="color: #00C800;">METHOD</span> TestTree:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">MDI</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test Xbrowse"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span> ::<span style="color: #000000;">MainMenu</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Testing XBrowse"</span> <span style="color: #000000;">2010</span> &nbsp; <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><br /><span style="color: #00C800;">METHOD</span> TestTree:<span style="color: #000000;">Run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> TestTree:<span style="color: #000000;">MainMenu</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oMenu, oSelf := <span style="color: #00C800;">Self</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu <span style="color: #000000;">2010</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Tree Browse"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Method,1"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> oSelf:<span style="color: #000000;">TreeBrowse</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Method.2"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> oSelf:<span style="color: #000000;">TreeBrowse</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br /><br />&nbsp; &nbsp; &nbsp; oMenu:<span style="color: #000000;">AddMdi</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">RETURN</span> oMenu<br /><br /><span style="color: #00C800;">METHOD</span> TestTree:<span style="color: #000000;">TreeBrowse</span><span style="color: #000000;">&#40;</span> nMethod <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oTree, oItem, oBold, oBrw, oRs, oRsTot, oWnd<br /><br />&nbsp; &nbsp;oRs = ::<span style="color: #000000;">TDolphinGetsummary</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;oTree = ::<span style="color: #000000;">MakeTree</span><span style="color: #000000;">&#40;</span> oRs, nMethod <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oItem = oTree:<span style="color: #000000;">oFirst</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #B900B9;">// Setup Browse</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span> BOLD<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oWnd</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nMethod == <span style="color: #000000;">1</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Tree Browse with data"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Tree Browse with data from Linked Recordset"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd LINES CELL<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nMethod == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">SetTree</span><span style="color: #000000;">&#40;</span> oTree, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; <span style="color: #B900B9;">// Tree object</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"OPEN"</span>,<span style="color: #ff0000;">"CLOSE"</span>,<span style="color: #ff0000;">"GREEN"</span> <span style="color: #000000;">&#125;</span> &nbsp;<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// [Optional] Bitmap Resources Open, Close and NoChildren</span><br /><br />&nbsp; &nbsp; &nbsp; ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">Cargo</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999"</span> HEADER <span style="color: #ff0000;">"Employees"</span><br />&nbsp; &nbsp; &nbsp; ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">Cargo</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999,999,999.99"</span> HEADER <span style="color: #ff0000;">"TotSalary"</span><br />&nbsp; &nbsp; &nbsp; ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">Cargo</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> / oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">Cargo</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999,999,999.99"</span> HEADER <span style="color: #ff0000;">"AvgSalary"</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">SetTree</span><span style="color: #000000;">&#40;</span> oTree, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; <span style="color: #B900B9;">// Tree object</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"OPEN"</span>,<span style="color: #ff0000;">"CLOSE"</span>,<span style="color: #ff0000;">"GREEN"</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// [Optional] Bitmap Resources Open, Close and NoChildren</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | OItem | oRs:<span style="color: #000000;">nRecNo</span> := oItem:<span style="color: #000000;">Cargo</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// To Sync DataSource with oItem</span><br /><br />&nbsp; &nbsp; &nbsp;ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">employees</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999"</span> HEADER <span style="color: #ff0000;">"Employees"</span><br />&nbsp; &nbsp; &nbsp;ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">totSalary</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999,999,999.99"</span> HEADER <span style="color: #ff0000;">"TotSalary"</span><br />&nbsp; &nbsp; &nbsp;ADD <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">totSalary</span> / oRs:<span style="color: #000000;">employees</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999,999,999.99"</span> HEADER <span style="color: #ff0000;">"AvgSalary"</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"State / City"</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// If different fonts are required on the basis of oItem:nLevel</span><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |oCol| oCol:<span style="color: #000000;">oDataFont</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">oTreeItem</span>:<span style="color: #000000;">nLevel</span> == <span style="color: #000000;">1</span>, oBold, oBrw:<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Get Totals for footers</span><br />&nbsp; &nbsp;oRsTot &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= ::<span style="color: #000000;">TDolphinGetTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Set Totals in Footers</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">lFooter</span> &nbsp; &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cFooter</span> := <span style="color: #ff0000;">"Total"</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cFooter</span> := oRsTot:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cFooter</span> := oRsTot:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cFooter</span> := oRsTot:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> / oRsTot:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oRsTot:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// note: cFooter can be of any data type. If cFooter is not Character,</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// the value will be formatted using column's picture</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// cFooter can be a codeblock also</span><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |oCol| oCol:<span style="color: #000000;">oFooterFont</span> := oBold <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">createFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> := obrw<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Create ButtonBar</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//BtnBar( oBrw ) &nbsp; &nbsp;// Commn ButtonBar for all sample Browses</span><br /><br /><span style="color: #B900B9;">// &nbsp; DEFINE BUTTON OF oWnd:oBar ;</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;RESOURCE "EXPAND" TOP PROMPT "Expand ALL" ;</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;ACTION ( oBrw:oTree:Expand(), oBrw:Refresh(), oBrw:SetFocus() )</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// &nbsp; DEFINE BUTTON OF oWnd:oBar ;</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;RESOURCE "COLLAPS" TOP PROMPT "Collapse ALL" ;</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;ACTION ( oBrw:oTree:Collapse(), oBrw:Refresh(), oBrw:SetFocus() )</span><br /><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> oWnd:<span style="color: #000000;">cCaption</span> <span style="color: #000000;">2007</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span>oRs:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .T.<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">METHOD</span> TestTree:<span style="color: #000000;">TDolphinGetsummary</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oRs, csql<br /><br />&nbsp; &nbsp;cSql := ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"SELECT state,city, COUNT(*) AS EMPLOYEES, SUM(salary) AS totsalary "</span> + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"FROM customer "</span> + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"GROUP BY state, city "</span> + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"UNION ALL "</span> + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"SELECT state, '' AS city, employees, totsalary FROM "</span> + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"(SELECT state, COUNT(*) AS employees, SUM(salary) AS totsalary "</span> + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"FROM customer "</span> + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"GROUP BY state ) t_b2 "</span> + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"ORDER BY state, city "</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oCon</span> == <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oCon</span> = ::<span style="color: #000000;">ConnectToDolphin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ! ::<span style="color: #000000;">oCon</span>:<span style="color: #000000;">lError</span><br />&nbsp; &nbsp; &nbsp; oRs = ::<span style="color: #000000;">oCon</span>:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oCon</span>:<span style="color: #000000;">lError</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Access Table Open Failure'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Access Connect Fail"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> oRs<br /><br /><span style="color: #00C800;">METHOD</span> TestTree:<span style="color: #000000;">ConnectToDolphin</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oCon<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cHost := <span style="color: #ff0000;">"dolphintest.sitasoft.net"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cUser := <span style="color: #ff0000;">"test_dolphin"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cPass := <span style="color: #ff0000;">"123456"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cDB &nbsp; := <span style="color: #ff0000;">"dolphin_man"</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oCon = TDolphinSrv<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cHost, cUser, cPass, , , cDB <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> oCon<br /><br /><br /><br /><span style="color: #00C800;">METHOD</span> TestTree:<span style="color: #000000;">MakeTree</span><span style="color: #000000;">&#40;</span> oRs, nMethod <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oTree<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cState<br /><br />&nbsp; &nbsp;oRs:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;TREE oTree<br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> !oRs:<span style="color: #000000;">Eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oRs:<span style="color: #000000;">state</span> == cState<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> nMethod == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _TreeItem<span style="color: #000000;">&#40;</span> oRs:<span style="color: #000000;">city</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Cargo</span> := ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> oRs:<span style="color: #000000;">employees</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRs:<span style="color: #000000;">totSalary</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _TreeItem<span style="color: #000000;">&#40;</span> Trim<span style="color: #000000;">&#40;</span> oRs:<span style="color: #000000;">city</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Cargo</span> := oRs:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> cState != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDTREE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> nMethod == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _TreeItem<span style="color: #000000;">&#40;</span> oRs:<span style="color: #000000;">state</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Cargo</span> := ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> oRs:<span style="color: #000000;">employees</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRs:<span style="color: #000000;">totSalary</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _TreeItem<span style="color: #000000;">&#40;</span> oRs:<span style="color: #000000;">state</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Cargo</span> := oRs:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cState &nbsp; := oRs:<span style="color: #000000;">state</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TREE<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; oRs:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp;ENDTREE<br />&nbsp; &nbsp;ENDTREE<br />&nbsp; &nbsp;oRs:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> oTree<br /><br /><span style="color: #00C800;">METHOD</span> TestTree:<span style="color: #000000;">TDolphinGetTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oRs, csql<br /><br />&nbsp; &nbsp;cSql := ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"SELECT COUNT(*) AS employees, SUM(salary) AS totsalary FROM customer"</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ! ::<span style="color: #000000;">oCon</span>:<span style="color: #000000;">lError</span><br />&nbsp; &nbsp; &nbsp; oRs = ::<span style="color: #000000;">oCon</span>:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oCon</span>:<span style="color: #000000;">lError</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Access Table Open Failure'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Access Connect Fail"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">return</span> oRs<br />&nbsp;</div>[/code:15yfzrl6]
xBrowse + SetTree() + TDolphin
Daniel; muchas gracias! (justo estaba rehaciendo un sample con la DATABASE Tdolphin) Lo pruebo... (bue... no tengo dudas que que ahora si funcionará) Saludos
xBrowse + TDOLPHIN
Ao clicar em um HEADER do xBrowse por ordem numérica e pressionar teclas ALFABÉTICAS, ocorre um erro de GPF. Resolvido assim: static FUNCTION DolphinSeek( c, oBrw, cQryWhere ) --->ERRO lRet := ( oQry:Seek( c, cSortOrder, nStart - 1, oQry:LastRec(), .T., .T. ) != 0 ) --->OK lRet := ( oQry:Seek( c, cSortOrder, nStart, oQry:LastRec(), .T., .T. ) != 0 )
xBrowse + TDOLPHIN
Entonces con ese cambio te funciona bien, si ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse + TDOLPHIN
Sim, com esta correção funciona bem para mim...
xBrowse + TDolphin + caracteres chinos(?)
Estimados; gracias por la paciencia. Estoy retomando con mis proyectos con RDBMS MariaDB y voy tropezando de seguido <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Muestro un browse que inicialmente se importa de un archivo Excel [img:2icdrgol]http&#58;//i795&#46;photobucket&#46;com/albums/yy237/MLimonG/charset&#46;png[/img:2icdrgol] Como pueden ver en la columna Tutor2, filas segunda y séptima aparecen los caracteres que no corresponden al idioma Si edito, el GET los muestra correctamente y, si le quito una letra o parte y guardo se observa correctamente. Si vuelvo a escribir como estaba, se vuelve a ver con los caracteres extraños [img:2icdrgol]http&#58;//i795&#46;photobucket&#46;com/albums/yy237/MLimonG/charset2&#46;png[/img:2icdrgol] El séptimo renglón tiene un nombre acentuado (Í), si se lo cambio y guardo, se muestra correctamente y si vuelvo al estado anterior se muestra con los caract. exraños Mi codigo en init procedure es: [code=fw:2icdrgol]<div class="fw" id="{CB}" style="font-family: monospace;">   HB_LangSelect<span style="color: #000000;">&#40;</span>  <span style="color: #ff0000;">"ESWIN"</span> <span style="color: #000000;">&#41;</span><br />   HB_SetCodePage<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ESWIN"</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:2icdrgol] y la Database la creo así (con TDolphin) [code=fw:2icdrgol]<div class="fw" id="{CB}" style="font-family: monospace;">:<span style="color: #000000;">DBCreate</span><span style="color: #000000;">&#40;</span> shIni<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"MARIADB"</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"database"</span><span style="color: #000000;">&#93;</span>,, <span style="color: #ff0000;">"utf8"</span>, <span style="color: #ff0000;">"utf8_spanish_ci"</span> <span style="color: #000000;">&#41;</span></div>[/code:2icdrgol] Recorriendo la tabla son los 2 únicos registros que se ven así. Alguna pista?
xBrowse + TDolphin + caracteres chinos(?)
Did you include FW_SetUnicode( .t. ) at the beginning of the application?
xBrowse + TDolphin + caracteres chinos(?)
Mr. Rao Many thank for your response I include the function, but in the browse, both registers show it wrong like berfore
xBrowse + TDolphin + caracteres chinos(?)
Mario, un par de preguntas El fichero ha sido convertido de Excel a MariaDB y el Borwse muestra la base de datos ya en formato MySql?, o el browse muestra el fichero aun de Excel?
xBrowse + TDolphin + caracteres chinos(?)
Carlos El Browse muestra los datos de la tabla, respectiva, MariaDB(MySQL)
xBrowse + TDolphin + caracteres chinos(?)
Before we try to help you, I want to tell you that I could successfully work with Unicode (UTF8) databases and tables with MySql using ADO and xHarbour. XBrowse, Gets and saving data all works correctly. I did not test with Dolphin.
xBrowse + TDolphin + caracteres chinos(?)
Thanks again Is strange, becouse only 2 registers than 525 imported, are bad. the registers haven't characters strange: BARBETTI IVANA ARACELI FERREYRA MARÍA ALEJANDRA If I look whith HeidiSQL, they show good (sorry for my Google english <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->)
xBrowse + TDolphin + caracteres chinos(?)
[quote="MarioG":23quyy5i]Carlos El Browse muestra los datos de la tabla, respectiva, MariaDB(MySQL)[/quote:23quyy5i] Mario, mi nombre es Cristobal <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Veo que un registro lleva acento, es asi? Hay más registros que llevan acentos y que se ven bien? Saludos
xBrowse + TDolphin + caracteres chinos(?)
<!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> eso me pasa por, viejo olvidadizo y presuponer! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Si Cristobal Probé cambiarle a sin acento y se vé correctamente... aunque,otros registros como: BENAMÚ WALTER JOSE IÑIGUEZ MARIA ANTONIETA GONZALEZ SERGIO HÉCTOR Se ven correctamente Voy a probar agregarlos desde la aplic. a ver que sucede
xBrowse + TDolphin + caracteres chinos(?)
Gran descubrimiento gran (porque tengo otra tabla de Apellidos y nombres) y en esta tabla aparecen mas registros con formato extraño Todos los que tienen Í aparecen con formato extraño Hasta ahora otras acentuadas y Ñ se ven de forma correcta Ahora tendría que investigar que otra letra afecta (hablando del otro registro que no tiene ninguna acentuada) seguimos investigando...
xBrowse + TDolphin + caracteres chinos(?)
Me retracto <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> Algunos con [b:1e9lv6nb]Í[/b:1e9lv6nb] se ven correctos y encontré otro con [b:1e9lv6nb]Á[/b:1e9lv6nb] que no se ve correctamente
xBrowse + TDolphin EDIT_GET_LISTBOX
Hi , Want to do column editing with listbox . Values in array ~ 800 ... So I tried that : WITH OBJECT oCol :bEditValue := { || oQry:preke } :nEditType := if( lEdt, EDIT_GET_LISTBOX, EDIT_NONE ) :aEditListTxt := aMod END Sorry , but trying to open listbox , app hangs ... How can this be solved ? Fwh 11.11 , Harbour 3.1 MinGW
xBrowse + TDolphin EDIT_GET_LISTBOX
You may use EDIT_LISTBOX for smaller arrays. For the kind of arrays having 800 elements etc you may better use an external function to select with EDIT_BUTTON functionality.
xBrowse + TDolphin EDIT_GET_LISTBOX
[quote="nageswaragunupudi":1y67l5cp]You may use EDIT_LISTBOX for smaller arrays. For the kind of arrays having 800 elements etc you may better use an external function to select with EDIT_BUTTON functionality.[/quote:1y67l5cp] OK , understand ... Thanks !
xBrowse + TDolphin EDIT_GET_LISTBOX
[quote="Rimantas":1mnxmmmf][quote="nageswaragunupudi":1mnxmmmf]You may use EDIT_LISTBOX for smaller arrays. For the kind of arrays having 800 elements etc you may better use an external function to select with EDIT_BUTTON functionality.[/quote:1mnxmmmf] OK , understand ... Thanks ![/quote:1mnxmmmf] Changed EDIT_LISTBOX with EDIT_BUTTON ... [code=fw:1mnxmmmf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />WITH OBJECT oCol<br />&nbsp; &nbsp;:<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || oQry:<span style="color: #000000;">preke</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; &nbsp; := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lEdt, EDIT_BUTTON, EDIT_NONE <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">bEditBlock</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> | nRow, nCol, oCol | oCol:<span style="color: #000000;">Value</span> := brw_arr<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Choose!"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Item"</span>, <span style="color: #ff0000;">"Item name"</span> <span style="color: #000000;">&#125;</span>, aMod, oWnd <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// mine function of array , which will return value </span><br />&nbsp; &nbsp;:<span style="color: #000000;">bOnPostEdit</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> | oCol, xVal, nKey | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nKey == VK_RETURN .and. ascan<span style="color: #000000;">&#40;</span> aMod, <span style="color: #000000;">&#123;</span> |x| x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == xVal <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <> <span style="color: #000000;">0</span>, <span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">cExpr</span>, xVal <span style="color: #000000;">&#41;</span>, oQry:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// 104 line </span><br />END<br />&nbsp;</div>[/code:1mnxmmmf] Now building app. I'm getting error : uzs.prg(104) Error E0005 Outer codeblock variable 'XVAL' is out of reach . The same xVal in other bOnPostEdit works without problem . :bOnPostEdit := { | oCol, xVal, nKey | if( nKey == VK_RETURN, ( oQry:FieldPut( oCol:cExpr, xVal ), oQry:Save() ), ) } To what that related ?
xBrowse + TDolphin EDIT_GET_LISTBOX
[quote:11bwwpi1]Error E0005 Outer codeblock variable 'XVAL' is out of reach [/quote:11bwwpi1] Yes. We can not use the parameter of the main codeblock inside another codeblock used within the main codeblock. We need to create a function for that.
xBrowse + TDolphin EDIT_GET_LISTBOX
[quote="nageswaragunupudi":34m1xwp7][quote:34m1xwp7]Error E0005 Outer codeblock variable 'XVAL' is out of reach [/quote:34m1xwp7] Yes. We can not use the parameter of the main codeblock inside another codeblock used within the main codeblock. We need to create a function for that.[/quote:34m1xwp7] Thanks , Rao ! Understand ...
xBrowse + TDolphin EDIT_GET_LISTBOX
[quote="Rimantas":2xqlxsb6][quote="nageswaragunupudi":2xqlxsb6][quote:2xqlxsb6]Error E0005 Outer codeblock variable 'XVAL' is out of reach [/quote:2xqlxsb6] Yes. We can not use the parameter of the main codeblock inside another codeblock used within the main codeblock. We need to create a function for that.[/quote:2xqlxsb6] Thanks , Rao ! Understand ...[/quote:2xqlxsb6] Hello Rao ! Can you help also ? I redid this place with EDIT_GET_BUTTON : [code=fw:2xqlxsb6]<div class="fw" id="{CB}" style="font-family: monospace;"><br />WITH OBJECT oCol<br />&nbsp; &nbsp;:<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || oQry:<span style="color: #000000;">preke</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; &nbsp; := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lEdt, EDIT_GET_BUTTON, EDIT_NONE <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">bEditBlock</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> | nRow, nCol, oCol | uVal := brw_arr<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Choose!"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Model"</span>, <span style="color: #ff0000;">"Description"</span> <span style="color: #000000;">&#125;</span>, aMod, oCol:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> !empty<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span> .and. uVal <> oCol:<span style="color: #000000;">Value</span>, oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">cExpr</span>, uVal <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;:<span style="color: #000000;">bOnPostEdit</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span> | oCol, xVal, nKey | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> mod_pas<span style="color: #000000;">&#40;</span> aMod, xVal <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">cExpr</span>, xVal <span style="color: #000000;">&#41;</span>, oQry:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />END<br />&nbsp;</div>[/code:2xqlxsb6] Edit block get new value , which return from mine function brw_arr() . But it not run bOnPostEdit . I must to press Enter if want to save . How to run bOnPostEdit after when bEditBlock get new value ?
xBrowse + TDolphin EDIT_GET_LISTBOX
[code=fw:239ly795]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oCol<br />   :<span style="color: #000000;">bEditValue</span>      := <span style="color: #000000;">&#123;</span> || oQry:<span style="color: #000000;">preke</span> <span style="color: #000000;">&#125;</span><br />   :<span style="color: #000000;">bEditWhen</span>       := <span style="color: #000000;">&#123;</span> || lEdt <span style="color: #000000;">&#125;</span><br />   :<span style="color: #000000;">nEditType</span>       := EDIT_GET_BUTTON<br />   :<span style="color: #000000;">bEditBlock</span>      := <span style="color: #000000;">&#123;</span> | nRow, nCol, oCol | brw_arr<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Choose!"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Model"</span>, <span style="color: #ff0000;">"Description"</span> <span style="color: #000000;">&#125;</span>, aMod, oCol:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#41;</span><br />   :<span style="color: #000000;">bOnPostEdit</span>     := <span style="color: #000000;">&#123;</span> | oCol, xVal, nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_ESCAPE,,<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">preke</span> := xVal, oQry:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />END<br /> </div>[/code:239ly795] The function brw_arr(...) should return - the selected Model code if the user selects a model - or should return NIL if the user aborts the selection. If bEditBlock returns NIL, xbrowse does not take any action. If bEditBlock returns a Non Nil value, xbrowse evaluates bOnPostEdit with the retuned value.
xBrowse + TDolphin EDIT_GET_LISTBOX
[quote="nageswaragunupudi":2rh0nvp2][code=fw:2rh0nvp2]<div class="fw" id="{CB}" style="font-family: monospace;">WITH OBJECT oCol<br />   :<span style="color: #000000;">bEditValue</span>      := <span style="color: #000000;">&#123;</span> || oQry:<span style="color: #000000;">preke</span> <span style="color: #000000;">&#125;</span><br />   :<span style="color: #000000;">bEditWhen</span>       := <span style="color: #000000;">&#123;</span> || lEdt <span style="color: #000000;">&#125;</span><br />   :<span style="color: #000000;">nEditType</span>       := EDIT_GET_BUTTON<br />   :<span style="color: #000000;">bEditBlock</span>      := <span style="color: #000000;">&#123;</span> | nRow, nCol, oCol | brw_arr<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Choose!"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Model"</span>, <span style="color: #ff0000;">"Description"</span> <span style="color: #000000;">&#125;</span>, aMod, oCol:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#41;</span><br />   :<span style="color: #000000;">bOnPostEdit</span>     := <span style="color: #000000;">&#123;</span> | oCol, xVal, nKey | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nKey == VK_ESCAPE,,<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">preke</span> := xVal, oQry:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />END<br /> </div>[/code:2rh0nvp2] The function brw_arr(...) should return - the selected Model code if the user selects a model - or should return NIL if the user aborts the selection. If bEditBlock returns NIL, xbrowse does not take any action. If bEditBlock returns a Non Nil value, xbrowse evaluates bOnPostEdit with the retuned value.[/quote:2rh0nvp2] Works very fine now ! Many thanks to you, Rao ! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xBrowse + TMySQL
nuevamente. ahora tratando de migrar de dbf a sql, algun colega por aqui que me ayudara con un pequeño ejemplo de un query sobre un xbrowse y su busqueda incremental? gracias paco
xBrowse + TMySQL
Mira el blog de William SQLCMD. Te será de gran ayuda. Yo aún no intento el paso a TMySql. Saludos.
xBrowse + TMySQL
FranciscoA, El blog es <!-- m --><a class="postlink" href="http://wmormar.blogspot.com">http://wmormar.blogspot.com</a><!-- m -->
xBrowse + TMySQL
Si uasa la clase Tdolphin , sera como usar database, te lo digo por experiencia que conozco muy poco de MYSQL, con ayuda de un colega y la clase TDP fue muy facil, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
xBrowse + TMySQL
Amigo con esto es para la busqueda FUNCTION PlisBuscar(nKey,oDatos,oTabla,oOrden,oLbx,cbusca,cSelect) *----------------------------------------------------- Local cQuery,campo DEFAULT cSelect := "*" If nKey=8 cbusca:= SubStr(cbusca,1,Len(cbusca)-1) cQuery:="SELECT "+ cSelect + " FROM "+oTabla+" WHERE "+oOrden+" LIKE '"+UPPER(cBusca)+"%' ORDER BY "+oOrden+" LIMIT 300" oDatos:=oServer:Query(cQuery,.T.) Else cbusca :=cbusca + Upper(chr(nkey)) cQuery:="SELECT "+ cSelect +" FROM "+oTabla+" WHERE "+oOrden+" LIKE '"+UPPER(cBusca)+"%' ORDER BY "+oOrden+" LIMIT 300" oDatos:=oServer:Query(cQuery,.T.) If oDatos:Reccount() == 0 cbusca:=left(cbusca,len(cbusca)-1) cQuery:="SELECT "+ cSelect +" FROM "+oTabla+" WHERE "+oOrden+" LIKE '"+UPPER(cBusca)+"%' ORDER BY "+oOrden+" LIMIT 300" oDatos:=oServer:Query(cQuery,.T.) Endif Endif Setxbrowse(oLbx, oDatos ) // importante para la navegacion oDatos:Refresh() oLbx:Refresh(.t.) oLbx:SetFocus() oDatos:GOTOP() return .t. Saludos
xBrowse + TMySQL
William, I'm sorry. Jose Luis, revisa tu email. Saludos a ambos.
xBrowse + TMySQL
probare suerte gracias a todos saludos paco
xBrowse + Tree sample does not work.
Hi Mr. Rao, I can't run the example you sent in the previous topics in the forum. I compiled this example using buildh32.bat in the example directory. . When I press the "Tree" button, the application exits without any errors. (fwh 23.04 + Harbour + msvc ) Can you please help? Thanks. [code=fw:11i34pug]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />   TestTree2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> TestTree2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oFont, oBrw<br />   <span style="color: #00C800;">local</span> aData, aTotal<br />   <span style="color: #00C800;">local</span> aCols := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"1 AS State"</span>, <span style="color: #ff0000;">"2 AS City"</span>, <span style="color: #ff0000;">"3 AS Street"</span>, <span style="color: #ff0000;">"4 AS Age"</span>, <span style="color: #ff0000;">"5 AS Salary"</span> <span style="color: #000000;">&#125;</span><br /><br />   USE CUSTOMER <span style="color: #00C800;">NEW</span><br />   aData    := FW_DbfToArray<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"STATE,TRIM(CITY),TRIM(STREET),AGE,SALARY"</span> <span style="color: #000000;">&#41;</span><br />   CLOSE CUSTOMER<br />   aData    := FW_ArrGroupSum<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">1</span>, , <span style="color: #000000;">&#123;</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   ASORT<span style="color: #000000;">&#40;</span> aData, , , <span style="color: #000000;">&#123;</span> |x,y| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == y<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> < y<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> < y<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   aTotal   := aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />   ADel<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">1</span>, .t. <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">60</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      DATASOURCE aData COLUMNS aCols ;<br />      CELL LINES NOBORDER FOOTERS<br /><br />   oBrw:<span style="color: #000000;">cFooters</span> := aTotal<br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TREE"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">WHEN</span> oBrw:<span style="color: #000000;">nDataType</span> == DATATYPE_ARRAY ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">SetTree</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, <span style="color: #000000;">&#123;</span> 0x30082, 0x30084, 0x20097 <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"ARRAY"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">WHEN</span> oBrw:<span style="color: #000000;">nDataType</span> != DATATYPE_ARRAY ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aData, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, aCols <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">cFooters</span> := aTotal <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:11i34pug] changed : "Tree" instead of "Array".
xBrowse + Tree sample does not work.
Hi, Can anyone compile the above code and run it without errors? Thanks.
xBrowse + Tree sample does not work.
The above program is a part of fwh\samples\xbrtree.prg This was working till FWH2102 but failing in later versions, We are looking into this. Please give us a little more time.
xBrowse + Tree sample does not work.
[quote="nageswaragunupudi":10x428lr]The above program is a part of fwh\samples\xbrtree.prg This was working till FWH2102 but failing in later versions, We are looking into this. Please give us a little more time.[/quote:10x428lr] Ok. thank you.
xBrowse + Tree sample does not work.
This is fixed in FWH2307, soon to be released. We can also make it work with the following fix to METHOD SetTree(...) in XBrowse.prg 1) Please locate this line in METHOD SetTree(...) and delete or comment out this line: [code=fw:2m0hdrv7]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; ::<span style="color: #000000;">bOnSkip</span> &nbsp; := bOnSkip<br />&nbsp;</div>[/code:2m0hdrv7] 2) Replace all occurrences of "::bOnSkip" with "bOnSkip" in the METHOD SetTree(...) Note: Only in this method Then build and run fwh\samples\xbrtree.prg
xBrowse + Tree sample does not work.
not only should xbrowse do it automatically but the settree() should set the field (of the array or db) to do the grouping, maybe selecting it from a combobox "normal", "tree" and also make the search work with [b:ryc0i33t]GET oGet VAR cSeek[/b:ryc0i33t] and [b:ryc0i33t]COMBOBOX oBrw:oSortCbx[/b:ryc0i33t] example in [b:ryc0i33t]customer.dbf[/b:ryc0i33t] field : [b:ryc0i33t]state[/b:ryc0i33t], [b:ryc0i33t]city[/b:ryc0i33t]
xBrowse + Tree sample does not work.
The new fwh 23.07 release resolved the first problem but I not understood how male the search Run as xbrowse search ( with get and combobox)
xBrowse + bBarGetValid
Hi Friends, Do you know how [b:1fr10ems]bBarGetValid[/b:1fr10ems] works ? I tried by the way bellow, but valid clausule is not performed. [code=fw:1fr10ems]<div class="fw" id="{CB}" style="font-family: monospace;"><br />    oCol:= oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />    oCol:<span style="color: #000000;">uBarGetVal</span>   := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />    oCol:<span style="color: #000000;">cBarGetPic</span>   := <span style="color: #ff0000;">"@!"</span><br />    oCol:<span style="color: #000000;">bBarGetValid</span> := <span style="color: #000000;">&#123;</span>|x| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>x<span style="color: #000000;">&#41;</span>, .t.<span style="color: #000000;">&#125;</span><br /> </div>[/code:1fr10ems]
xBrowse + bBarGetValid
bBarGetValid is not working as of now.
xBrowse + bBarGetValid
Mr Rao, But will you fix it ?
xBrowse - change columns dynamically
How can I change change columns dynamically in xBrowse Thanks in advance Otto
xBrowse - change columns dynamically
Otto: Can you elaborate about what you want to do? Randal
xBrowse - change columns dynamically
Hello Randal, I would like to change between these 2 views: [img:lwh0ye4q]http&#58;//www&#46;atzwanger-software&#46;com/fw/xclip1&#46;jpg[/img:lwh0ye4q] [img:lwh0ye4q]http&#58;//www&#46;atzwanger-software&#46;com/fw/xclip2&#46;jpg[/img:lwh0ye4q] Thanks in advance Otto