Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6510

Re: bBrowser 4 Vs bBrowser 1.5 (Illegal reference)

From "Gerhard Bunzel" <g.bunzel@domonet.de>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: bBrowser 4 Vs bBrowser 1.5 (Illegal reference)
Date 2014-01-16 10:39 +0100
Organization (posted via) M-net Telekommunikations GmbH
Message-ID <lb89af$op4$1@news.m-online.net> (permalink)
References <2c4ac06b-b9e0-418f-bdaa-0f4928080443@googlegroups.com>

Show all headers | View raw


Jonathan,

is xNAME for your filter a LOCAL?

>self:oDCbBHireListing:Server:filter:= {|| xNAME $ Upper(REFerence)}


Try to set your filter as a string:
cFilter := '"' + xNAME + '" $ UPPER(REFERENCE)'

self:oDCbBHireListing:Server:filter:= cFilter


HTH

Gerhard Bunzel



<jonhn@iconz.co.nz> schrieb im Newsbeitrag 
news:2c4ac06b-b9e0-418f-bdaa-0f4928080443@googlegroups.com...
Having some trouble migrating my app to VO2.8 SP4b - been stuck on this one 
for 14 days now.

I have a couple of "lookup" windows where the user can filter their view of 
a  database by typing a few characters into an SLE until they see the item 
in the list the want to select. For example a customer list.

This is one of the statements I use (all pretty standard stuff) 
SELF:SubServer:filter:= {|| xNAME $ Upper(Reference)}


Now, here's the thing - This has worked perfectly for about 10 years through 
VO 2.5, 2.6, 2.7b using bBrowser 1.4 and 1.5 I have just bought VO2.8 SP4b 
and bBrowser 4 and I am now getting the Illegal Reference error whenever the 
filtered list is clicked on.  No error if no filter is set.


I have read the posts and warnings about using a codeblock to set a filter 
but have been unable to get a string filter to work properly, and with the 
following evidence, I wonder if it is a mistake I have made elsewhere, or 
something I have inadvertently skipped in moving from 2.7b to 2.8b4 
Alternatively, how should that code block be expressed as a string? I have 
tried every iteration and combination I can think of to no avail so I can't 
be sure it is my block going out of scope causing my error.


How should this filter be expressed as a string, if that is the only way to 
fix this?
I have tried every combination I can think of but I can't set the filter as 
a string no matter what I try.


I use exactly the same method in 2 places for different lists- one of them 
works fine, the other not.

If the list is filtered to the point that one or two (max 2) records are 
visible, you can click on them without the error.

With filtered list showing 3+ records if you press Cancel a number of times 
the clicked record eventually shows selected, and then you can double-click 
to select THAT record without further errors.
If you click another item in the filtered list you then have to click 
"cancel" however many times until the new record is shown selected.
(The number of times you have to press Cancel is closely related to the 
number of records visible - this makes me think there is something being 
called in the bBrowser that I can perhaps avoid.

The filter works fine - it is just during the process of the browser moving 
to the selected record the error is thrown up.

Some of the relevant code is below, but AFAIK it is all standard bBrowser 
setup syntax.


The filter is set with this:
xNAME:=Upper(AllTrim(self:oDCSLEReference:TextValue))
self:oDCbBHireListing:Server:filter:= {|| xNAME $ Upper(REFerence)}



The bBrowser is set up with this:

SELF:oDCbBHireListing:use( DBIndex,{#INvno , #Acctname, #firstname, 
#INvdate, #Retdate, #Ordnumber, #Showname, #TOtal, #Deposit, #Delivery, 
#LONGterm, #Filetype, #SalesName, #REFERENCE   } )


aoColumn := SELF:oDCbBHireListing:ColumnList
iSize := ALen(aoColumn)
iPos:=1
DO WHILE iPos< iSize+1
DO CASE
   CASE iPos == 1
       aoColumn[iPos]:Caption :=  "Hire No"
       aoColumn[iPos]:Width   :=  45
       aoColumn[iPos]:CaptionView:= oStyleNormal
   CASE iPos == 2
       aoColumn[iPos]:Caption :=  "Acct Name"
       aoColumn[iPos]:Width   :=  120
       aoColumn[iPos]:CaptionView:= oStyleSort
           CASE iPos == 3
       aoColumn[iPos]:Caption :=  "Ctc Name"
       aoColumn[iPos]:Width   :=  60
       aoColumn[iPos]:CaptionView:= oStyleNormal
           CASE iPos == 4

<snipped due to repetition>

  CASE iPos == 14
       aoColumn[iPos]:Caption :=  "REF"
       aoColumn[iPos]:Width   :=  60
       aoColumn[iPos]:CaptionView:= oStyleNormal


          ENDCASE
       iPos++
ENDDO

    SELF:oDCbBHireListing:Editable    := FALSE
    SELF:oDCbBHireListing:CurrentMode := #Line
    SELF:oDCbBHireListing:EnableSelector(FALSE)
    SELF:oDCbBHireListing:AutoEdit    := FALSE
    SELF:oDCbBHireListing:EnableCaptionClick(TRUE)
    SELF:oDCbBHireListing:ViewLogicAs := #Check
    SELF:oDCbBHireListing:SelectionMode := #Multiple



       oColorCondition := bColorCondition{ "Server:retdate<today()",;
                              DBIndex,;
                             Color{255,6,13}}
       SELF:oDCbBHireListing:ColorCondition:Add(oColorCondition)


Thanks for any suggestions in advance!

Kind regards,
Jonathan 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

bBrowser 4 Vs bBrowser 1.5  (Illegal reference) jonhn@iconz.co.nz - 2014-01-10 23:08 -0800
  Re: bBrowser 4 Vs bBrowser 1.5  (Illegal reference) "Jamal" <someone@example.com> - 2014-01-14 18:28 -0500
    Re: bBrowser 4 Vs bBrowser 1.5  (Illegal reference) jonhn@iconz.co.nz - 2014-01-14 23:19 -0800
      Re: bBrowser 4 Vs bBrowser 1.5  (Illegal reference) "Jamal" <someone@example.com> - 2014-01-15 14:08 -0500
  Re: bBrowser 4 Vs bBrowser 1.5  (Illegal reference) "Gerhard Bunzel" <g.bunzel@domonet.de> - 2014-01-16 10:39 +0100
    Re: bBrowser 4 Vs bBrowser 1.5  (Illegal reference) jonhn@iconz.co.nz - 2014-01-24 21:01 -0800

csiph-web