Getting datawindow Properties from within datawindow??

PB7.0.3

hi,

i would like to create a custom userObject uo_myDW that inherits from
DataWindow and stuff some default behaviour into it.

For a new app i'm writing, i need a pile of input windows, all sharing the
same functionality. I'd like to build uo_myDW so that in incorporates all
standard 'inputDW-behaviour'.

Here 's what i want to do
For one of these functionalities mentioned above, i need the collection of
uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and store them
in a instance var ids_DWColumns for future reference.

SO i need to obtain the properties of the dataobject assigned to uo_myDW

what i do is...
>I create an instance of uo_myDW
>i set the instance's dataobject and transobject
>then i call uo_myDW::ue_getDWCols() to obtain all columns that have a
tabindex > 0
    the logic looks like

        // obtain the nmber of cols
        li_cols = Integer( this.Describe("DataWindow.Column.Count") )
        --> returns nothing!
        --> if i use li_cols = Integer(
this.Object.DataWindow.Column.Count ) PB says me "Null object
reference"

        // loop through cols and store the ones with tabindex > 0 in
ids_DCWolums
        FOR li_col = 1 TO li_cols
         ls_colName  =  Describe("#" + String(li_col)+".Name")
         li_tab    =  Integer( Describe("#" +
String(li_col)+".TabSequence") )
         IF li_tab > 0 THEN
              li_newrow = ids_DWColumns.insertrow(0)
              ids_DWColumns.object.colname[ li_newrow ] = ls_colname
              ids_DWColumns.object.colnum[ li_newrow ] = li_col
              ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
         END IF
        NEXT

        // Sort ids_DWColumns on ascending tabindex
        ids_DWColumns.setsort( "coltab A" )
        ids_DWColumns.sort()


0
elise
4/16/2003 8:38:45 AM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

8 Replies
998 Views

Similar Articles

[PageSpeed] 56

Hi,

I would check if the setting of the
dataObject is correct. Also you can
check if setTransObject(...) returns 1.

Chris Werner

"elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
news:OJtPjP$ADHA.221@forums-1-dub...
> PB7.0.3
>
> hi,
>
> i would like to create a custom userObject uo_myDW that inherits from
> DataWindow and stuff some default behaviour into it.
>
> For a new app i'm writing, i need a pile of input windows, all sharing the
> same functionality. I'd like to build uo_myDW so that in incorporates all
> standard 'inputDW-behaviour'.
>
> Here 's what i want to do
> For one of these functionalities mentioned above, i need the collection of
> uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and store
them
> in a instance var ids_DWColumns for future reference.
>
> SO i need to obtain the properties of the dataobject assigned to uo_myDW
>
> what i do is...
> >I create an instance of uo_myDW
> >i set the instance's dataobject and transobject
> >then i call uo_myDW::ue_getDWCols() to obtain all columns that have a
> tabindex > 0
>     the logic looks like
>
>         // obtain the nmber of cols
>         li_cols = Integer( this.Describe("DataWindow.Column.Count") )
>         --> returns nothing!
>         --> if i use li_cols = Integer(
> this.Object.DataWindow.Column.Count ) PB says me "Null object
> reference"
>
>         // loop through cols and store the ones with tabindex > 0 in
> ids_DCWolums
>         FOR li_col = 1 TO li_cols
>          ls_colName  =  Describe("#" + String(li_col)+".Name")
>          li_tab    =  Integer( Describe("#" +
> String(li_col)+".TabSequence") )
>          IF li_tab > 0 THEN
>               li_newrow = ids_DWColumns.insertrow(0)
>               ids_DWColumns.object.colname[ li_newrow ] = ls_colname
>               ids_DWColumns.object.colnum[ li_newrow ] = li_col
>               ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
>          END IF
>         NEXT
>
>         // Sort ids_DWColumns on ascending tabindex
>         ids_DWColumns.setsort( "coltab A" )
>         ids_DWColumns.sort()
>
>


0
Chris
4/16/2003 9:31:00 AM
chris,

I check the name of the dataobject just before performing the Describe (the
name is correct).

The SetTransObject fails! As a matter of fact, it fails for every DW or DS i
use on my main window, but i only just now notice... All retrieves and
updates are perfectly OK on the other DW's???

i cannot see why the settransobject would fail?

