Minor problem with bBrowser Column headings

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
BiggyRat

Minor problem with bBrowser Column headings

Post by BiggyRat »

Thanks very much Johan, that's awesome. I didn't know it was that easy. Thank you again.
IT may not be rocket science to you guys, but I'm self taught and solo and relying on you guys,
Google and the VO help and manuals. For someone basically 100% self taught I think I've done pretty well,
especially as this is only my 4th major program in VO in 20+ years.

That's why my grasp of somethings people here think are obvious, aren't even on the spectrum for me.

I WAS an excellent Clipper programmer, as I understood DOS etc better than a lot of people. I just haven't had the money, time and opportunity to do more with VO, though I'd love to. I'm really looking forward to using X# once the DBFCDX driver is available, but I fear my learning curve will be slow enough without changing the driver type I've been using for 30+ years (MDX, CDX via the SiX Driver in Clipper, DBFCDX ibn VO etc I hope this goes a bit of the way to explain my situation.
BiggyRat

Minor problem with bBrowser Column headings

Post by BiggyRat »

Serious question Robert, not taking the p155 at all, but what in my code told you that? I can't for the life of me see it.
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Minor problem with bBrowser Column headings

Post by robert »

Jeff,

In short: over 30 years of experience in IT and experience with VO since its early Alpha days. And of course it also helps that I was member of the VO devteam for VO 2.7 and VO 2.8.
This is is what I see in your code:
it opens the server like this:

Code: Select all

oServer := DbServer{"Details"}
The server will then generate DataFields and FieldSpecs based on the information in the DBF file. And that file only has fieldnames with max 10 chars and all in upper case.

I know that bBrowser uses the fieldspecs for captions and column types. So if it shows something else, then this information must be defined somewhere else.
Most likely this comes from Fieldspecs that were written in code, or from FieldSpecs that were defined in the DbServer editor (which also results in code) and which were decorated with "proper" captions.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Minor problem with bBrowser Column headings

Post by Karl-Heinz »

Hi Jeff,

because in the Init() a server assignment already happened, i´m wondering why you´re using this "oServer" code in the PostInit() ?

Code: Select all

method PostInit(oWindow,iCtlID,oServer,uExtra) class TheGreenScreen
...
If IsNil(oServer)
  oServer := DbServer{"Details"}
endif

oServer:SetOrder("JOBFINNO", "DETAILS")
oServer:GoTop()
...

Code: Select all

METHOD Init(oWindow,iCtlID,oServer,uExtra) CLASS TheGreenScreen
...
if !IsNil(oServer)
    SELF:Use(oServer)
ELSE
    SELF:Use(DETAILS{})    // <-------  that´s your self:server
ENDIF

self:PostInit(oWindow,iCtlID,oServer,uExtra)

return self
so in the PostInit() you must remove the "IF IsNil(oServer) ... ENDIF" and use "self:server" at the places where you currently use "oServer". e.g.

Code: Select all

self:server:SetOrder("JOBFINNO", "DETAILS")
self:server:GoTop()

regards
Karl-Heinz
BiggyRat

Minor problem with bBrowser Column headings

Post by BiggyRat »

Awesome Karl-Heinz. Thank you very much for that insight. I have taken your advice. Thanks very much again.

Jeff
Post Reply