Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

can't get dataobject in script

9 posts in DataWindow Last posting was on 2009-06-18 13:07:37.0Z
Jose Posted on 2009-06-17 13:42:06.0Z
Sender: 20c4.4a38f14c.1804289383@sybase.com
From: Jose
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: can't get dataobject in script
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a38f2ae.21bf.1681692777@sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 17 Jun 2009 06:42:06 -0700
X-Trace: forums-3-dub.sybase.com 1245246126 10.22.241.188 (17 Jun 2009 06:42:06 -0700)
X-Original-Trace: 17 Jun 2009 06:42:06 -0700, forums-3-dub.sybase.com
Lines: 6
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89501
Article PK: 418691

I'm trying to get the dataobject of a dw in script. I've
tried
ls_daob = dw_x.DataObject; null object reference
ls_dao = dw_x.Describe("datawindow.objects") same thing
I know this can be done, but I'm not having any luck.
I can easily assign the dataobject to the dw control.


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-06-17 14:47:43.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a38f2ae.21bf.1681692777@sybase.com>
Subject: Re: can't get dataobject in script
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a39020f$3@forums-3-dub.sybase.com>
Date: 17 Jun 2009 07:47:43 -0700
X-Trace: forums-3-dub.sybase.com 1245250063 10.22.241.152 (17 Jun 2009 07:47:43 -0700)
X-Original-Trace: 17 Jun 2009 07:47:43 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89508
Article PK: 418699

dw_x.dataobject should work, unless you built the DW with CREATE rather than
assign a dataobject.

--
Report Bugs: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

<Jose> wrote in message news:4a38f2ae.21bf.1681692777@sybase.com...
> I'm trying to get the dataobject of a dw in script. I've
> tried
> ls_daob = dw_x.DataObject; null object reference
> ls_dao = dw_x.Describe("datawindow.objects") same thing
> I know this can be done, but I'm not having any luck.
> I can easily assign the dataobject to the dw control.


Jose Posted on 2009-06-17 17:02:06.0Z
Sender: 43b5.4a39211e.1804289383@sybase.com
From: Jose
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: can't get dataobject in script
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a39218e.4407.1681692777@sybase.com>
References: <4a39020f$3@forums-3-dub.sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 17 Jun 2009 10:02:06 -0700
X-Trace: forums-3-dub.sybase.com 1245258126 10.22.241.188 (17 Jun 2009 10:02:06 -0700)
X-Original-Trace: 17 Jun 2009 10:02:06 -0700, forums-3-dub.sybase.com
Lines: 4
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89511
Article PK: 418701

I didn't use Create. I assign the dataobject in script and
later I want to know which dataobject is in the dw so I can
check various pieces of data that are diff. on each. I know
this should work. Any other ideas?


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-06-17 17:27:30.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a39020f$3@forums-3-dub.sybase.com> <4a39218e.4407.1681692777@sybase.com>
Subject: Re: can't get dataobject in script
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a392782@forums-3-dub.sybase.com>
Date: 17 Jun 2009 10:27:30 -0700
X-Trace: forums-3-dub.sybase.com 1245259650 10.22.241.152 (17 Jun 2009 10:27:30 -0700)
X-Original-Trace: 17 Jun 2009 10:27:30 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89512
Article PK: 418702

Have you successfully done SetTransObject?
Otherwise you might try setting an instance variable each time you set
dataobject. Clumsy, but effective.
--
Report Bugs: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

<Jose> wrote in message news:4a39218e.4407.1681692777@sybase.com...
>I didn't use Create. I assign the dataobject in script and
> later I want to know which dataobject is in the dw so I can
> check various pieces of data that are diff. on each. I know
> this should work. Any other ideas?


KL Posted on 2009-06-17 19:32:52.0Z
Sender: 4d3a.4a37d548.1804289383@sybase.com
From: KL
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: can't get dataobject in script
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a3944e4.5d07.1681692777@sybase.com>
References: <4a392782@forums-3-dub.sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 17 Jun 2009 12:32:52 -0700
X-Trace: forums-3-dub.sybase.com 1245267172 10.22.241.188 (17 Jun 2009 12:32:52 -0700)
X-Original-Trace: 17 Jun 2009 12:32:52 -0700, forums-3-dub.sybase.com
Lines: 22
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89514
Article PK: 418705

Use debug to check if somewhere you missed an assignment (or
a datawindow did not get included) and indeed
dw_x.DataObject is null!

HTH KL

> Have you successfully done SetTransObject?
> Otherwise you might try setting an instance variable each
> time you set dataobject. Clumsy, but effective.
> --
> Report Bugs: http://case-express.sybase.com/cx/welcome.do
> Product Enhancement Requests:
> http://my.isug.com/cgi-bin/1/c/submit_enhancement
>
>
> <Jose> wrote in message
> news:4a39218e.4407.1681692777@sybase.com... >I didn't use
> > Create. I assign the dataobject in script and later I
> > want to know which dataobject is in the dw so I can
> check various pieces of data that are diff. on each. I
> > know this should work. Any other ideas?
>
>


