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.

URGENT: Is there any way to display the event script at runtime?

20 posts in Powerscript Last posting was on 2010-06-24 11:35:25.0Z
ChrissDeGrece Posted on 2010-02-01 13:23:09.0Z
From: ChrissDeGrece <chriss_degrece_NOSPAM_@yahoo.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: URGENT: Is there any way to display the event script at runtime?
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b66d5bd$1@forums-1-dub>
Date: 1 Feb 2010 05:23:09 -0800
X-Trace: forums-1-dub 1265030589 10.22.241.152 (1 Feb 2010 05:23:09 -0800)
X-Original-Trace: 1 Feb 2010 05:23:09 -0800, vip152.sybase.com
Lines: 7
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27260
Article PK: 793655

Hi,

Is there any way we can display the event script at runtime?

e.g. Open a window and display its open event script.

Thanks


Jason 'Bug' Fenter [TeamSybase] Posted on 2010-02-01 16:24:07.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub>
In-Reply-To: <4b66d5bd$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b670027$1@forums-1-dub>
Date: 1 Feb 2010 08:24:07 -0800
X-Trace: forums-1-dub 1265041447 10.22.241.152 (1 Feb 2010 08:24:07 -0800)
X-Original-Trace: 1 Feb 2010 08:24:07 -0800, vip152.sybase.com
Lines: 18
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27261
Article PK: 761781

Not the script itself. You can display the object name and method/event
name, though. Either use PopulateError() and inspect the Error object or
create an object of type RunTimeError and inspect its properties.

If you're looking for a more in-depth self-inspection, try exploring the
ClassDefinition object. (Every object has one.) But even with this, you
cannot get the actual human-readable script at runtime.

On 2/1/2010 7:23 AM, ChrissDeGrece wrote:
> Hi,
>
> Is there any way we can display the event script at runtime?
>
> e.g. Open a window and display its open event script.
>
> Thanks


"Paul Horan[Sybase]" <phoran_remove Posted on 2010-02-01 19:56:16.0Z
From: "Paul Horan[Sybase]" <phoran_remove@remove_sybase.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b670027$1@forums-1-dub>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Lines: 31
Organization: Sybase
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Response
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: <4b6731e0$1@forums-1-dub>
Date: 1 Feb 2010 11:56:16 -0800
X-Trace: forums-1-dub 1265054176 10.22.241.152 (1 Feb 2010 11:56:16 -0800)
X-Original-Trace: 1 Feb 2010 11:56:16 -0800, vip152.sybase.com
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27264
Article PK: 761783

Well, PBLPeeper is a PowerBuilder app, and it displays the event/function
script for any object. I wonder how Terry V. does that... I suppose it's
just parsing the source code directly from the PBL?? Which would mean that
you'd have to deploy your PBLs along with your compiled EXEs and PBDs...

--
Paul Horan[Sybase]
http://blogs.sybase.com/phoran/

"Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com> wrote in
message news:4b670027$1@forums-1-dub...
> Not the script itself. You can display the object name and method/event
> name, though. Either use PopulateError() and inspect the Error object or
> create an object of type RunTimeError and inspect its properties.
>
> If you're looking for a more in-depth self-inspection, try exploring the
> ClassDefinition object. (Every object has one.) But even with this, you
> cannot get the actual human-readable script at runtime.
>
>
>
> On 2/1/2010 7:23 AM, ChrissDeGrece wrote:
>> Hi,
>>
>> Is there any way we can display the event script at runtime?
>>
>> e.g. Open a window and display its open event script.
>>
>> Thanks


Ivaylo Ivanov Posted on 2010-02-01 17:02:11.0Z
From: "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b670027$1@forums-1-dub>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Lines: 246
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b670913@forums-1-dub>
Date: 1 Feb 2010 09:02:11 -0800
X-Trace: forums-1-dub 1265043731 10.22.241.152 (1 Feb 2010 09:02:11 -0800)
X-Original-Trace: 1 Feb 2010 09:02:11 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27262
Article PK: 793659

Here I'll show you the technique which Jason proposed with populating object
of type RunTimeError, inspecting its properties and finding the script
definition. To use it, follow these steps:

1) import the attached source code of the global function
f_get_script_source (PB11.5)
2) put the following code anywhere in your application to display the
desired info:

try
string(1/0)
catch (RunTimeError lrte2)
MessageBox("See my source", f_get_script_source(lrte2))
end try

Note the following limitations of the example:
1) The Source property of the ScriptDefinition object corresponding to your
event/function is available only when you're running your application
through the PB IDE, not in the compiled executable!!!
2) Because the RunTimeError object holds just the name of the executing
script, if you're executing a polymorphic function (= function is defined
more than one time under the same name, but with different argument types),
there's no way to tell which is the exact ScriptDefinition object from the
ScriptList[] array of the object's ClassDefinition which corresponds to the
current executing function and therefore the source cannot be properly
obtained.

Regards,
Ivaylo

"Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com> wrote in
message news:4b670027$1@forums-1-dub...
> Not the script itself. You can display the object name and method/event
> name, though. Either use PopulateError() and inspect the Error object or
> create an object of type RunTimeError and inspect its properties.
>
> If you're looking for a more in-depth self-inspection, try exploring the
> ClassDefinition object. (Every object has one.) But even with this, you
> cannot get the actual human-readable script at runtime.
>
>
>
> On 2/1/2010 7:23 AM, ChrissDeGrece wrote:
>> Hi,
>>
>> Is there any way we can display the event script at runtime?
>>
>> e.g. Open a window and display its open event script.
>>
>> Thanks


Ivaylo Ivanov Posted on 2010-02-01 21:57:48.0Z
From: "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b670027$1@forums-1-dub> <4b670913@forums-1-dub>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Lines: 89
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b674e5c$1@forums-1-dub>
Date: 1 Feb 2010 13:57:48 -0800
X-Trace: forums-1-dub 1265061468 10.22.241.152 (1 Feb 2010 13:57:48 -0800)
X-Original-Trace: 1 Feb 2010 13:57:48 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27266
Article PK: 761782

You have a bunch of classes for definition inspection, most of them having
"...Definition" suffix in their names. ScriptDefinition is the one that
holds the Source property for a event/function. However, if we're talking of
an easy runtime inspection, we don't have direct access to the
ScriptDefinition object that corresponds to the currently executing script,
something which is not a problem if we think of the .NET environment. There
you have:
System.Reflection.MethodBase.GetCurrentMethod()
System.Reflection.Assembly.GetExecutingAssembly()
System.Diagnostics.StackTrace
...

If only we had something like:
GetApplication().GetCurrentScript() which returns a ScriptDefinition
object
GetApplication().GetCurrentClass() which returns a ClassDefinition object

Or if we had:
Error.ErrorClassDefinition and Error.ErrorScriptDefinition
RuntimeError.ErrorClassDefinition and
RuntimeError.ErrorScriptDefinition...

... and some array property (GetApplication().StackTrace[]) to act like a
stack trace...wow

then my example would be probably shorter because I wouldn't try to
intentionally raise runtimeerror exceptions, to find the exact
ScriptDefinition, and I wouldn't be limited to reach the exact polymorphic
function definition corresponding to my current event/function.

Just a few thoughts for a better future :-)

"Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> wrote in message
news:4b670913@forums-1-dub...
> Here I'll show you the technique which Jason proposed with populating
> object of type RunTimeError, inspecting its properties and finding the
> script definition. To use it, follow these steps:
>
> 1) import the attached source code of the global function
> f_get_script_source (PB11.5)
> 2) put the following code anywhere in your application to display the
> desired info:
>
> try
> string(1/0)
> catch (RunTimeError lrte2)
> MessageBox("See my source", f_get_script_source(lrte2))
> end try
>
> Note the following limitations of the example:
> 1) The Source property of the ScriptDefinition object corresponding to
> your event/function is available only when you're running your application
> through the PB IDE, not in the compiled executable!!!
> 2) Because the RunTimeError object holds just the name of the executing
> script, if you're executing a polymorphic function (= function is defined
> more than one time under the same name, but with different argument
> types), there's no way to tell which is the exact ScriptDefinition object
> from the ScriptList[] array of the object's ClassDefinition which
> corresponds to the current executing function and therefore the source
> cannot be properly obtained.
>
> Regards,
> Ivaylo
>
> "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com> wrote in
> message news:4b670027$1@forums-1-dub...
>> Not the script itself. You can display the object name and method/event
>> name, though. Either use PopulateError() and inspect the Error object or
>> create an object of type RunTimeError and inspect its properties.
>>
>> If you're looking for a more in-depth self-inspection, try exploring the
>> ClassDefinition object. (Every object has one.) But even with this, you
>> cannot get the actual human-readable script at runtime.
>>
>>
>>
>> On 2/1/2010 7:23 AM, ChrissDeGrece wrote:
>>> Hi,
>>>
>>> Is there any way we can display the event script at runtime?
>>>
>>> e.g. Open a window and display its open event script.
>>>
>>> Thanks
>
>
>


Chris Fauvel Posted on 2010-06-24 03:17:35.0Z
From: "Chris Fauvel" <Chris.Fauvel@gte.net>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b670027$1@forums-1-dub> <4b670913@forums-1-dub> <4b674e5c$1@forums-1-dub>
In-Reply-To: <4b674e5c$1@forums-1-dub>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MIMEOLE: Produced By Microsoft MimeOLE V14.0.8089.726
X-Antivirus: avast! (VPS 100623-1, 06/23/2010), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c22ce4f$1@forums-1-dub>
Date: 23 Jun 2010 20:17:35 -0700
X-Trace: forums-1-dub 1277349455 10.22.241.152 (23 Jun 2010 20:17:35 -0700)
X-Original-Trace: 23 Jun 2010 20:17:35 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27396
Article PK: 761840

with PB12.net wouldn't you be able to do just that? just asking...I dunno
really

"Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> wrote in message
news:4b674e5c$1@forums-1-dub...
> You have a bunch of classes for definition inspection, most of them having
> "...Definition" suffix in their names. ScriptDefinition is the one that
> holds the Source property for a event/function. However, if we're talking
> of an easy runtime inspection, we don't have direct access to the
> ScriptDefinition object that corresponds to the currently executing
> script, something which is not a problem if we think of the .NET
> environment. There you have:
> System.Reflection.MethodBase.GetCurrentMethod()
> System.Reflection.Assembly.GetExecutingAssembly()
> System.Diagnostics.StackTrace
> ...
>
> If only we had something like:
> GetApplication().GetCurrentScript() which returns a ScriptDefinition
> object
> GetApplication().GetCurrentClass() which returns a ClassDefinition
> object
>
> Or if we had:
> Error.ErrorClassDefinition and Error.ErrorScriptDefinition
> RuntimeError.ErrorClassDefinition and
> RuntimeError.ErrorScriptDefinition...
>
> ... and some array property (GetApplication().StackTrace[]) to act like a
> stack trace...wow
>
> then my example would be probably shorter because I wouldn't try to
> intentionally raise runtimeerror exceptions, to find the exact
> ScriptDefinition, and I wouldn't be limited to reach the exact polymorphic
> function definition corresponding to my current event/function.
>
> Just a few thoughts for a better future :-)
>
> "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> wrote in message
> news:4b670913@forums-1-dub...
>> Here I'll show you the technique which Jason proposed with populating
>> object of type RunTimeError, inspecting its properties and finding the
>> script definition. To use it, follow these steps:
>>
>> 1) import the attached source code of the global function
>> f_get_script_source (PB11.5)
>> 2) put the following code anywhere in your application to display the
>> desired info:
>>
>> try
>> string(1/0)
>> catch (RunTimeError lrte2)
>> MessageBox("See my source", f_get_script_source(lrte2))
>> end try
>>
>> Note the following limitations of the example:
>> 1) The Source property of the ScriptDefinition object corresponding to
>> your event/function is available only when you're running your
>> application through the PB IDE, not in the compiled executable!!!
>> 2) Because the RunTimeError object holds just the name of the executing
>> script, if you're executing a polymorphic function (= function is defined
>> more than one time under the same name, but with different argument
>> types), there's no way to tell which is the exact ScriptDefinition object
>> from the ScriptList[] array of the object's ClassDefinition which
>> corresponds to the current executing function and therefore the source
>> cannot be properly obtained.
>>
>> Regards,
>> Ivaylo
>>
>> "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com> wrote in
>> message news:4b670027$1@forums-1-dub...
>>> Not the script itself. You can display the object name and method/event
>>> name, though. Either use PopulateError() and inspect the Error object or
>>> create an object of type RunTimeError and inspect its properties.
>>>
>>> If you're looking for a more in-depth self-inspection, try exploring the
>>> ClassDefinition object. (Every object has one.) But even with this, you
>>> cannot get the actual human-readable script at runtime.
>>>
>>>
>>>
>>> On 2/1/2010 7:23 AM, ChrissDeGrece wrote:
>>>> Hi,
>>>>
>>>> Is there any way we can display the event script at runtime?
>>>>
>>>> e.g. Open a window and display its open event script.
>>>>
>>>> Thanks
>>
>>
>>
>
>


Ivaylo Ivanov Posted on 2010-06-24 11:35:25.0Z
From: "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b670027$1@forums-1-dub> <4b670913@forums-1-dub> <4b674e5c$1@forums-1-dub> <4c22ce4f$1@forums-1-dub>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Lines: 118
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c2342fd$1@forums-1-dub>
Date: 24 Jun 2010 04:35:25 -0700
X-Trace: forums-1-dub 1277379325 10.22.241.152 (24 Jun 2010 04:35:25 -0700)
X-Original-Trace: 24 Jun 2010 04:35:25 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27398
Article PK: 761841

With my thoughts for the .NET environment:
System.Reflection.MethodBase.GetCurrentMethod()
System.Reflection.Assembly.GetExecutingAssembly()
System.Diagnostics.StackTrace

I meant PB Classic .NET targets - WEBFORM, WINFORM etc. I can utilize the
methods/properties above, but not in a pure PBNATIVE - we're slightly
limited there.

I'm not familiar with the exact PB12.NET variant but would suppose that the
technique would be very similar and easy one using .net reflection and
runtime.

Regards,
Ivaylo

