Issue 15215 - isValid() method does not work with PowerBuilder 9 with OLE
Summary: isValid() method does not work with PowerBuilder 9 with OLE
Status: CLOSED FIXED
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: OOo 1.0.3
Hardware: PC Windows 2000
: P4 Trivial (vote)
Target Milestone: OOo 1.1.1
Assignee: joachim.lingner
QA Contact: issues@api
URL:
Keywords:
: 15216 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-06-02 17:42 UTC by Unknown
Modified: 2004-02-20 14:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
PowerBuilder 9 sample using OLE (7.60 KB, application/octet-stream)
2003-06-02 17:43 UTC, Unknown
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-06-02 17:42:10 UTC
Question for Sun Technical Support
----------------------------------------------------

The lower bound for PowerBuilder arrays is "1" as opposed to the default lower 
bound for Java and Visual Basi arrays of "0"  .  

It appears as though when a word is sent to the isValid() method of OpenOffice 
that it is assuming the lower bound of an array to be "0".   Is there any way 
to make this work with PowerBuilder?   

 Also included is the altered VB sample downloaded from the Sun site that has 
changed the lower bound to a  "1".   This also fails when using the isValid() 
of OpenOffice.

CR316246 is the open PowerBuilder bug number.

Question for Sun Technical Support
----------------------------------------------------

The lower bound for PowerBuilder arrays is "1" as opposed to the default lower 
bound for Java and Visual Basi arrays of "0"  .  

It appears as though when a word is sent to the isValid() method of OpenOffice 
that it is assuming the lower bound of an array to be "0".   Is there any way 
to make this work with PowerBuilder?   

 Also included is the altered VB sample downloaded from the Sun site that has 
changed the lower bound to a  "1".   This also fails when using the isValid() 
of OpenOffice.

CR316246 is the open PowerBuilder bug number.

Question for Sun Technical Support
----------------------------------------------------

The lower bound for PowerBuilder arrays is "1" as opposed to the default lower 
bound for Java and Visual Basi arrays of "0"  .  

It appears as though when a word is sent to the isValid() method of OpenOffice 
that it is assuming the lower bound of an array to be "0".   Is there any way 
to make this work with PowerBuilder?   

 Also included is the altered VB sample downloaded from the Sun site that has 
changed the lower bound to a  "1".   This also fails when using the isValid() 
of OpenOffice.

CR316246 is the open PowerBuilder bug number.

Testcases Provided
--------------------------------

PBOpenOffice.zip contains two zip files.

pb for cr316246.zip  - PowerBuilder application showing behavior in PowerBuilder
vb for cr316246.zip - Visual Basic application with lower bound changed to "1" 

Findings of PowerBuilder Developers
-------------------------------------------------------
After some investigation I found that the isValid() method of spell checker is 
working fine in Visual Basic only if the  lower bound of array subscripts 
is "0". But if we change the lower bound of array subscrips to "1" ( like 
PowerBuilder ) the isValid() method is not working. Please find below the 
source code code for both the cases. 


Steps to Reproduce
------------------------------

1.  Install the 30 day Eval version of PowerBuilder 9.0 available on 
www.sybase.com at http://www.sybase.com/pb9_netqeval
2. Install OpenOffice. 
3. Open PowerBuilder sample case10924014.pbl in PB 9.0 by clicking on the File 
=> Open Workspace and navigating to tryOpenOffice.pbw.
     Click the 'running man' in PB to run the application.
     Click the Run Test button when the window opens.  The command button in 
w_openoffice contains the code logic
4. The return code on Line 62 is NULL
Comment 1 Unknown 2003-06-02 17:43:53 UTC
Created attachment 6598 [details]
PowerBuilder 9 sample using OLE
Comment 2 Unknown 2003-06-02 18:02:08 UTC
Decided that I needed to edit the description and then will resubmit.
Comment 3 ooo 2003-06-03 08:39:23 UTC
language binding issue
Comment 4 joachim.lingner 2003-06-03 11:19:29 UTC
*** Issue 15216 has been marked as a duplicate of this issue. ***
Comment 5 joachim.lingner 2003-06-03 11:37:08 UTC
By declaring an array in VB like this:

Dim objPropertyValue(1) As Object

you declare an array containg two elements (the number one puts into
the parenthesis represents the upper bound and the lower bound is null)

By assigning a value to 

Set objPropertyValue(1) = xxx ' or
 Call objPropertyClass.CreateObject(objPropertyValue(1))

you assign a value to the second entry. 
In your example an array with an uninitialized value at the index 0
was past into isValid which leads to the error.



Comment 6 joachim.lingner 2003-06-03 12:14:03 UTC
Automation bridge fails to convert a SAFEARRAY with an lower bound
other than 0
Comment 7 joachim.lingner 2003-06-03 12:27:50 UTC
If in Visual Basic declared with a lower bound other than 0, then the
array is not properly converted. For example:

Dim myArray(1 To 1)

is not converted correctly.
Comment 8 joachim.lingner 2003-06-03 13:12:53 UTC
Fix committed for VBA Migration target. Need to clarify what OO target
that is.
Comment 9 joachim.lingner 2003-06-03 16:25:20 UTC
The fix will probably be in the first product patch of StarOffice 6.1
and the corresponding OO release.
Comment 10 kay.ramme 2004-01-14 14:17:52 UTC
KR: Retargeted to OOo1.1.1.
Comment 11 joachim.lingner 2004-01-14 15:49:54 UTC
verified in cws ab02vba
Comment 12 joachim.lingner 2004-02-03 15:34:41 UTC
integratet
Comment 13 joachim.lingner 2004-02-03 16:02:53 UTC
opened for integration in OO2
Comment 14 joachim.lingner 2004-02-05 16:03:25 UTC
fixed in cws for 680 m23
Comment 15 joachim.lingner 2004-02-05 16:04:09 UTC
verified on cws jl5vba (680 m23)
Comment 16 joachim.lingner 2004-02-20 14:00:25 UTC
Cloned: i25729