"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel Posted on 2009-06-17 20:09:52.0Z
From: "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a392782@forums-3-dub.sybase.com> <4a3944e4.5d07.1681692777@sybase.com>
Subject: Re: can't get dataobject in script
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a394d90@forums-3-dub.sybase.com>
Date: 17 Jun 2009 13:09:52 -0700
X-Trace: forums-3-dub.sybase.com 1245269392 10.22.241.152 (17 Jun 2009 13:09:52 -0700)
X-Original-Trace: 17 Jun 2009 13:09:52 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89517
Article PK: 418707

You can use IsValid (dw_1.Object) to test for that condition. I've done that
when the DWO name was retrieved from the database to fail gracefully in case
of entry error.

--
Report Bugs: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

<KL> wrote in message news:4a3944e4.5d07.1681692777@sybase.com...
> Use debug to check if somewhere you missed an assignment (or
> a datawindow did not get included) and indeed
> dw_x.DataObject is null!
>
> HTH KL
>> Have you successfully done SetTransObject?
>> Otherwise you might try setting an instance variable each
>> time you set dataobject. Clumsy, but effective.
>> --
>> Report Bugs: http://case-express.sybase.com/cx/welcome.do
>> Product Enhancement Requests:
>> http://my.isug.com/cgi-bin/1/c/submit_enhancement
>>
>>
>> <Jose> wrote in message
>> news:4a39218e.4407.1681692777@sybase.com... >I didn't use
>> > Create. I assign the dataobject in script and later I
>> > want to know which dataobject is in the dw so I can
>> check various pieces of data that are diff. on each. I
>> > know this should work. Any other ideas?
>>
>>


Chris Pollach Posted on 2009-06-17 17:49:38.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a38f2ae.21bf.1681692777@sybase.com>
Subject: Re: can't get dataobject in script
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a392cb2$1@forums-3-dub.sybase.com>
Date: 17 Jun 2009 10:49:38 -0700
X-Trace: forums-3-dub.sybase.com 1245260978 10.22.241.152 (17 Jun 2009 10:49:38 -0700)
X-Original-Trace: 17 Jun 2009 10:49:38 -0700, vip152.sybase.com
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89513
Article PK: 418703

Hi Jose;

If you are getting a NULL Object reference error anytime you reference
the "DW_X" object - then you did not either:

1) Issue a CREATE on "dw_x".
2) Include "dw_x" as a DW Control within a Window / User object.
3) If "dw_x" is a pointer - you never loaded the address of a valid DW
Control.

HTH

PS: Check this out in the debugger

--
Regards ... Chris
ISUG - NA RUG Director
http://chrispollach.pbdjmagazine.com

<Jose> wrote in message news:4a38f2ae.21bf.1681692777@sybase.com...
> I'm trying to get the dataobject of a dw in script. I've
> tried
> ls_daob = dw_x.DataObject; null object reference
> ls_dao = dw_x.Describe("datawindow.objects") same thing
> I know this can be done, but I'm not having any luck.
> I can easily assign the dataobject to the dw control.


Jose Posted on 2009-06-17 19:49:25.0Z
Sender: 43b5.4a39211e.1804289383@sybase.com
From: Jose
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: can't get dataobject in script
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a3948c5.5feb.1681692777@sybase.com>
References: <4a392cb2$1@forums-3-dub.sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 17 Jun 2009 12:49:25 -0700
X-Trace: forums-3-dub.sybase.com 1245268165 10.22.241.188 (17 Jun 2009 12:49:25 -0700)
X-Original-Trace: 17 Jun 2009 12:49:25 -0700, forums-3-dub.sybase.com
Lines: 8
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89515
Article PK: 418706

I'm a little embarassed to admit this, but... The save
button is inherited. It calls ancestor script which saves
and closes the window the dw is on, so by the time the
script returns from the ancestor nothing exists ( of course
). It all happens so fast I didn't notice that. I don't
know what made me think to check for that, maybe because I
know getting the dataobject works. Just not this time.
Thanks for all the suggestions, this is a great group.


Chris Pollach Posted on 2009-06-18 13:07:37.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4a392cb2$1@forums-3-dub.sybase.com> <4a3948c5.5feb.1681692777@sybase.com>
Subject: Re: can't get dataobject in script
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a3a3c19@forums-3-dub.sybase.com>
Date: 18 Jun 2009 06:07:37 -0700
X-Trace: forums-3-dub.sybase.com 1245330457 10.22.241.152 (18 Jun 2009 06:07:37 -0700)
X-Original-Trace: 18 Jun 2009 06:07:37 -0700, vip152.sybase.com
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89519
Article PK: 418708

ROFL ... been there done that - thank God for "Over-Ride with callback"
using SUPER::xxxx! :-)

<Jose> wrote in message news:4a3948c5.5feb.1681692777@sybase.com...
> I'm a little embarassed to admit this, but... The save
> button is inherited. It calls ancestor script which saves
> and closes the window the dw is on, so by the time the
> script returns from the ancestor nothing exists ( of course
> ). It all happens so fast I didn't notice that. I don't
> know what made me think to check for that, maybe because I
> know getting the dataobject works. Just not this time.
> Thanks for all the suggestions, this is a great group.