"Chris Fauvel" <Chris.Fauvel@gte.net> wrote in message
news:4c22ce4f$1@forums-1-dub...
> with PB12.net wouldn't you be able to do just that? just asking...I dunno
> really
>
> "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> wrote in message
> news:4b674e5c$1@forums-1-dub...
>> You have a bunch of classes for definition inspection, most of them
>> having "...Definition" suffix in their names. ScriptDefinition is the one
>> that holds the Source property for a event/function. However, if we're
>> talking of an easy runtime inspection, we don't have direct access to the
>> ScriptDefinition object that corresponds to the currently executing
>> script, something which is not a problem if we think of the .NET
>> environment. There you have:
>> System.Reflection.MethodBase.GetCurrentMethod()
>> System.Reflection.Assembly.GetExecutingAssembly()
>> System.Diagnostics.StackTrace
>> ...
>>
>> If only we had something like:
>> GetApplication().GetCurrentScript() which returns a ScriptDefinition
>> object
>> GetApplication().GetCurrentClass() which returns a ClassDefinition
>> object
>>
>> Or if we had:
>> Error.ErrorClassDefinition and Error.ErrorScriptDefinition
>> RuntimeError.ErrorClassDefinition and
>> RuntimeError.ErrorScriptDefinition...
>>
>> ... and some array property (GetApplication().StackTrace[]) to act like a
>> stack trace...wow
>>
>> then my example would be probably shorter because I wouldn't try to
>> intentionally raise runtimeerror exceptions, to find the exact
>> ScriptDefinition, and I wouldn't be limited to reach the exact
>> polymorphic function definition corresponding to my current
>> event/function.
>>
>> Just a few thoughts for a better future :-)
>>
>> "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> wrote in message
>> news:4b670913@forums-1-dub...
>>> Here I'll show you the technique which Jason proposed with populating
>>> object of type RunTimeError, inspecting its properties and finding the
>>> script definition. To use it, follow these steps:
>>>
>>> 1) import the attached source code of the global function
>>> f_get_script_source (PB11.5)
>>> 2) put the following code anywhere in your application to display the
>>> desired info:
>>>
>>> try
>>> string(1/0)
>>> catch (RunTimeError lrte2)
>>> MessageBox("See my source", f_get_script_source(lrte2))
>>> end try
>>>
>>> Note the following limitations of the example:
>>> 1) The Source property of the ScriptDefinition object corresponding to
>>> your event/function is available only when you're running your
>>> application through the PB IDE, not in the compiled executable!!!
>>> 2) Because the RunTimeError object holds just the name of the executing
>>> script, if you're executing a polymorphic function (= function is
>>> defined more than one time under the same name, but with different
>>> argument types), there's no way to tell which is the exact
>>> ScriptDefinition object from the ScriptList[] array of the object's
>>> ClassDefinition which corresponds to the current executing function and
>>> therefore the source cannot be properly obtained.
>>>
>>> Regards,
>>> Ivaylo
>>>
>>> "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com> wrote in
>>> message news:4b670027$1@forums-1-dub...
>>>> Not the script itself. You can display the object name and method/event
>>>> name, though. Either use PopulateError() and inspect the Error object
>>>> or
>>>> create an object of type RunTimeError and inspect its properties.
>>>>
>>>> If you're looking for a more in-depth self-inspection, try exploring
>>>> the
>>>> ClassDefinition object. (Every object has one.) But even with this, you
>>>> cannot get the actual human-readable script at runtime.
>>>>
>>>>
>>>>
>>>> On 2/1/2010 7:23 AM, ChrissDeGrece wrote:
>>>>> Hi,
>>>>>
>>>>> Is there any way we can display the event script at runtime?
>>>>>
>>>>> e.g. Open a window and display its open event script.
>>>>>
>>>>> Thanks
>>>
>>>
>>>
>>
>>


Terry Dykstra [TeamSybase] Posted on 2010-02-01 17:53:13.0Z
Reply-To: "Terry Dykstra [TeamSybase]" <dontreply_tddykstra@forestoil.ca.x>
From: "Terry Dykstra [TeamSybase]" <tddykstra@forestoil.ca>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b670027$1@forums-1-dub> <4b670913@forums-1-dub>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3598
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b671509$1@forums-1-dub>
Date: 1 Feb 2010 09:53:13 -0800
X-Trace: forums-1-dub 1265046793 10.22.241.152 (1 Feb 2010 09:53:13 -0800)
X-Original-Trace: 1 Feb 2010 09:53:13 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27263
Article PK: 793656

You might want to checkout Rex. It allows you to inspect a lot of things at
runtime.
http://www.visual-expert.com/us/info/detailed_features_rex.htm

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com> wrote in message
news:4b670913@forums-1-dub...
> Here I'll show you the technique which Jason proposed with populating
> object of type RunTimeError, inspecting its properties and finding the
> script definition. To use it, follow these steps:
>
> 1) import the attached source code of the global function
> f_get_script_source (PB11.5)
> 2) put the following code anywhere in your application to display the
> desired info:
>
> try
> string(1/0)
> catch (RunTimeError lrte2)
> MessageBox("See my source", f_get_script_source(lrte2))
> end try
>
> Note the following limitations of the example:
> 1) The Source property of the ScriptDefinition object corresponding to
> your event/function is available only when you're running your application
> through the PB IDE, not in the compiled executable!!!
> 2) Because the RunTimeError object holds just the name of the executing
> script, if you're executing a polymorphic function (= function is defined
> more than one time under the same name, but with different argument
> types), there's no way to tell which is the exact ScriptDefinition object
> from the ScriptList[] array of the object's ClassDefinition which
> corresponds to the current executing function and therefore the source
> cannot be properly obtained.
>
> Regards,
> Ivaylo
>
> "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com> wrote in
> message news:4b670027$1@forums-1-dub...
>> Not the script itself. You can display the object name and method/event
>> name, though. Either use PopulateError() and inspect the Error object or
>> create an object of type RunTimeError and inspect its properties.
>>
>> If you're looking for a more in-depth self-inspection, try exploring the
>> ClassDefinition object. (Every object has one.) But even with this, you
>> cannot get the actual human-readable script at runtime.
>>
>>
>>
>> On 2/1/2010 7:23 AM, ChrissDeGrece wrote:
>>> Hi,
>>>
>>> Is there any way we can display the event script at runtime?
>>>
>>> e.g. Open a window and display its open event script.
>>>
>>> Thanks
>
>
>