"Chris Werner" <cw@f-s.de> schreef in bericht
news:etTRIt$ADHA.334@forums-1-dub...
> Hi,
>
> I would check if the setting of the
> dataObject is correct. Also you can
> check if setTransObject(...) returns 1.
>
> Chris Werner
>
> "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> news:OJtPjP$ADHA.221@forums-1-dub...
> > PB7.0.3
> >
> > hi,
> >
> > i would like to create a custom userObject uo_myDW that inherits from
> > DataWindow and stuff some default behaviour into it.
> >
> > For a new app i'm writing, i need a pile of input windows, all sharing
the
> > same functionality. I'd like to build uo_myDW so that in incorporates
all
> > standard 'inputDW-behaviour'.
> >
> > Here 's what i want to do
> > For one of these functionalities mentioned above, i need the collection
of
> > uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and store
> them
> > in a instance var ids_DWColumns for future reference.
> >
> > SO i need to obtain the properties of the dataobject assigned to uo_myDW
> >
> > what i do is...
> > >I create an instance of uo_myDW
> > >i set the instance's dataobject and transobject
> > >then i call uo_myDW::ue_getDWCols() to obtain all columns that have a
> > tabindex > 0
> >     the logic looks like
> >
> >         // obtain the nmber of cols
> >         li_cols = Integer( this.Describe("DataWindow.Column.Count") )
> >         --> returns nothing!
> >         --> if i use li_cols = Integer(
> > this.Object.DataWindow.Column.Count ) PB says me "Null object
> > reference"
> >
> >         // loop through cols and store the ones with tabindex > 0 in
> > ids_DCWolums
> >         FOR li_col = 1 TO li_cols
> >          ls_colName  =  Describe("#" + String(li_col)+".Name")
> >          li_tab    =  Integer( Describe("#" +
> > String(li_col)+".TabSequence") )
> >          IF li_tab > 0 THEN
> >               li_newrow = ids_DWColumns.insertrow(0)
> >               ids_DWColumns.object.colname[ li_newrow ] = ls_colname
> >               ids_DWColumns.object.colnum[ li_newrow ] = li_col
> >               ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
> >          END IF
> >         NEXT
> >
> >         // Sort ids_DWColumns on ascending tabindex
> >         ids_DWColumns.setsort( "coltab A" )
> >         ids_DWColumns.sort()
> >
> >
>
>


0
elise
4/16/2003 9:51:34 AM
Hi,

I'm not sure but maybe you see
the reason why setTransObject(sqlca)
fails in sqlca.sqlErrText:

if dw_1.setTransObject(sqlca) <> 1 then
    messageBox("DB Error", sqlca.sqlErrText)
end if

Maybe your application is not connected
to a database in this moment?

Chris Werner




"elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
news:OCAfP4$ADHA.334@forums-1-dub...
> chris,
>
> I check the name of the dataobject just before performing the Describe
(the
> name is correct).
>
> The SetTransObject fails! As a matter of fact, it fails for every DW or DS
i
> use on my main window, but i only just now notice... All retrieves and
> updates are perfectly OK on the other DW's???
>
> i cannot see why the settransobject would fail?
>
> "Chris Werner" <cw@f-s.de> schreef in bericht
> news:etTRIt$ADHA.334@forums-1-dub...
> > Hi,
> >
> > I would check if the setting of the
> > dataObject is correct. Also you can
> > check if setTransObject(...) returns 1.
> >
> > Chris Werner
> >
> > "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> > news:OJtPjP$ADHA.221@forums-1-dub...
> > > PB7.0.3
> > >
> > > hi,
> > >
> > > i would like to create a custom userObject uo_myDW that inherits from
> > > DataWindow and stuff some default behaviour into it.
> > >
> > > For a new app i'm writing, i need a pile of input windows, all sharing
> the
> > > same functionality. I'd like to build uo_myDW so that in incorporates
> all
> > > standard 'inputDW-behaviour'.
> > >
> > > Here 's what i want to do
> > > For one of these functionalities mentioned above, i need the
collection
> of
> > > uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and store
> > them
> > > in a instance var ids_DWColumns for future reference.
> > >
> > > SO i need to obtain the properties of the dataobject assigned to
uo_myDW
> > >
> > > what i do is...
> > > >I create an instance of uo_myDW
> > > >i set the instance's dataobject and transobject
> > > >then i call uo_myDW::ue_getDWCols() to obtain all columns that have a
> > > tabindex > 0
> > >     the logic looks like
> > >
> > >         // obtain the nmber of cols
> > >         li_cols = Integer( this.Describe("DataWindow.Column.Count") )
> > >         --> returns nothing!
> > >         --> if i use li_cols = Integer(
> > > this.Object.DataWindow.Column.Count ) PB says me "Null object
> > > reference"
> > >
> > >         // loop through cols and store the ones with tabindex > 0 in
> > > ids_DCWolums
> > >         FOR li_col = 1 TO li_cols
> > >          ls_colName  =  Describe("#" + String(li_col)+".Name")
> > >          li_tab    =  Integer( Describe("#" +
> > > String(li_col)+".TabSequence") )
> > >          IF li_tab > 0 THEN
> > >               li_newrow = ids_DWColumns.insertrow(0)
> > >               ids_DWColumns.object.colname[ li_newrow ] = ls_colname
> > >               ids_DWColumns.object.colnum[ li_newrow ] = li_col
> > >               ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
> > >          END IF
> > >         NEXT
> > >
> > >         // Sort ids_DWColumns on ascending tabindex
> > >         ids_DWColumns.setsort( "coltab A" )
> > >         ids_DWColumns.sort()
> > >
> > >
> >
> >
>
>


