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 |
![]() |
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, 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 |
![]() |
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, 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 |
![]() |
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 |
![]() |
> 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, 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 |
![]() |
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 |
![]() |