Roland Smith [TeamSybase] Posted on 2010-02-01 20:33:44.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Response
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: <4b673aa8$1@forums-1-dub>
Date: 1 Feb 2010 12:33:44 -0800
X-Trace: forums-1-dub 1265056424 10.22.241.152 (1 Feb 2010 12:33:44 -0800)
X-Original-Trace: 1 Feb 2010 12:33:44 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27265
Article PK: 761785

For what purpose?

Without the source code, you would need a decompiler as source code is not
in the depoyed app.

"ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
news:4b66d5bd$1@forums-1-dub...
> Hi,
>
> Is there any way we can display the event script at runtime?
>
> e.g. Open a window and display its open event script.
>
> Thanks


ChrissDeGrece Posted on 2010-02-03 08:32:19.0Z
From: ChrissDeGrece <chriss_degrece_NOSPAM_@yahoo.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub>
In-Reply-To: <4b673aa8$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b693493@forums-1-dub>
Date: 3 Feb 2010 00:32:19 -0800
X-Trace: forums-1-dub 1265185939 10.22.241.152 (3 Feb 2010 00:32:19 -0800)
X-Original-Trace: 3 Feb 2010 00:32:19 -0800, vip152.sybase.com
Lines: 29
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27275
Article PK: 793663

Thank you all for the replies.

BTW, it seems that the source code is included with the PBDs, as I tried
ShuDePB and it successfully DE-compiled a pbd but it has a 30 lines demo
limitation.

The actual problem is there is a very old project for which the sources
are probably lost. So I am looking for a way to read the the code inside
those PBDs.

Thanks again

Roland Smith [TeamSybase] wrote:
> For what purpose?
>
> Without the source code, you would need a decompiler as source code is not
> in the depoyed app.
>
> "ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
> news:4b66d5bd$1@forums-1-dub...
>> Hi,
>>
>> Is there any way we can display the event script at runtime?
>>
>> e.g. Open a window and display its open event script.
>>
>> Thanks
>
>


Jason 'Bug' Fenter [TeamSybase] Posted on 2010-02-03 15:20:08.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub>
In-Reply-To: <4b693493@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b699428$1@forums-1-dub>
Date: 3 Feb 2010 07:20:08 -0800
X-Trace: forums-1-dub 1265210408 10.22.241.152 (3 Feb 2010 07:20:08 -0800)
X-Original-Trace: 3 Feb 2010 07:20:08 -0800, vip152.sybase.com
Lines: 35
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27277
Article PK: 761789

Now why would a decompiler have in its EULA a clause keeping you from
decompiling it?

On 2/3/2010 2:32 AM, ChrissDeGrece wrote:
> Thank you all for the replies.
>
> BTW, it seems that the source code is included with the PBDs, as I tried
> ShuDePB and it successfully DE-compiled a pbd but it has a 30 lines demo
> limitation.
>
> The actual problem is there is a very old project for which the sources
> are probably lost. So I am looking for a way to read the the code inside
> those PBDs.
>
> Thanks again
>
> Roland Smith [TeamSybase] wrote:
>> For what purpose?
>>
>> Without the source code, you would need a decompiler as source code is
>> not in the depoyed app.
>>
>> "ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
>> news:4b66d5bd$1@forums-1-dub...
>>> Hi,
>>>
>>> Is there any way we can display the event script at runtime?
>>>
>>> e.g. Open a window and display its open event script.
>>>
>>> Thanks
>>
>>


ChrissDeGrece Posted on 2010-02-04 05:30:40.0Z
From: ChrissDeGrece <chriss_degrece_NOSPAM_@yahoo.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub> <4b699428$1@forums-1-dub>
In-Reply-To: <4b699428$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b6a5b80$1@forums-1-dub>
Date: 3 Feb 2010 21:30:40 -0800
X-Trace: forums-1-dub 1265261440 10.22.241.152 (3 Feb 2010 21:30:40 -0800)
X-Original-Trace: 3 Feb 2010 21:30:40 -0800, vip152.sybase.com
Lines: 38
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27290
Article PK: 793675

Almost all EULAs mention that :)

Jason 'Bug' Fenter [TeamSybase] wrote:
> Now why would a decompiler have in its EULA a clause keeping you from
> decompiling it?
>
>
>
> On 2/3/2010 2:32 AM, ChrissDeGrece wrote:
>> Thank you all for the replies.
>>
>> BTW, it seems that the source code is included with the PBDs, as I tried
>> ShuDePB and it successfully DE-compiled a pbd but it has a 30 lines demo
>> limitation.
>>
>> The actual problem is there is a very old project for which the sources
>> are probably lost. So I am looking for a way to read the the code inside
>> those PBDs.
>>
>> Thanks again
>>
>> Roland Smith [TeamSybase] wrote:
>>> For what purpose?
>>>
>>> Without the source code, you would need a decompiler as source code is
>>> not in the depoyed app.
>>>
>>> "ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
>>> news:4b66d5bd$1@forums-1-dub...
>>>> Hi,
>>>>
>>>> Is there any way we can display the event script at runtime?
>>>>
>>>> e.g. Open a window and display its open event script.
>>>>
>>>> Thanks
>>>
>>>