0
Chris
4/16/2003 10:00:42 AM
chris,

Just ignore my earlier post!


I check the name of the dataobject just before performing the Describe (the
name is correct).

The SetTransObject fails only for my uo_myDW!

I cannot see why the settransobject fails, when it succeeds for other DW's
and DS's on my main window where i use exactly the same transaction object.

elise


"Chris Werner" <cw@f-s.de> schreef in bericht
news:etTRIt$ADHA.334@forums-1-dub...
> Hi,
>
> I would check if the setting of the
> dataObject is correct. Also you can
> check if setTransObject(...) returns 1.
>
> Chris Werner
>
> "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> news:OJtPjP$ADHA.221@forums-1-dub...
> > PB7.0.3
> >
> > hi,
> >
> > i would like to create a custom userObject uo_myDW that inherits from
> > DataWindow and stuff some default behaviour into it.
> >
> > For a new app i'm writing, i need a pile of input windows, all sharing
the
> > same functionality. I'd like to build uo_myDW so that in incorporates
all
> > standard 'inputDW-behaviour'.
> >
> > Here 's what i want to do
> > For one of these functionalities mentioned above, i need the collection
of
> > uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and store
> them
> > in a instance var ids_DWColumns for future reference.
> >
> > SO i need to obtain the properties of the dataobject assigned to uo_myDW
> >
> > what i do is...
> > >I create an instance of uo_myDW
> > >i set the instance's dataobject and transobject
> > >then i call uo_myDW::ue_getDWCols() to obtain all columns that have a
> > tabindex > 0
> >     the logic looks like
> >
> >         // obtain the nmber of cols
> >         li_cols = Integer( this.Describe("DataWindow.Column.Count") )
> >         --> returns nothing!
> >         --> if i use li_cols = Integer(
> > this.Object.DataWindow.Column.Count ) PB says me "Null object
> > reference"
> >
> >         // loop through cols and store the ones with tabindex > 0 in
> > ids_DCWolums
> >         FOR li_col = 1 TO li_cols
> >          ls_colName  =  Describe("#" + String(li_col)+".Name")
> >          li_tab    =  Integer( Describe("#" +
> > String(li_col)+".TabSequence") )
> >          IF li_tab > 0 THEN
> >               li_newrow = ids_DWColumns.insertrow(0)
> >               ids_DWColumns.object.colname[ li_newrow ] = ls_colname
> >               ids_DWColumns.object.colnum[ li_newrow ] = li_col
> >               ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
> >          END IF
> >         NEXT
> >
> >         // Sort ids_DWColumns on ascending tabindex
> >         ids_DWColumns.setsort( "coltab A" )
> >         ids_DWColumns.sort()
> >
> >
>
>


0
elise
4/16/2003 10:02:07 AM
Hi,

try to retrieve the datawindow from the IDE. works?
Then check if the library containing the datawindow
is in your libpath. yes?
Then check if there are multiple datawindows with the
same name in other libraries. No?

Double check the dataobject name, because for the
moment I have no further idea.

Chris Werner


"elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
news:OgyXI#$ADHA.221@forums-1-dub...
> chris,
>
> Just ignore my earlier post!
>
>
> I check the name of the dataobject just before performing the Describe
(the
> name is correct).
>
> The SetTransObject fails only for my uo_myDW!
>
> I cannot see why the settransobject fails, when it succeeds for other DW's
> and DS's on my main window where i use exactly the same transaction
object.
>
> elise
>
>
> "Chris Werner" <cw@f-s.de> schreef in bericht
> news:etTRIt$ADHA.334@forums-1-dub...
> > Hi,
> >
> > I would check if the setting of the
> > dataObject is correct. Also you can
> > check if setTransObject(...) returns 1.
> >
> > Chris Werner
> >
> > "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> > news:OJtPjP$ADHA.221@forums-1-dub...
> > > PB7.0.3
> > >
> > > hi,
> > >
> > > i would like to create a custom userObject uo_myDW that inherits from
> > > DataWindow and stuff some default behaviour into it.
> > >
> > > For a new app i'm writing, i need a pile of input windows, all sharing
> the
> > > same functionality. I'd like to build uo_myDW so that in incorporates
> all
> > > standard 'inputDW-behaviour'.
> > >
> > > Here 's what i want to do
> > > For one of these functionalities mentioned above, i need the
collection
> of
> > > uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and store
> > them
> > > in a instance var ids_DWColumns for future reference.
> > >
> > > SO i need to obtain the properties of the dataobject assigned to
uo_myDW
> > >
> > > what i do is...
> > > >I create an instance of uo_myDW
> > > >i set the instance's dataobject and transobject
> > > >then i call uo_myDW::ue_getDWCols() to obtain all columns that have a
> > > tabindex > 0
> > >     the logic looks like
> > >
> > >         // obtain the nmber of cols
> > >         li_cols = Integer( this.Describe("DataWindow.Column.Count") )
> > >         --> returns nothing!
> > >         --> if i use li_cols = Integer(
> > > this.Object.DataWindow.Column.Count ) PB says me "Null object
> > > reference"
> > >
> > >         // loop through cols and store the ones with tabindex > 0 in
> > > ids_DCWolums
> > >         FOR li_col = 1 TO li_cols
> > >          ls_colName  =  Describe("#" + String(li_col)+".Name")
> > >          li_tab    =  Integer( Describe("#" +
> > > String(li_col)+".TabSequence") )
> > >          IF li_tab > 0 THEN
> > >               li_newrow = ids_DWColumns.insertrow(0)
> > >               ids_DWColumns.object.colname[ li_newrow ] = ls_colname
> > >               ids_DWColumns.object.colnum[ li_newrow ] = li_col
> > >               ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
> > >          END IF
> > >         NEXT
> > >
> > >         // Sort ids_DWColumns on ascending tabindex
> > >         ids_DWColumns.setsort( "coltab A" )
> > >         ids_DWColumns.sort()
> > >
> > >
> >
> >
>
>


0
Chris
4/16/2003 10:08:51 AM
> try to retrieve the datawindow from the IDE. works?
is OK
> Then check if the library containing the datawindow
> is in your libpath. yes?
is OK


> Then check if there are multiple datawindows with the
> same name in other libraries. No?
I guess this is where i need to look for my problem.

The situation is this...
On my main window, i have a large DW named dw_productPrices ( of type DW )
What i want to do now, is change the dw_productPrices to type uo_myDW.
I would like to retain the name dw_productprices because if i change it, i
need to change it all over my app.
i guess i am missing something here.

What i did is...
I renamed the old DW_productPrices ( of type DW ) and replaced it with my
new DW_productPrices ( of type uo_muDW ). Of course, in this case i
explicitely need to call dw_productPrices = CREATE uo_muDW.
Then PB gives me a compile error saying there allready exists an object
called dw_productPrices.

Do i need to make my dw_productPrices an instance var on my window, or ...?

elise



"Chris Werner" <cw@f-s.de> schreef in bericht
news:e7tSSCABDHA.334@forums-1-dub...
> Hi,
>
> try to retrieve the datawindow from the IDE. works?
> Then check if the library containing the datawindow
> is in your libpath. yes?
> Then check if there are multiple datawindows with the
> same name in other libraries. No?
>
> Double check the dataobject name, because for the
> moment I have no further idea.
>
> Chris Werner
>
>
> "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> news:OgyXI#$ADHA.221@forums-1-dub...
> > chris,
> >
> > Just ignore my earlier post!
> >
> >
> > I check the name of the dataobject just before performing the Describe
> (the
> > name is correct).
> >
> > The SetTransObject fails only for my uo_myDW!
> >
> > I cannot see why the settransobject fails, when it succeeds for other
DW's
> > and DS's on my main window where i use exactly the same transaction
> object.
> >
> > elise
> >
> >
> > "Chris Werner" <cw@f-s.de> schreef in bericht
> > news:etTRIt$ADHA.334@forums-1-dub...
> > > Hi,
> > >
> > > I would check if the setting of the
> > > dataObject is correct. Also you can
> > > check if setTransObject(...) returns 1.
> > >
> > > Chris Werner
> > >
> > > "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> > > news:OJtPjP$ADHA.221@forums-1-dub...
> > > > PB7.0.3
> > > >
> > > > hi,
> > > >
> > > > i would like to create a custom userObject uo_myDW that inherits
from
> > > > DataWindow and stuff some default behaviour into it.
> > > >
> > > > For a new app i'm writing, i need a pile of input windows, all
sharing
> > the
> > > > same functionality. I'd like to build uo_myDW so that in
incorporates
> > all
> > > > standard 'inputDW-behaviour'.
> > > >
> > > > Here 's what i want to do
> > > > For one of these functionalities mentioned above, i need the
> collection
> > of
> > > > uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and
store
> > > them
> > > > in a instance var ids_DWColumns for future reference.
> > > >
> > > > SO i need to obtain the properties of the dataobject assigned to
> uo_myDW
> > > >
> > > > what i do is...
> > > > >I create an instance of uo_myDW
> > > > >i set the instance's dataobject and transobject
> > > > >then i call uo_myDW::ue_getDWCols() to obtain all columns that have
a
> > > > tabindex > 0
> > > >     the logic looks like
> > > >
> > > >         // obtain the nmber of cols
> > > >         li_cols = Integer(
this.Describe("DataWindow.Column.Count") )
> > > >         --> returns nothing!
> > > >         --> if i use li_cols = Integer(
> > > > this.Object.DataWindow.Column.Count ) PB says me "Null object
> > > > reference"
> > > >
> > > >         // loop through cols and store the ones with tabindex > 0 in
> > > > ids_DCWolums
> > > >         FOR li_col = 1 TO li_cols
> > > >          ls_colName  =  Describe("#" + String(li_col)+".Name")
> > > >          li_tab    =  Integer( Describe("#" +
> > > > String(li_col)+".TabSequence") )
> > > >          IF li_tab > 0 THEN
> > > >               li_newrow = ids_DWColumns.insertrow(0)
> > > >               ids_DWColumns.object.colname[ li_newrow ] = ls_colname
> > > >               ids_DWColumns.object.colnum[ li_newrow ] = li_col
> > > >               ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
> > > >          END IF
> > > >         NEXT
> > > >
> > > >         // Sort ids_DWColumns on ascending tabindex
> > > >         ids_DWColumns.setsort( "coltab A" )
> > > >         ids_DWColumns.sort()
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
elise
4/16/2003 10:27:21 AM
Chris,

