fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC: Minor problem with bBrowser Column headings

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9960

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 243
Hi all, I have a minor, but annoying problem with bBrowser column headings in ONE instance of the bBrowser.I use three bBrowsers in my app,two display properly as shown in the "Column labled correctly" image attached, but the one that is used the most (PostInit and Init code in attached PDF) displays wrongly - see "Columns labled incorrectly" image also attached. Where am I going wrong please?
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by BiggyRat.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9963

  ic2's Avatar ic2 Offline Posts: 576
Famous VO Guru Geoff Schaller (he's doing fine btw, I called him 2 weeks ago) would have said:

"Show us some code"

And if you also upload a bigger picture (these are hardly visible) we may be able to see what's wrong.
So please upload the code for the correct and the incorrect bBrowser.

Dick

Dick

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9964

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 243
The code is there in the pdf file...I'm not sure what else I can post. The 2 pictures are fine here. I've uploaded them 4 times.They are both 1661*294 pixels. This site must be shrinking them.
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by BiggyRat.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9965

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 243
Lets try the same files as a zip...
Attachments:

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9967

  robert's Avatar robert Offline Posts: 1373
Jeff,

Your postinit code manipulates SetDateFormat() and SetCentury(). That is global state that you should NOT change when opening a window but usually only once at startup of your app.
I remember a discussion a few weeks ago about date display.
It is this kind of code that can and will cause problems.

W.r.t. the column headers: this bBrowser uses a standard DbServer. This server does not have description captions for the fields. My guess is that the other window uses a Designed server where you have added captions to the fields / fieldspecs.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

Last edit: by robert.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9968

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 243
Hi Robert, ok, I'll ditch that code, but it's in the other 2 also. This browser was the original bBrower I created. The other two are literal clones of this one. They work, this one doesn't. That's what has me stuffed.

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9971

  lumberjack's Avatar lumberjack Offline Posts: 627
Jeff,

BiggyRat wrote: Hi Robert, ok, I'll ditch that code, but it's in the other 2 also. This browser was the original bBrower I created. The other two are literal clones of this one. They work, this one doesn't. That's what has me stuffed.

Are you sure the others that work don't have somewhere a bDataColumn:Caption assignment and this one not?
______________________
Johan Nel
George, South Africa

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9972

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 243
Yes Sir, absolutely. They all got their column titles from their Fieldspecs. If there's a manual way of doing it, I'm all ears... and eyes! ?

Please Log in or Create an account to join the conversation.

Last edit: by BiggyRat.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9973

  lumberjack's Avatar lumberjack Offline Posts: 627

BiggyRat wrote: Yes Sir, absolutely. They all got their column titles from their Fieldspecs. If there's a manual way of doing it, I'm all ears... and eyes! ?

The bDataColumns all have a Caption property that you can ACCESS/ASSIGN so no rocket science:
self:oDCbBrowser1:GetColumn(#JobDate):Caption := "My Job Date Caption"
______________________
Johan Nel
George, South Africa

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9974

  robert's Avatar robert Offline Posts: 1373
Jeff,
So the difference is that one window has a plain DbServer{} and the others a server where fields have been decorated with FieldSpecs. That is what I already thought and suggested.

Robert
XSharp Development Team
The Netherlands

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9976

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 243
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.

Please Log in or Create an account to join the conversation.

Last edit: by BiggyRat.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9977

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 243
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.

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 3 weeks ago #9979

  robert's Avatar robert Offline Posts: 1373
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:
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

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 2 weeks ago #9983

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 420
Hi Jeff,

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

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

oServer:SetOrder("JOBFINNO", "DETAILS")
oServer:GoTop()
...
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.

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

regards
Karl-Heinz

Please Log in or Create an account to join the conversation.

Minor problem with bBrowser Column headings 4 months 2 weeks ago #9984

  BiggyRat's Avatar Topic Author BiggyRat Offline Posts: 243
Awesome Karl-Heinz. Thank you very much for that insight. I have taken your advice. Thanks very much again.

Jeff

Please Log in or Create an account to join the conversation.

  • Page:
  • 1