Tab Merge - a new feature in eXpress++

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Tab Merge - a new feature in eXpress++

#1 Post by rdonnay »

Before releasing build 257, I am hoping to get some feedback on a new feature I have added to eXpress++.

Many of you are familiar with DC_MergeGetLists() and the need for this function.
This was added as a necessity after Tom Liehr visited me in Boise, ID about 11 years ago.

It solved a lot of performance problems for eXpress++ users, but it was a bit cumbersome to use for some because it often required passing a lot of local variables by reference.

I got an idea a few days ago after working on a customer's app that took far too long to create a dialog. He had hundreds of objects on 6 tabpages. His code was written in such a way that it would take longer than I wanted to move code around and use DC_MergeGetLists(). Also, there was a problem with resizing. If a tabpage is resized before being clicked on, then the objects on that tabpage are not placed properly.

I believe that I have developed a much simpler solution to both problems.

I have added a new MERGECHILDREN clause to the @..DCTABPAGE command.
This causes DCREAD GUI to ignore creating items in the GetList which are children of a tabpage that uses this clause. The child objects will be created only after the tab is clicked on for the first time. A new ::createChildren() method calls DCREAD GUI to build the child objects on the tabpage if they are not already created.

The advantage of this feature is that a simple clause can be added to exisiting applications to give them improved performance when creating dialogs with tabpages.

To test this feature, here is a download that contains a new DCLIPX.DLL (compiled in build 355) and a DCDIALOG.CH file. The download also contains a sample program.

http://donnay-software.com:8080/donnay/tabmerge.zip

Unzip the tabmerge.zip in your \exp19\samples\tabpage folder and run TABMERGE.EXE.

Look at the below code. It is a sample program that demonstrates this new feature. If you comment out the MERGECHILDREN clauses and rebuild TABMERGE.XPJ, you will see that the load time is much longer.

#INCLUDE "dcdialog.CH"

Code: Select all

FUNCTION Main()

LOCAL GetList[0], oTab1, oTab2, oTab3, oTab4, aData[25,18], i, j, ;
      GetOptions

FOR i := 1 TO 25
  FOR j := 1 TO 18
    aData[i,j] := Space(10)
  NEXT
NEXT

@ 0,0 DCTABPAGE oTab1 CAPTION 'Tab 1' SIZE 190, 30 ;
      RESIZE DCGUI_RESIZE_RESIZEONLY

CreateGets(@oTab1,GetList,aData)

@ 0,0 DCTABPAGE oTab2 CAPTION 'Tab 2' RELATIVE oTab1 ;
      MERGECHILDREN ;
      RESIZE DCGUI_RESIZE_RESIZEONLY

CreateGets(@oTab2,GetList,aData)

@ 0,0 DCTABPAGE oTab3 CAPTION 'Tab 3' RELATIVE oTab2 ;
      MERGECHILDREN ;
      RESIZE DCGUI_RESIZE_RESIZEONLY

CreateGets(@oTab3,GetList,aData)

@ 0,0 DCTABPAGE oTab4 CAPTION 'Tab 4' RELATIVE oTab3 ;
      MERGECHILDREN ;
      RESIZE DCGUI_RESIZE_RESIZEONLY

CreateGets(@oTab4,GetList,aData)

DCGETOPTIONS RESIZE RESIZEDEFAULT DCGUI_RESIZE_REPOSONLY

DCREAD GUI FIT TITLE 'Tab Merge Sample' OPTIONS GetOptions

RETURN nil

* ------------

PROC appsys ; RETURN

* -------------

STATIC FUNCTION CreateGets( oTab, GetList, aData )

LOCAL i, j, oStatic

@ 2,5 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX SIZE 170,25 OBJECT oStatic PARENT oTab

FOR i := 1 TO 20
  FOR j := 1 TO 15
    @ i+2,j*10 DCGET aData[i,j] PARENT oStatic
  NEXT
NEXT

RETURN nil
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Tab Merge - a new feature in eXpress++

#2 Post by Tom »

Looks like a great improvement! Will give it a try asap. :)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Tab Merge - a new feature in eXpress++

#3 Post by rdonnay »

Here's an updated _DCCLASS.PRG and DCLIPX.DLL.

I forgot to apply GetOptions to the merge. Now it works.

http://donnay-software.com:8080/donnay/tabmerge.zip
The eXpress train is coming - and it has more cars.

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Tab Merge - a new feature in eXpress++

#4 Post by bwolfsohn »

Roger,

This sounds great... if i'm reading it correctly, it will solve a lot of performance issues with the opening up of our dialogs.

I'll try it out when i get home from the music festival in kerrville tx...
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Tab Merge - a new feature in eXpress++

#5 Post by rdonnay »

Brian -

You are reading it correctly.
I expect that you will see performance improvements.

Roger
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Tab Merge - a new feature in eXpress++

#6 Post by c-tec »

Hello Roger,
I have also very complex tab dialogs and use the old version with merging getlists for tabs since many years, it works perfect. The new version now can save a lot of coding and so prevent failures.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: Tab Merge - a new feature in eXpress++

#7 Post by RDalzell »

Roger,

Attached are screen captures of a dialog before (original) and after (MergeTab).

As you can see, the screen is not rendered as before.

Rick
Attachments
Mvp110.zip
Soure File
(39.92 KiB) Downloaded 656 times
MergeTab.zip
Screen Captures
(1.1 MiB) Downloaded 641 times

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Tab Merge - a new feature in eXpress++

#8 Post by rdonnay »

I will need to see your code.

Will you be available tomorrow afternoon for a Teamviewer session?
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Tab Merge - a new feature in eXpress++

#9 Post by rdonnay »

Rick -

I would like to understand your problem so I can get this working correctly and get build 257 out the door. Let me know when we can work together online.

Roger
The eXpress train is coming - and it has more cars.

Post Reply