How to define stub function which has return type of structu

I write a testing function of_hello() in n_cst_platformwin32 with structure
return type:
	of_hello() Return struct_hello

THEN, I try to write its stub in the n_cst_platform. The struct_hello is defined
in both 

n_cst_platform and n_cst_platformwin32. But when I open and resave the
n_cst_platformwin32, the 

compiler gives the info like "function of_hello differs from ancestor only by
return type".

If I change the struct_hello to common data type (such as integer), the
definitation works.

How to make the stub function in n_cst_platform return structure value?

I'm using PB11.5


Thanks in advance.

David Lee
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp 
0
David
1/5/2011 7:58:27 AM
sybase.powerbuilder.pfc 6437 articles. 1 followers. Follow

2 Replies
307 Views

Similar Articles

[PageSpeed] 14

"David Lee" <xia8844a@sina.com> wrote in message 
news:4d2424a3$1@forums-1-dub...
>
> I write a testing function of_hello() in n_cst_platformwin32 with 
> structure
> return type:
> of_hello() Return struct_hello
>
> THEN, I try to write its stub in the n_cst_platform. The struct_hello is 
> defined
> in both
>
> n_cst_platform and n_cst_platformwin32. But when I open and resave the
> n_cst_platformwin32, the
>
> compiler gives the info like "function of_hello differs from ancestor only 
> by
> return type".
>
> If I change the struct_hello to common data type (such as integer), the
> definitation works.
>
> How to make the stub function in n_cst_platform return structure value?
>
> I'm using PB11.5

Your first problem is that you are incorrectly using n_cst_platformwin32 in 
a PB10+ application.  You shouldn't - you should be using 
n_cst_platformunicode.  You can search the newsgroups for the correct method 
of instantiating the platform object that is appropriate for your 
version/OS.  In PB10+, that will create a n_cst_platformunicode object.

The primary problem is that structures defined in classes are private to the 
class and their definition cannot be shared.  In the User's Guide, you can 
find the following note:  "No access to object-level structures outside the 
object You cannot make object-level structures accessible outside the object 
because object-level structures are implicitly private."

The way around this is to define a global structure and use it.  Notice that 
PFC itself uses this approach in the platform classes (e.g., 
s_pagesetupattrib).  However, I would recommend that you define an NVO for 
this - that gives you inheritance, polymorphism and a much more flexible 
approach. 


0
Scott
1/5/2011 1:50:38 PM
Thanks, Scott, you give me a clear view.


On 5 Jan 2011 05:50:38 -0800,
 in sybase.public.powerbuilder.pfc
Scott Morris <bogus@bogus.com> wrote: 
>"David Lee" <xia8844a@sina.com> wrote in message 
>news:4d2424a3$1@forums-1-dub...
>>
>> I write a testing function of_hello() in n_cst_platformwin32 with 
>> structure
>> return type:
>> of_hello() Return struct_hello
>>
>> THEN, I try to write its stub in the n_cst_platform. The struct_hello is 
>> defined
>> in both
>>
>> n_cst_platform and n_cst_platformwin32. But when I open and resave the
>> n_cst_platformwin32, the
>>
>> compiler gives the info like "function of_hello differs from ancestor only 
>> by
>> return type".
>>
>> If I change the struct_hello to common data type (such as integer), the
>> definitation works.
>>
>> How to make the stub function in n_cst_platform return structure value?
>>
>> I'm using PB11.5
>
>Your first problem is that you are incorrectly using n_cst_platformwin32 in 
>a PB10+ application.  You shouldn't - you should be using 
>n_cst_platformunicode.  You can search the newsgroups for the correct method 
>of instantiating the platform object that is appropriate for your 
>version/OS.  In PB10+, that will create a n_cst_platformunicode object.
>
>The primary problem is that structures defined in classes are private to the 
>class and their definition cannot be shared.  In the User's Guide, you can 
>find the following note:  "No access to object-level structures outside the 
>object You cannot make object-level structures accessible outside the object 
>because object-level structures are implicitly private."
>
>The way around this is to define a global structure and use it.  Notice that 
>PFC itself uses this approach in the platform classes (e.g., 
>s_pagesetupattrib).  However, I would recommend that you define an NVO for 
>this - that gives you inheritance, polymorphism and a much more flexible 
>approach. 
>
>
0
David
1/6/2011 2:31:48 AM
Reply:

Similar Artilces:

Calling MSSql User Defined Functions from Powerbuilder not returning proper decimal value.
Help Sqlserver 2005, Powerbuilder 9.0.2 and connected via the older MSS DB driver I have a Sqlserver user defined scalar function , dbo.fc_bto_agreement_calculated_amt(), that you pass in an ID and returns a MONEY datatype. and for a given agreement id of say 100, I except a value of 123.50 when I define a remote upc for the function in powerbuilder for SQLCA as this Function LONG FC_bto_agreement_calculated_amt(long claimagreement_id) RPCFUNC ALIAS FOR "dbo.fc_bto_agreement_calculated_amt" and test it, I get as expected, just the values to the left of t...

PowerBuilder 11 and .NET: Callback function that passes foreign types to PowerBuilder
Hi I'm using a C# assembly to catch COM events (using IConnectionPoint etc) from a particular API. But instead of handling the events in .NET, I pass the information on back to PB so it simulates a type of callback. It seems to work, but I don't know for how long. This is the one the events that gets raised. The _notifyItemMethod is the name of the method on the PowerBuilder object. The _pbSession is obtained from the .Session property of the PowerBuilder object that I pass to the constructor of the event handler. public void NtfyItem(string oper, int flags, ...

function return types
 i have a function that takes a database table and puts it into a 2d arraythe array looks like this string [] [] array; what return type must the funciton be to return the 2D array so i can use the data elsewhereI hope thats clear?   Ilan Perezweb Developer | Designer Sample:   // return jagged array string[][] MyFunction() { string[][] Data = new string[2][]; Data[0] = new string[2]; Data[1] = new string[2]; Data[1][1] = "Hello"; return Data; }  Steve Wellens My blog...

function return type
Hi. Is it possible to know JavaScript function return type, function parameters types, variable type using SpiderMonkey? Example: function doSomething (Date) { try { var Res = check(Date); switch (Res) { case 1 : return (true); break; case 0: return (false); break; case -1: return ...

Acceptable Return type for Powerbuilder
List, I need some additional bait (not to mention feedback). Information for the return type for a web service call I am making is below. I have been looking at the datatype mappings for PB 10 and unfortunately I do not see org.omg.CORBA.portable.IDLEntity as indicated below. Is org.omg.CORBA.portable.IDLEntity an acceptable data type to us in PB? I have tried in both 9 and 10 and get null object references in both. Thanks in advance for any insight anyone may have. Mike org.hl7.CTSVAPI Class CompleteCodedConceptDescription java.lang.Object org.hl7.CTSVAPI.Comple...

function with return type DropDownList
 Can i do this? 1 private DropDownList getMembers() 2 { 3 dbOperations dbo = new dbOperations(); 4 5 6 try 7 { 8 dbo.openDb(); 9 int Count = 0; 10 string sql = "select u.userid, u.first_name, u.last_name, u.middle_name, m.media_loc from userProfile u, media m where m.media_id = u.display_image "; 11 SqlDataReader data = dbo.readerExecute(sql, true); 12 DropDownList memberDD = new DropDownList(); 13 while (d...

how to write a function with no return type
Hi, i would like to know how to write a function with no return type or return parameter. I would apprecite if an example is given.   Thanks for all your time and effort. Hi, You want to use void as your return parameter. an example could be... private void DoSomething(int MyInt) { // my code } thanks for your quick response but my bad I was not clear in the question. I want how to write a create function in the sql which doesnt have to return anything. I know I can use stored procedure in this case but would like to know how to do in functions.   Thanks once agai...

Define function which return Array
Hi,I want to write function which accepts an integer (AuthorID) and return all (bookid and Nookname) owned by him.I need to define this function in vb file located in APP_Code folder of web application.Now I have 2 Problem. 1- As the result needs 2 Columns and I don’t know the size of  retrieved data , - I think I can’t use Arraylist, or String(XxX)- , Then which control should I use as function output. 2- Is it possible to use SP in this scenario. –Notice that I need Array as output of SP.  Best regards,   Sorry I couldn't figure it out in vb.net but here it is in...

superreview granted: [Bug 248638] HTMLInputElement.type doesn't return the "type of control created" : [Attachment 151711] Always return the actual type
Peter Van der Beken <peterv@propagandism.org> has granted Johnny Stenback <jst@mozilla.jstenback.com>'s request for superreview: Bug 248638: HTMLInputElement.type doesn't return the "type of control created" http://bugzilla.mozilla.org/show_bug.cgi?id=248638 Attachment 151711: Always return the actual type http://bugzilla.mozilla.org/attachment.cgi?id=151711&action=edit ...

superreview requested: [Bug 248638] HTMLInputElement.type doesn't return the "type of control created" : [Attachment 151711] Always return the actual type
Johnny Stenback <jst@mozilla.jstenback.com> has asked Peter Van der Beken <peterv@propagandism.org> for superreview: Bug 248638: HTMLInputElement.type doesn't return the "type of control created" http://bugzilla.mozilla.org/show_bug.cgi?id=248638 Attachment 151711: Always return the actual type http://bugzilla.mozilla.org/attachment.cgi?id=151711&action=edit ...

A return type from a Function that parses XML
I am working on a function that will parse what it gets back from the web tools with USPS.  The format is in xml.  My question is once I parse the xml, how should I return the data?  Meaning, I have this function: public function parsexml (xmlstring) as (something)        ' Code here to do parseing end function An example of whats being returned is <?xml version="1.0"?> <RateV2Response><Package ID="0"><ZipOrigination>10022</ZipOrigination><ZipDestination>20008</ZipDestination><Pounds>10</...

Return table from User Defined Function
I am getting a syntax issue with trying to return a table from my udf...guidance???? My code ALTER FUNCTION "DBA"."fGetDonorSummaries"(@MyParm bit 0) return table #mytemptable ( iPersonID int not null, iConstituentRecordID int not null, iFirstGiftID int null, decFirstAmount decimal null ) as For ASA9 in SELECT allowed used stored procedures, UDF is not permiting return result sets Procedure into plane (analog parameter-view): CREATE PROCEDURE GetDonorSummaries ( IN @MyParm bit // only IN paramatere ) BEGIN // only SELECT, not other code ...

PowerBuilder does not wait for the function to return its value.
Hi I call an Oracle function in PowerBuilder with the code Line 1: LONG retval Line 2: retval = SQLCA.MY_ORA_FUNC(x) Line 3: if retval > 0 then Line 4: // Do some action end if (MY_ORA_FUNC() is declared in the transaction object). For some reason, PB does not wait for the line 2 to be executed and the variable retval to get the return value, but jumps to the line 3. Since retval value is 0 (assigned in line 1), the code in line 4 does not get executed. It only works if i put a messagebox between line 2 and line 3. Can anybody help with that. SQLCA.dBParm = ...

Returning different typed values from a function
I want a function that returns a value from a DataReader, but I want the function to return the correct type of value, e.g. if my column is an Int, I want an Integer returned etc. I want to be able to use my function like: intMyNumber = GetValue("FieldName") or strMyName = GetValue("Name") Is this possible?  I have tried having the GetValue function return an Object, which works, but I can't then assign that directly to an Integer or String.  To make that work I have to use code like: intMyNumber = CInt(GetValue("FieldName")) Note, that this is a general question rather than...

Web resources about - How to define stub function which has return type of structu - sybase.powerbuilder.pfc

Wave function - Wikipedia, the free encyclopedia
... (a ball attached to a spring ) in classical mechanics (A-B) and quantum mechanics (C-H). In quantum mechanics (C-H), the ball has a wave function ...

TV binging, exercise skipping linked to poor cognitive function
... their fit, less TV-addicted counterparts. In particular, couch potatoes had slightly lower brain processing speeds and worse executive function, ...

iPhone best tricks and functions - Business Insider
Your iPhone can do a lot more than you think.

Learning F# – Passing Parameters to Functions
One of the first issues I faced when learning F# was finding out how to specify multiple parameters to a function. While this might sound obvious ...

HPE Offers Catalog of Virtual Network Functions for Telcos
The vendor's OpenNFV Solution Portal gives carriers a single place to find a range of VNFs that are pre-tested to run on their networks.

7 Useful Technical SEO Functions For Your E-commerce Website
This article was co-authored by Mate Dyekiss, SEO Strategist at IMI. An e-commerce website can create all the technical SEO issues onecan imagine: ...

Using AWS Lambda functions to create print ready files
... going to tell you about our processing architecture as well as at a recent performance improvement with the integration of AWS Lambda functions. ...

Madras HC asks police to allow Tipu’s birth anniversary function
... Station on a petition filed by Ismail, General Secretary of Thamizhaga Makkal Jananayaga Katchi, seeking grant of permission to hold the function. ...

Colorado governor: This Planned Parenthood shooting may be a function of inflammatory rhetoric from bloggers ...
Via Grabien , skip to 4:45 of the clip below for the key bit. I naively thought we were (mostly) done with “climate of hate” stupidity after ...

Surprise: Binge-Watching TV May Cause a Decline in Brain Function
With the second season of Transparent only a few days away, some bad news awaits us: According to a recent study and common sense, probably, ...

Resources last updated: 1/2/2016 1:36:32 AM