Jason 'Bug' Fenter [TeamSybase] Posted on 2010-02-04 15:16:23.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub> <4b699428$1@forums-1-dub> <4b6a5b80$1@forums-1-dub>
In-Reply-To: <4b6a5b80$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b6ae4c7@forums-1-dub>
Date: 4 Feb 2010 07:16:23 -0800
X-Trace: forums-1-dub 1265296583 10.22.241.152 (4 Feb 2010 07:16:23 -0800)
X-Original-Trace: 4 Feb 2010 07:16:23 -0800, vip152.sybase.com
Lines: 42
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27293
Article PK: 793672

The irony just caught me as a bit funny.

On 2/3/2010 11:30 PM, ChrissDeGrece wrote:
> Almost all EULAs mention that :)
>
> Jason 'Bug' Fenter [TeamSybase] wrote:
>> Now why would a decompiler have in its EULA a clause keeping you from
>> decompiling it?
>>
>>
>>
>> On 2/3/2010 2:32 AM, ChrissDeGrece wrote:
>>> Thank you all for the replies.
>>>
>>> BTW, it seems that the source code is included with the PBDs, as I tried
>>> ShuDePB and it successfully DE-compiled a pbd but it has a 30 lines demo
>>> limitation.
>>>
>>> The actual problem is there is a very old project for which the sources
>>> are probably lost. So I am looking for a way to read the the code inside
>>> those PBDs.
>>>
>>> Thanks again
>>>
>>> Roland Smith [TeamSybase] wrote:
>>>> For what purpose?
>>>>
>>>> Without the source code, you would need a decompiler as source code is
>>>> not in the depoyed app.
>>>>
>>>> "ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
>>>> news:4b66d5bd$1@forums-1-dub...
>>>>> Hi,
>>>>>
>>>>> Is there any way we can display the event script at runtime?
>>>>>
>>>>> e.g. Open a window and display its open event script.
>>>>>
>>>>> Thanks
>>>>
>>>>


Chris Keating (Sybase iAnywhere) Posted on 2010-02-04 15:38:16.0Z
From: "Chris Keating (Sybase iAnywhere)" <keating_nospam@sybase.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub> <4b699428$1@forums-1-dub> <4b6a5b80$1@forums-1-dub> <4b6ae4c7@forums-1-dub>
In-Reply-To: <4b6ae4c7@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b6ae9e8$1@forums-1-dub>
Date: 4 Feb 2010 07:38:16 -0800
X-Trace: forums-1-dub 1265297896 10.22.241.152 (4 Feb 2010 07:38:16 -0800)
X-Original-Trace: 4 Feb 2010 07:38:16 -0800, vip152.sybase.com
Lines: 48
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27295
Article PK: 793677

Likely the result of a reverse engineered license agreement :-)

Jason 'Bug' Fenter [TeamSybase] wrote:
> The irony just caught me as a bit funny.
>
>
> On 2/3/2010 11:30 PM, ChrissDeGrece wrote:
>> Almost all EULAs mention that :)
>>
>> Jason 'Bug' Fenter [TeamSybase] wrote:
>>> Now why would a decompiler have in its EULA a clause keeping you from
>>> decompiling it?
>>>
>>>
>>>
>>> On 2/3/2010 2:32 AM, ChrissDeGrece wrote:
>>>> Thank you all for the replies.
>>>>
>>>> BTW, it seems that the source code is included with the PBDs, as I
>>>> tried
>>>> ShuDePB and it successfully DE-compiled a pbd but it has a 30 lines
>>>> demo
>>>> limitation.
>>>>
>>>> The actual problem is there is a very old project for which the sources
>>>> are probably lost. So I am looking for a way to read the the code
>>>> inside
>>>> those PBDs.
>>>>
>>>> Thanks again
>>>>
>>>> Roland Smith [TeamSybase] wrote:
>>>>> For what purpose?
>>>>>
>>>>> Without the source code, you would need a decompiler as source code is
>>>>> not in the depoyed app.
>>>>>
>>>>> "ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
>>>>> news:4b66d5bd$1@forums-1-dub...
>>>>>> Hi,
>>>>>>
>>>>>> Is there any way we can display the event script at runtime?
>>>>>>
>>>>>> e.g. Open a window and display its open event script.
>>>>>>
>>>>>> Thanks
>>>>>
>>>>>


Ivaylo Ivanov Posted on 2010-02-03 15:16:58.0Z
From: "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b69936a$1@forums-1-dub>
Date: 3 Feb 2010 07:16:58 -0800
X-Trace: forums-1-dub 1265210218 10.22.241.152 (3 Feb 2010 07:16:58 -0800)
X-Original-Trace: 3 Feb 2010 07:16:58 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27276
Article PK: 793665

The source code is not included in the PBDs:

http://infocenter.sybase.com/help/topic/com.sybase.dc37774_1150/html/apptech/BJFBGHBG.htm

The decompilers don't have this information. Probably they act like some
Java ones - restoring command-by-command from a bytecode. And not speaking
of a possible restore for any comment block of the original source code.

Regards,
Ivaylo

"ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
news:4b693493@forums-1-dub...
> Thank you all for the replies.
>
> BTW, it seems that the source code is included with the PBDs, as I tried
> ShuDePB and it successfully DE-compiled a pbd but it has a 30 lines demo
> limitation.
>
> The actual problem is there is a very old project for which the sources
> are probably lost. So I am looking for a way to read the the code inside
> those PBDs.
>
> Thanks again
>
> Roland Smith [TeamSybase] wrote:
>> For what purpose?
>>
>> Without the source code, you would need a decompiler as source code is
>> not in the depoyed app.
>>
>> "ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
>> news:4b66d5bd$1@forums-1-dub...
>>> Hi,
>>>
>>> Is there any way we can display the event script at runtime?
>>>
>>> e.g. Open a window and display its open event script.
>>>
>>> Thanks
>>


Arthur Hefti Posted on 2010-02-03 15:54:41.0Z
From: "Arthur Hefti" <arthur@catsoft.ch>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub> <4b69936a$1@forums-1-dub>
User-Agent: XanaNews/1.18.1.6
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b699c41$1@forums-1-dub>
Date: 3 Feb 2010 07:54:41 -0800
X-Trace: forums-1-dub 1265212481 10.22.241.152 (3 Feb 2010 07:54:41 -0800)
X-Original-Trace: 3 Feb 2010 07:54:41 -0800, vip152.sybase.com
Lines: 50
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27278
Article PK: 761788

Shu can't restore comments but the rest is the code you wrote. I guess
PB saves a bit more than just byte code in the pbd.

Arthur
--

Ivaylo Ivanov wrote:

> The source code is not included in the PBDs:
>
> http://infocenter.sybase.com/help/topic/com.sybase.dc37774_1150/html/a
> pptech/BJFBGHBG.htm
>
> The decompilers don't have this information. Probably they act like
> some Java ones - restoring command-by-command from a bytecode. And
> not speaking of a possible restore for any comment block of the
> original source code.
>
> Regards,
> Ivaylo
>
> "ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
> news:4b693493@forums-1-dub...
> > Thank you all for the replies.
> >
> > BTW, it seems that the source code is included with the PBDs, as I
> > tried ShuDePB and it successfully DE-compiled a pbd but it has a
> > 30 lines demo limitation.
> >
> > The actual problem is there is a very old project for which the
> > sources are probably lost. So I am looking for a way to read the
> > the code inside those PBDs.
> >
> > Thanks again
> >
> > Roland Smith [TeamSybase] wrote:
> > > For what purpose?
> > >
> > > Without the source code, you would need a decompiler as source
> > > code is not in the depoyed app.
> > >
> >>"ChrissDeGrece" <chriss_degrece_NOSPAM_@yahoo.com> wrote in message
> news:4b66d5bd$1@forums-1-dub...
> > > > Hi,
> > > >
> > > > Is there any way we can display the event script at runtime?
> > > >
> > > > e.g. Open a window and display its open event script.
> > > >
> > > > Thanks
> > >


Jason 'Bug' Fenter [TeamSybase] Posted on 2010-02-03 17:06:56.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub> <4b69936a$1@forums-1-dub> <4b699c41$1@forums-1-dub>
In-Reply-To: <4b699c41$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b69ad30$1@forums-1-dub>
Date: 3 Feb 2010 09:06:56 -0800
X-Trace: forums-1-dub 1265216816 10.22.241.152 (3 Feb 2010 09:06:56 -0800)
X-Original-Trace: 3 Feb 2010 09:06:56 -0800, vip152.sybase.com
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27279
Article PK: 761791

Is that true for apps deployed WITHOUT checking the "Enable DEBUG
symbol" option in the project painter?

On 2/3/2010 9:54 AM, Arthur Hefti wrote:
> Shu can't restore comments but the rest is the code you wrote. I guess
> PB saves a bit more than just byte code in the pbd.
>
> Arthur


Arthur Hefti Posted on 2010-02-03 20:05:38.0Z
From: "Arthur Hefti" <arthur@catsoft.ch>
Subject: Re: URGENT: Is there any way to display the event script at runtime?
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub> <4b69936a$1@forums-1-dub> <4b699c41$1@forums-1-dub> <4b69ad30$1@forums-1-dub>
User-Agent: XanaNews/1.18.1.6
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b69d712@forums-1-dub>
Date: 3 Feb 2010 12:05:38 -0800
X-Trace: forums-1-dub 1265227538 10.22.241.152 (3 Feb 2010 12:05:38 -0800)
X-Original-Trace: 3 Feb 2010 12:05:38 -0800, vip152.sybase.com
Lines: 76
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27283
Article PK: 761792

Yes.
Just look at the sample of the generated PB App template a bit further
down. Shu does a great job in decompiling PB5 TO 12. Don't get me
wrong, I don't support folks who decompile and steal property of others
but it's a fact that this can and will happen.
Shu does this for PB but with the .NET code PB can generate (and will
in the future) it's even easier. Java has it's decompilers as well.
For each of these languages there are tools available that prevent
decompiling or make it hard to read the decompiled source (e.g: for PB:
PBProtect, for .NET: Skater, for Java: Allatori). In my opinion we have
to think a step further than just deploy and try to protect our
intelectual property agains theft.
I wrote an article in PBDJ covering this issue:
http://pbdj.sys-con.com/node/1099710

