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.

LibraryImport a Window Object

2 posts in General Discussion Last posting was on 2009-01-30 16:05:08Z
Gary Posted on 2009-01-30 15:54:18Z
From: "Gary" <gary-r@vips.com>
Newsgroups: sybase.public.powerbuilder.general
Organization: 63.68.149.36
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: LibraryImport a Window Object
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <498322aa$1@forums-1-dub>
Date: 30 Jan 2009 07:54:18 -0800
X-Trace: forums-1-dub 1233330858 10.22.241.152 (30 Jan 2009 07:54:18 -0800)
X-Original-Trace: 30 Jan 2009 07:54:18 -0800, vip152.sybase.com
Lines: 32
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:220528
Article PK: 671081

Hello Colleagues,

As part of our Section 508 (Disability Act) compliance effort, I am developing a
utility that will parse the source code in PowerBuilder Libraries (PBL) and
pullout all visual objects and controls on those objects. The utility will then
display the various properties, including the accessibility properties in a grid
for all controls on visual objects. The utility also provides the ability to
programmatically or manually set and modify properties and then apply them back
into the source code (PBLs) .

I have the following 2 questions:
1) I am using the LibraryExport function to extract the objects out of PBLs.
This function exports all supported objects such as Windows, DataWindows,
UserObjects, Functions, Menus, etc… However, the LibraryImport function, which I
will use to save the modified source code back to the PBL only support
DataWindow objects. I found this very limiting. You can export all objects, but
only import DW? Is there a way to programmatically import other objects back
into a PBL? I can do it manually by creating source code files and then right
clicking on the PBL to import, but that just seems archaic.

2) This utility will also provide the ability to preview the objects as they
appear at design time. For DataWindows, this is fairly easy, because I can use
the source code syntax along with the Create() method to build the datawindow
object. However, I have not seen a way to generate a Window or UserObject based
on the source code. It would be similar to what PowerBuilder does when you
preview a Window at design time through the IDE.

Thanks for any help.
Hopefully, when I finish this utility I will be able to provide it to the user
community and it might save someone a headache.

Gary


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2009-01-30 16:05:08Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: LibraryImport a Window Object
References: <498322aa$1@forums-1-dub>
In-Reply-To: <498322aa$1@forums-1-dub>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49832534$1@forums-1-dub>
Date: 30 Jan 2009 08:05:08 -0800
X-Trace: forums-1-dub 1233331508 10.22.241.152 (30 Jan 2009 08:05:08 -0800)
X-Original-Trace: 30 Jan 2009 08:05:08 -0800, vip152.sybase.com
Lines: 45
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:220529
Article PK: 671083

1) LibraryImport() only supports DataWindows because all other objects
are stored as both source text and binary object information. Every time
you save an object, it gets compiled. LibraryImport() doesn't compile
anything (nor could it). You might use OrcaScript instead.

2) The easiest method I can think of to accomplish this is to add the
"inspected" library to your tool's library path. Then, you have access
to open and use every object within it, provided that you also have
access to all of the objects' dependencies.

Gary wrote:
> Hello Colleagues,
>
> As part of our Section 508 (Disability Act) compliance effort, I am developing a
> utility that will parse the source code in PowerBuilder Libraries (PBL) and
> pullout all visual objects and controls on those objects. The utility will then
> display the various properties, including the accessibility properties in a grid
> for all controls on visual objects. The utility also provides the ability to
> programmatically or manually set and modify properties and then apply them back
> into the source code (PBLs) .
>
> I have the following 2 questions:
> 1) I am using the LibraryExport function to extract the objects out of PBLs.
> This function exports all supported objects such as Windows, DataWindows,
> UserObjects, Functions, Menus, etcÂ… However, the LibraryImport function, which I
> will use to save the modified source code back to the PBL only support
> DataWindow objects. I found this very limiting. You can export all objects, but
> only import DW? Is there a way to programmatically import other objects back
> into a PBL? I can do it manually by creating source code files and then right
> clicking on the PBL to import, but that just seems archaic.
>
> 2) This utility will also provide the ability to preview the objects as they
> appear at design time. For DataWindows, this is fairly easy, because I can use
> the source code syntax along with the Create() method to build the datawindow
> object. However, I have not seen a way to generate a Window or UserObject based
> on the source code. It would be similar to what PowerBuilder does when you
> preview a Window at design time through the IDE.
>
> Thanks for any help.
> Hopefully, when I finish this utility I will be able to provide it to the user
> community and it might save someone a headache.
>
> Gary