i removed the dw_productPrices = CREATE uo_myDW
and the settransObject is successful, also the describe!

I guess i need to take a look at the inheritance chapter ;-)

thanx 4 your time!

elise

"Chris Werner" <cw@f-s.de> schreef in bericht
news:e7tSSCABDHA.334@forums-1-dub...
> Hi,
>
> try to retrieve the datawindow from the IDE. works?
> Then check if the library containing the datawindow
> is in your libpath. yes?
> Then check if there are multiple datawindows with the
> same name in other libraries. No?
>
> Double check the dataobject name, because for the
> moment I have no further idea.
>
> Chris Werner
>
>
> "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> news:OgyXI#$ADHA.221@forums-1-dub...
> > chris,
> >
> > Just ignore my earlier post!
> >
> >
> > I check the name of the dataobject just before performing the Describe
> (the
> > name is correct).
> >
> > The SetTransObject fails only for my uo_myDW!
> >
> > I cannot see why the settransobject fails, when it succeeds for other
DW's
> > and DS's on my main window where i use exactly the same transaction
> object.
> >
> > elise
> >
> >
> > "Chris Werner" <cw@f-s.de> schreef in bericht
> > news:etTRIt$ADHA.334@forums-1-dub...
> > > Hi,
> > >
> > > I would check if the setting of the
> > > dataObject is correct. Also you can
> > > check if setTransObject(...) returns 1.
> > >
> > > Chris Werner
> > >
> > > "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> > > news:OJtPjP$ADHA.221@forums-1-dub...
> > > > PB7.0.3
> > > >
> > > > hi,
> > > >
> > > > i would like to create a custom userObject uo_myDW that inherits
from
> > > > DataWindow and stuff some default behaviour into it.
> > > >
> > > > For a new app i'm writing, i need a pile of input windows, all
sharing
> > the
> > > > same functionality. I'd like to build uo_myDW so that in
incorporates
> > all
> > > > standard 'inputDW-behaviour'.
> > > >
> > > > Here 's what i want to do
> > > > For one of these functionalities mentioned above, i need the
> collection
> > of
> > > > uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and
store
> > > them
> > > > in a instance var ids_DWColumns for future reference.
> > > >
> > > > SO i need to obtain the properties of the dataobject assigned to
> uo_myDW
> > > >
> > > > what i do is...
> > > > >I create an instance of uo_myDW
> > > > >i set the instance's dataobject and transobject
> > > > >then i call uo_myDW::ue_getDWCols() to obtain all columns that have
a
> > > > tabindex > 0
> > > >     the logic looks like
> > > >
> > > >         // obtain the nmber of cols
> > > >         li_cols = Integer(
this.Describe("DataWindow.Column.Count") )
> > > >         --> returns nothing!
> > > >         --> if i use li_cols = Integer(
> > > > this.Object.DataWindow.Column.Count ) PB says me "Null object
> > > > reference"
> > > >
> > > >         // loop through cols and store the ones with tabindex > 0 in
> > > > ids_DCWolums
> > > >         FOR li_col = 1 TO li_cols
> > > >          ls_colName  =  Describe("#" + String(li_col)+".Name")
> > > >          li_tab    =  Integer( Describe("#" +
> > > > String(li_col)+".TabSequence") )
> > > >          IF li_tab > 0 THEN
> > > >               li_newrow = ids_DWColumns.insertrow(0)
> > > >               ids_DWColumns.object.colname[ li_newrow ] = ls_colname
> > > >               ids_DWColumns.object.colnum[ li_newrow ] = li_col
> > > >               ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
> > > >          END IF
> > > >         NEXT
> > > >
> > > >         // Sort ids_DWColumns on ascending tabindex
> > > >         ids_DWColumns.setsort( "coltab A" )
> > > >         ids_DWColumns.sort()
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
elise
4/16/2003 10:34:06 AM
Hi,