Regards
Arthur


--- Orginal Source Code from PB ---
//*-----------------------------------------------------------------*/
//* of_OpenAllSheets: Open an instance of every registered sheet
//*-----------------------------------------------------------------*/
int li_rc, li_return=1
long ll_s, ll_sheets

ll_sheets = UpperBound ( is_sheets )

For ll_s = 1 to ll_sheets

of_OpenSheet ( is_sheets[ll_s] )

If li_rc <> 1 Then
/* Save error return code */
li_return = li_rc
End If

Next

Return li_return

--- Decompiled Source Code from Shu's decompiler ---
//Public function of_openallsheets (none) returns integer
integer li_rc
integer li_return=1
long ll_s
long ll_sheets


ll_sheets = upperbound(THIS.is_sheets)
FOR ll_s = 1 TO ll_sheets //1
of_opensheet(THIS.is_sheets[ll_s])
IF li_rc <> 1 THEN //3
li_return = li_rc
END IF //3
NEXT //1
RETURN li_return



--

Jason 'Bug' Fenter [TeamSybase] wrote:

> Is that true for apps deployed WITHOUT checking the "Enable DEBUG
> symbol" option in the project painter?
>
>
>
> On 2/3/2010 9:54 AM, Arthur Hefti wrote:
> > Shu can't restore comments but the rest is the code you wrote. I
> > guess PB saves a bit more than just byte code in the pbd.
> >
> > Arthur


Jason 'Bug' Fenter [TeamSybase] Posted on 2010-02-03 22:01:12.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub> <4b69936a$1@forums-1-dub> <4b699c41$1@forums-1-dub> <4b69ad30$1@forums-1-dub> <4b69d712@forums-1-dub>
In-Reply-To: <4b69d712@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b69f228@forums-1-dub>
Date: 3 Feb 2010 14:01:12 -0800
X-Trace: forums-1-dub 1265234472 10.22.241.152 (3 Feb 2010 14:01:12 -0800)
X-Original-Trace: 3 Feb 2010 14:01:12 -0800, vip152.sybase.com
Lines: 66
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27286
Article PK: 793668

I wasn't trying to defend anything. I was honestly curious. Thank you
for finding the answer.

On 2/3/2010 2:05 PM, Arthur Hefti wrote:
> Yes.
> Just look at the sample of the generated PB App template a bit further
> down. Shu does a great job in decompiling PB5 TO 12. Don't get me
> wrong, I don't support folks who decompile and steal property of others
> but it's a fact that this can and will happen.
> Shu does this for PB but with the .NET code PB can generate (and will
> in the future) it's even easier. Java has it's decompilers as well.
> For each of these languages there are tools available that prevent
> decompiling or make it hard to read the decompiled source (e.g: for PB:
> PBProtect, for .NET: Skater, for Java: Allatori). In my opinion we have
> to think a step further than just deploy and try to protect our
> intelectual property agains theft.
> I wrote an article in PBDJ covering this issue:
> http://pbdj.sys-con.com/node/1099710
>
> Regards
> Arthur
>
>
> --- Orginal Source Code from PB ---
> //*-----------------------------------------------------------------*/
> //* of_OpenAllSheets: Open an instance of every registered sheet
> //*-----------------------------------------------------------------*/
> int li_rc, li_return=1
> long ll_s, ll_sheets
>
> ll_sheets = UpperBound ( is_sheets )
>
> For ll_s = 1 to ll_sheets
>
> of_OpenSheet ( is_sheets[ll_s] )
>
> If li_rc<> 1 Then
> /* Save error return code */
> li_return = li_rc
> End If
>
> Next
>
> Return li_return
>
> --- Decompiled Source Code from Shu's decompiler ---
> //Public function of_openallsheets (none) returns integer
> integer li_rc
> integer li_return=1
> long ll_s
> long ll_sheets
>
>
> ll_sheets = upperbound(THIS.is_sheets)
> FOR ll_s = 1 TO ll_sheets //1
> of_opensheet(THIS.is_sheets[ll_s])
> IF li_rc<> 1 THEN //3
> li_return = li_rc
> END IF //3
> NEXT //1
> RETURN li_return
>
>
>


ChrissDeGrece Posted on 2010-02-04 05:31:26.0Z
From: ChrissDeGrece <chriss_degrece_NOSPAM_@yahoo.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: URGENT: Is there any way to display the event script at runtime?
References: <4b66d5bd$1@forums-1-dub> <4b673aa8$1@forums-1-dub> <4b693493@forums-1-dub> <4b69936a$1@forums-1-dub> <4b699c41$1@forums-1-dub>
In-Reply-To: <4b699c41$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b6a5bae$1@forums-1-dub>
Date: 3 Feb 2010 21:31:26 -0800
X-Trace: forums-1-dub 1265261486 10.22.241.152 (3 Feb 2010 21:31:26 -0800)
X-Original-Trace: 3 Feb 2010 21:31:26 -0800, vip152.sybase.com
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27291
Article PK: 793670

Yes, that's absolutely true.

Arthur Hefti wrote:
> Shu can't restore comments but the rest is the code you wrote. I guess
> PB saves a bit more than just byte code in the pbd.
>
> Arthur