Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Window Resize Service Problems and PB 10.5.1

152 views
Skip to first unread message

Glenn Barber

unread,
Aug 9, 2007, 1:48:20 AM8/9/07
to
I noticed that the pfc 10.5 window resize service does not seem to work
correctly in PB Build 6662 (and 6602).

The of_setresize in pfc_w_master seems to come up with a window size that's
too large, causing contained objects to be downsized on the first window
resize event. (because the pfc_w_master resize event uses the workspace
functions to get the size and these are smaller than the outside window size
captured from the class)

So if you replace this code in of_setresize() >

li_vars = UpperBound ( lcd_class.VariableList )
For li_v = 1 to li_vars
If lcd_class.VariableList[li_v].Name = "width" Then li_origwidth =
Integer ( lcd_class.VariableList[li_v].InitialValue )
If lcd_class.VariableList[li_v].Name = "height" Then li_origheight =
Integer ( lcd_class.VariableList[li_v].InitialValue )
If li_origwidth > 0 And li_origheight > 0 Then Exit
Next

with this >

li_origheight = workspaceheight()
li_origwidth = workspacewidth()

window resize works again.

There are some timing changes that have also occured in the most recent
10.5.1 builds. It seems that the resize event is no longer fired
immediately by code in the open which changes windows size values - causing
resizing to misbehave if you change windows size values in the pfc_preopen.

Bruce Armstrong [TeamSybase]

unread,
Aug 9, 2007, 10:27:11 AM8/9/07
to

What you should consider doing is opening an issue in the PFC project
and submitting the code change there. It's great that you share it
here, but if you want to see it changed in the original PFC code line
then it really needs to be handled through an issue there.

Also, this might be worth reporting to Sybase as a case. What we may
be talking about is changing PFC to work around a bug in a particular
version of PB, one that may be fixed in PB later.

On 8 Aug 2007 22:48:20 -0700, "Glenn Barber"

Glenn Barber

unread,
Aug 9, 2007, 1:20:06 PM8/9/07
to
Thanks Bruce

I did open a case for the change in timing of the resize event - however its
hard to understand why the 10.5 pfc would have worked as it is coded now -
unless it was modified in the past to deal with a problem with the workspace
functions. The of_setresize function uses the class initial size and the
resize event uses the workspace functions - which result in different
values. Obviously the pfc code changed over time - perhaps there was a bug
in the class initialvalue code that allowed it to work which was recently
fixed in PB.

Do you have any history on why the of_setresize() in pfc_w_master was
changed?

I will try to find my way back to codexchange and note the problem - but
without the history for why the of_setresize code had been changed it was
difficult to suggest a solution that might work for everyone.

I noted that in the pb.general forum that there had been a number of
unresolved complaints about resize misbehaviours - so I noted the issues
there - being (believe it or not) unaware of the pfc forum until last
evening. We have been in our own universe on 6.5.1 for something like 10
years. Certainly we had been spoiled with the stability and reliability.
On 10.5.1 the development environment breaks about every 15 minutes with
bizzare bugs almost too innumerable to mention. While you are still at the
conference, please kick somebody about paying a lot more attention to QA on
the development environment. Maybe there's a visual studio version in the
future???

Thanks again for all you support.

"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:kt8mb35ep9tecr104...@4ax.com...

Tim Anders

unread,
Aug 17, 2007, 4:21:56 PM8/17/07
to
Glenn
We had this same problem when we wen from PB 9 to PB 10.5

A sybase Tech Support person gave me this piece of code. paste this into the
of_setresize event.

Hope this helps
Tim Anders

//Sybase tech support provided this fix to a resize problem we had.
//Replace this code with the code commented out below

if ab_Switch then
if IsNull(inv_resize) Or not IsValid (inv_resize) then
inv_resize = create n_cst_resize

/* Get this window's class definition and extract the width and height */

//Changed Code Gwen (Sybase Tech support)
inv_resize.of_SetOrigSize (this.WorkSpaceWidth(), this.WorkSpaceHeight())
li_rc = 1
end if
else
if IsValid (inv_resize) then
destroy inv_resize
li_rc = 1
end if
end If

//Replace this with the code above

//// Check arguments
//if IsNull (ab_switch) then
// return -1
//end if
//
//if ab_Switch then
// if IsNull(inv_resize) Or not IsValid (inv_resize) then
// inv_resize = create n_cst_resize
//
// /* Get this window's class definition and extract the width and height */
// classdefinition lcd_class
// lcd_class = this.ClassDefinition
//
// li_vars = UpperBound ( lcd_class.VariableList )
// For li_v = 1 to li_vars
// If lcd_class.VariableList[li_v].Name = "width" Then li_origwidth = Integer


( lcd_class.VariableList[li_v].InitialValue )

// If lcd_class.VariableList[li_v].Name = "height" Then li_origheight =


Integer ( lcd_class.VariableList[li_v].InitialValue )

// If li_origwidth > 0 And li_origheight > 0 Then Exit
// Next
// inv_resize.of_SetOrigSize ( li_origwidth, li_origheight )
// li_rc = 1
// end if
//else
// if IsValid (inv_resize) then
// destroy inv_resize
// li_rc = 1
// end if
//end If


On 8 Aug 2007 22:48:20 -0700,

in sybase.public.powerbuilder.pfc

0 new messages