a dw on a window is a control, you never
need to call <controlname> = CREATE <controltype>,
because the controls are created by
PB.

What you want is to change the type of
an already placed control. There are two
ways:

1.) Delete the existing control from the
     window an place a new one there.
     Because the new one inherit's from a
     userObject (wich inherit's from a dw),
     you have to place a userobject and
     not a dw on your window. Of course,
     you will loose alle scripts in window.dw_productprices.
     If this is critical, then choose option 2:

2.) Export the window (in library painter
     select the window an choose "Export".
     Edit the resulting text file. Search for the
     string

          datawindow dw_productprices

     and replace it with

          uo_muDW dw_productprices

     Then import the window. Be sure to
      have a backup of your window!

But all this don't explain your initial problems,
because the dataobject don't changed.

Chris Werner



"elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
news:epzEPMABDHA.221@forums-1-dub...
> > try to retrieve the datawindow from the IDE. works?
> is OK
> > Then check if the library containing the datawindow
> > is in your libpath. yes?
> is OK
>
>
> > Then check if there are multiple datawindows with the
> > same name in other libraries. No?
> I guess this is where i need to look for my problem.
>
> The situation is this...
> On my main window, i have a large DW named dw_productPrices ( of type DW )
> What i want to do now, is change the dw_productPrices to type uo_myDW.
> I would like to retain the name dw_productprices because if i change it, i
> need to change it all over my app.
> i guess i am missing something here.
>
> What i did is...
> I renamed the old DW_productPrices ( of type DW ) and replaced it with my
> new DW_productPrices ( of type uo_muDW ). Of course, in this case i
> explicitely need to call dw_productPrices = CREATE uo_muDW.
> Then PB gives me a compile error saying there allready exists an object
> called dw_productPrices.
>
> Do i need to make my dw_productPrices an instance var on my window, or
....?
>
> elise
>
>
>
> "Chris Werner" <cw@f-s.de> schreef in bericht
> news:e7tSSCABDHA.334@forums-1-dub...
> > Hi,
> >
> > try to retrieve the datawindow from the IDE. works?
> > Then check if the library containing the datawindow
> > is in your libpath. yes?
> > Then check if there are multiple datawindows with the
> > same name in other libraries. No?
> >
> > Double check the dataobject name, because for the
> > moment I have no further idea.
> >
> > Chris Werner
> >
> >
> > "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> > news:OgyXI#$ADHA.221@forums-1-dub...
> > > chris,
> > >
> > > Just ignore my earlier post!
> > >
> > >
> > > I check the name of the dataobject just before performing the Describe
> > (the
> > > name is correct).
> > >
> > > The SetTransObject fails only for my uo_myDW!
> > >
> > > I cannot see why the settransobject fails, when it succeeds for other
> DW's
> > > and DS's on my main window where i use exactly the same transaction
> > object.
> > >
> > > elise
> > >
> > >
> > > "Chris Werner" <cw@f-s.de> schreef in bericht
> > > news:etTRIt$ADHA.334@forums-1-dub...
> > > > Hi,
> > > >
> > > > I would check if the setting of the
> > > > dataObject is correct. Also you can
> > > > check if setTransObject(...) returns 1.
> > > >
> > > > Chris Werner
> > > >
> > > > "elise" <elise_NOSPAM4ME@webmeester.be> schrieb im Newsbeitrag
> > > > news:OJtPjP$ADHA.221@forums-1-dub...
> > > > > PB7.0.3
> > > > >
> > > > > hi,
> > > > >
> > > > > i would like to create a custom userObject uo_myDW that inherits
> from
> > > > > DataWindow and stuff some default behaviour into it.
> > > > >
> > > > > For a new app i'm writing, i need a pile of input windows, all
> sharing
> > > the
> > > > > same functionality. I'd like to build uo_myDW so that in
> incorporates
> > > all
> > > > > standard 'inputDW-behaviour'.
> > > > >
> > > > > Here 's what i want to do
> > > > > For one of these functionalities mentioned above, i need the
> > collection
> > > of
> > > > > uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and
> store
> > > > them
> > > > > in a instance var ids_DWColumns for future reference.
> > > > >
> > > > > SO i need to obtain the properties of the dataobject assigned to
> > uo_myDW
> > > > >
> > > > > what i do is...
> > > > > >I create an instance of uo_myDW
> > > > > >i set the instance's dataobject and transobject
> > > > > >then i call uo_myDW::ue_getDWCols() to obtain all columns that
have
> a
> > > > > tabindex > 0
> > > > >     the logic looks like
> > > > >
> > > > >         // obtain the nmber of cols
> > > > >         li_cols = Integer(
> this.Describe("DataWindow.Column.Count") )
> > > > >         --> returns nothing!
> > > > >         --> if i use li_cols = Integer(
> > > > > this.Object.DataWindow.Column.Count ) PB says me "Null object
> > > > > reference"
> > > > >
> > > > >         // loop through cols and store the ones with tabindex > 0
in
> > > > > ids_DCWolums
> > > > >         FOR li_col = 1 TO li_cols
> > > > >          ls_colName  =  Describe("#" + String(li_col)+".Name")
> > > > >          li_tab    =  Integer( Describe("#" +
> > > > > String(li_col)+".TabSequence") )
> > > > >          IF li_tab > 0 THEN
> > > > >               li_newrow = ids_DWColumns.insertrow(0)
> > > > >               ids_DWColumns.object.colname[ li_newrow ] =
ls_colname
> > > > >               ids_DWColumns.object.colnum[ li_newrow ] = li_col
> > > > >               ids_DWColumns.object.coltab[ li_newrow ]   = li_tab
> > > > >          END IF
> > > > >         NEXT
> > > > >
> > > > >         // Sort ids_DWColumns on ascending tabindex
> > > > >         ids_DWColumns.setsort( "coltab A" )
> > > > >         ids_DWColumns.sort()
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
Chris
4/16/2003 10:47:53 AM
Reply:

Similar Artilces:

DataWindow This, DataWindow That...
Blah blah blah You've heard it enough that you don't even want to comment on how many times... The DataWindow. ....but it can't be enough anymore...can it? This from one of our colleagues (and yes my apologies for taking it out of context)... "...PB covers all you need to do that in ONE Tool. This includes Windowprogramming ( meaning the interface to the user: Windows, Sheets, diallougeboxes, etc.), Database operability AND Reporting! Well, I see als well as many other PB users that some of the implementations and features PB offers are improvable. But thi...

DataWindow Within DataWindow
How Can I access/modify object/control from a Datawindow within Datawindow. When i access/modify object/control from a Datawindow i used dw_1.modify("name.text = 'new val'") but within another datawindow or child datawindow it doesnt work. Your description is difficult to understand due to the terminology. First, a datawindow is assigned to a control - either a datawindow control or a datastore. Second, the Modify function can only be called within a script. With that as a basis, can you rephrase the question and describe more precisely what you want to do? ...

Drop down datawindow within a datawindow
I have a datawindow that is attached to a PL/SQL stored procedure that is supposed to list records. Several of the fields in the list are identified as Style DropDownDW. The intent is that for these fields there will be multiple values available by using a vertical scroll bar and arrow. For example, a record in the window might have Name Address Medical Code Medical code would also be a drop down list box with multiple values. Is there a simple way to implement this in Powerbuilder 9? What kind of PB coding constructs would be necessary? Thanks Please post this question ...

Properties of a datawindow on a composite datawindow
I have a composite report that has 2 nested datawindows. At run time, I want to modify the dataobject of one of the nested datawindows on the report. I am using the GetChild function to get a reference to the nested datawindow on the report. Here's the code I am using. dw_maintain_code is the nested datawindow on dw_composite. li_rtn = dw_composite.GetChild("dw_maintain_code",ldw_child1) //get reference ls_rtn = ldw_child1.Modify('dw_maintain_code.dataobject = d_code_sync') li_rtn = dw_code_type_list.ShareData(ldw_child1) The Modify returns an empty str...

embedding a datawindow within a datawindow
Below is a sample of the format for a report I need to create. The report will display courses that may or may not be part of group, because the people running the courses can choose from all the courses available to create their own "group" of courses. Since a course may or may not be part of a group would using an embedded datawindow for the group info work? How? Can anyone point me in the right direction? The data is coming from two tables. Thanks, Kevin CourseID CourseTitle CourseTopic EnrollMax EnrollCurrent 100145A "Sample" "Sample"...

Drop down datawindow within datawindow
I have a datawindow that is attached to a PL/SQL stored procedure that is supposed to list records. Several of the fields in the list are identified as Style DropDownDW. The intent is that for these fields there will be multiple values available by using a vertical scroll bar and arrow. For example, a record in the window might have Name Address Medical Code Medical code would also be a drop down list box with multiple values. Is there a simple way to implement this in Powerbuilder 9? What kind of PB coding constructs would be necessary? Thanks Generally, the steps are: ...

how can I get or set property to a graph datawindow in a composite datawindow?
I make a composite style datawindow. There is a graph style datawindow in it. I can't get or set the graph style datawindow 's property like title, values.label and or so. the graph style datawindow 's datasource is extern data. I do it like this: datawindow dw_child dw_composite.getchild('graph', dw_child) dw_child.object.gr_1.title = 'hello' It failed! then I use this datastore ds_1 ds_1 = create datastore ds_1.dataobject = 'data_graph' ds_1.object.gr_1.title = 'hello' datawindow dw_child dw_composite.getchild('grap...

How to share the datawindow to inner datawindow of nested datawindow
How to share the datawindow to inner datawindow of nested datawindow. Ex -------- dw_1 is normal datawindow dw_nes is nested datawindow, both are placed one window dw_nes contain dw_child datawindow Question ---------------- i want to share dw_1 and dw_child. I have tried the below code, getting error dw_1.sharedata( dw_nes.object.dw_child) It's the dot notation. You will need to dw_nes.GetChild("dw_child", ldwc) where ldwc is a _local_ datawindowchild. <kzganesan@gmail.com> wrote in message news:4c64c402-bac5-4ee0-83aa-4ac08ffe43e5@r66g2000hsg.go...

Urgent
Dear all, I'm using PB 6.5.1. I have a report with the following layout: Datawindow A contain Datawindow B, Datawindow B contain Datawindow C And I want to get a reference to Datawindow C. However, I tried to use GetChild() for Datawindow B. It retured -1. Thus, I also tried to get another Datawindow D which is nested in Datawindow A and no nested datawindow nested in it. Then, using GetChild is worked for this case. Am I missing something?? is there any other way round?? Any ideas or suggestion are welcome. Thanks in Advance. Best Regards, Andy Cheung ...

modifiyin a datawindow in a datawindow
Hi, When I want to modify a datawindow, then it's just dw1.modify() But what do I have to do when I want to modify a datawindow in a datwindow ? I tried : dw1.dw2.modify() but that doesn't work. Anyone can help me out with this ? thanks. Regards, David get the dw via getchild & apply modify In article <4575976f.4dda.1681692777@sybase.com>, David says... > Hi, > When I want to modify a datawindow, then it's just > dw1.modify() > > But what do I have to do when I want to modify a datawindow > in a datwindow ? > I tried : dw...

datawindows in composite datawindow used in datawindow.NET, are not sliding up
Hi, Problem: datawindows in composite datawindow used in "datawindow.NET", are not sliding up , if one dw is not visible or did not retrieve data. Resulting in unwanted spaces. The height of blank white space is equal to the height of the datawindow art design time. When I looked at the generated JavaScript, I noticed there is "div" for the datawindow with height 0.00in which is supposed to be not visible. Tried different options with html/xhtml/xml same result. But slides up ok when exported to pdf(using saveas) on web and in PB10.5 application. Also s...

Datawindows with child datawindows
I want to create a datawindow whose only data is three columns that will themselves be drop-down data windows. These child datawindows will be populated in PB script with dw_1.GetChild(). When I create that parent datawindow (New | Datawindow | Freeform), what do I choose in the next dialog box ("Which datasource would you like to use?") External? Thanks. That depends on how you want to populate and use the columns of the main DW. The DDDW is an edit style that assists the user in selecting a value for the column in the main DW. If you want to retrieve the values ...

DataWindows and datawindow objects
Difference between Datawindow and datawindowobjects? - datawindow is a control on a userobject or a window - datawindowobject (DWObject) is a control within a datawindow, defined in the dataobject of the datawindow. You refer to it as <datawindow-instance>.Object.<datawindow object> HTH, Ben (bede) <Santhoshi> wrote in message news:3f8bee8b.4631.846930886@sybase.com... > Difference between Datawindow and datawindowobjects? Not exactly; DW Control is a "container" that reserves real-estate on the surface of a visual object. DW Obj...

datawindow
Add direct setting and getting capability for the datawindow where clause. This would have to be a string array in case of unions. Return ONLY the where clause(s) in the main select (in case of sub-selects, ignore the where clause or somehow list it as a subselect in the where or a subselect in the select). It would be great if I could just get and set this as a value and have the datawindow automatically change (or add) the where clause as specified. This is for setting the where clause dynamically at run time. Currently have to parse through the datawindow.table.select looking f...

Web resources about - Getting datawindow Properties from within datawindow?? - sybase.powerbuilder.datawindow

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 12/11/2015 3:14:10 PM