Discussion:
Postgresql Digest, Vol 9, Issue 73
Alex Hochberger
2007-10-01 20:06:19 UTC
Permalink
Another remark is RS says they want to deprecate visual control
binding, so you probably shouldn't use that feature anymore with
pgSQL4RB. (I know, it's one of their dumbest moves but what can you
do about it? Anybody fancies protesting in an organized way? I'd
obviously participate in that case.)
I don't have time to organize such a thing, but I'd definitely
participate if some one else did?
I would as well. In reality, without visual binding, I'd probably
just abandon Real Basic. pgSQL4RB + Visual Binding is the entire
reason that I find it a useful tool at my disposal. Alternatively, I
would upgrade once deprecated, and stick to the last version of RB
that supported it. :)

Alex
Aliacta Support
2007-10-01 20:21:34 UTC
Permalink
Post by Alex Hochberger
Another remark is RS says they want to deprecate visual control
binding, so you probably shouldn't use that feature anymore with
pgSQL4RB. (I know, it's one of their dumbest moves but what can you
do about it? Anybody fancies protesting in an organized way? I'd
obviously participate in that case.)
I don't have time to organize such a thing, but I'd definitely
participate if some one else did?
I would as well. In reality, without visual binding, I'd probably
just abandon Real Basic. pgSQL4RB + Visual Binding is the entire
reason that I find it a useful tool at my disposal. Alternatively, I
would upgrade once deprecated, and stick to the last version of RB
that supported it. :)
That would be 2007r3, if my understanding is correct since r4 has a
bug where you can no longer delete bindings, and r5--or better:
2008r1--is supposed to drop support for it.

I'll see if I can start something then to save us from that ill fate
that RS has in mind for us. But I'm going to be 'away from the
internet' again shortly, so I won't be able to actually follow it up,
hence my hesitance so far to be active on this front.

Cheers,

Marc
Alex Hochberger
2007-10-01 21:01:56 UTC
Permalink
Or if you have RB Pro just make a Container Control that you then can
instantiate in code for each TabPanel. That's by far the easiest in
my book.
Marc,
So I'm following your advice, the Contrainer Control is a bit
awkward to work with, but I think that it will work. The only thing
that I'm trying to figure out is how to specify the Container that I
create an instance of.

Assume: class pgTabPanel -- supports the bindings
Each time I use the pgTabPanel, I'm going to want to designate
different controls, I think. So on each Window that I'm using it I'll
create it's own Container Control. However, I need to do:

new ContainerControl1 not new ContainerControl, and I can't just
specify the name in a properties field, can I? I was thinking of
creating a function in pgTabPanel called "getContainerInstance" that I
would then reimplement in each instance of the pgTabPanel, does that
make sense?

This is where I am lost, please advise.

Alex
Aliacta Support
2007-10-01 23:34:06 UTC
Permalink
Hi Alex,

You can create different subclasses of TabPanel that will each build
the proper ContainerControl, or you can have only one subclass that
looks at the window it is on to then select the proper container
control.

For the latter, this would work like this:

If you have for example an aplication that keeps track of the cars
owned by people, and their maintenance records, you could have 3
windows: PeopleWindow, VehicleWindow, MaintenanceWindow.

Then, the Insert and Append methods of your pgTabPanel subclass could
call the method InstantiateAppropriateContainer:

Select Case Self

Case PeopleWindow
New PeopleContainer...

Case VehicleWindow
New VehicleContainer....

Case MaintenanceWindow
New MaintenanceContainer...

Else
Masgbox "Ooops!"

End Select

(I have not tried this code, maybe "Self" doesn't work exactly as I'm
expecting as I know in one of the recent RB releases some tinkering
was done to "Self" and "Me" but I think you get what I mean.)

Cheers,

Marc

PS: Even better: add a property to each window that tells which
container to use and then your (single subclass) pgTabPanel only has
to look up that property! This is in your train of thoughts. You
surely can have a property of type ContainerControl--or at least
Object--that will hold a container control. I haven't tried any of
this. ;-)
Post by Alex Hochberger
Or if you have RB Pro just make a Container Control that you then can
instantiate in code for each TabPanel. That's by far the easiest in
my book.
Marc,
So I'm following your advice, the Contrainer Control is a bit
awkward to work with, but I think that it will work. The only thing
that I'm trying to figure out is how to specify the Container that I
create an instance of.
Assume: class pgTabPanel -- supports the bindings
Each time I use the pgTabPanel, I'm going to want to designate
different controls, I think. So on each Window that I'm using it I'll
new ContainerControl1 not new ContainerControl, and I can't just
specify the name in a properties field, can I? I was thinking of
creating a function in pgTabPanel called "getContainerInstance" that I
would then reimplement in each instance of the pgTabPanel, does that
make sense?
This is where I am lost, please advise.
Alex
_______________________________________________
Postgresql mailing list
http://aliacta.com/mailman/listinfo/postgresql_aliacta.com
Aliacta Support
2007-10-02 00:18:54 UTC
Permalink
(and of course you can probably just drop the property and make a
generator function that passes the container directly to your tabpanel.)
Post by Aliacta Support
PS: Even better: add a property to each window that tells which
container to use and then your (single subclass) pgTabPanel only has
to look up that property!
Add a property to your window "myContainer as ContainerControl."
myContainer = New ContainerControl1
To add a container to your current panel all you need to do now is
Self.GenerateContainer
Self.myContainer.EmbedWithinPanel(Me, Me.Value)
Nice and tidy. Only one pgTabPanel subclass.
Aliacta Support
2007-10-02 00:08:07 UTC
Permalink
Post by Aliacta Support
PS: Even better: add a property to each window that tells which
container to use and then your (single subclass) pgTabPanel only has
to look up that property!
Ok, so I had to try this out and here's the result:

Add a property to your window "myContainer as ContainerControl."
Add a method to your window "GenerateContainer" which holds this code:

myContainer = New ContainerControl1


To add a container to your current panel all you need to do now is
(from within the pgTabPanel, i.e. "Me" is the pgTabPanel):

Self.GenerateContainer
Self.myContainer.EmbedWithinPanel(Me, Me.Value)


Nice and tidy. Only one pgTabPanel subclass.

Cheers,

Marc

Loading...