1 / 31

Session No. E179 Advanced Infomaker With The Help Of Its Friend Powerbuilder

Session No. E179 Advanced Infomaker With The Help Of Its Friend Powerbuilder. Terry Dykstra Database Administrator Canadian Forest Oil Ltd. Calgary, AB tddykstra@forestoil.ca. Advanced Infomaker With The Help Of Its Friend Powerbuilder. Customizing Infomaker. Three methods

nancy
Download Presentation

Session No. E179 Advanced Infomaker With The Help Of Its Friend Powerbuilder

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Session No. E179Advanced Infomaker With The Help Of Its Friend Powerbuilder Terry Dykstra Database Administrator Canadian Forest Oil Ltd. Calgary, AB tddykstra@forestoil.ca

  2. Advanced Infomaker With The Help Of Its Friend Powerbuilder

  3. Customizing Infomaker • Three methods • Custom formstyles • Modifying imstyle9.pbl • Modifying the environment

  4. Custom Form Styles • What is a custom form style? • A window + A menuWindow needs to be saved with a comment starting with:‘Style:’ …..

  5. Freeform Gridstyle One-to-many Many-to-one dw_freeform dw_grid; dw_freeform dw_master_12many; dw_detail_12many dw_master_many21; dw_detail_many21 Custom Form Styles Datawindow control naming conventions

  6. Custom Form Styles Other rules • Command buttons on forms use “Actions” • An “Action” = public function on the window

  7. Custom Form Styles Demo 1 Standard Formstyle

  8. Custom Form Styles Demo 1 • PB versus IM library painter • Quick build using freeform w_form1 • Add an “Action” • Save using comment ‘style:demo1” • Build a form in IM • Notice that SQL painter gets invoked automatically

  9. Custom Form Styles • Non standard forms • Using non standard dw-control naming convention • No need to code SQLCA • IM will add code automatically: • call super::opendw_drilldown.SetTransObject(sqlca)dw_drilldown.Retrieve()

  10. Custom Form Styles • Non standard forms • Two functions are automatically created: • Close() • Print_setup()

  11. Custom Form Styles Demo 2 Non Standard Formstyle

  12. Custom Form Styles Demo 2 • Quick build using w_drilldown • Notice the following in PB: • No code in open event of w_drilldown • Notice the following in IM: • The SQL painter does not get invoked • In the IM form code has been generated automatically

  13. Modifying Imstyle9.pbl • What is imstyle9.pbl? • Class library • Determines the functionality of executables created • Does not affect the development environment, except for forms

  14. Modifying Imstyle9.pbl • Why modify imstyle9.pbl? • Provide additional functionality, e.g.: • custom saveas(xml!) • e-mail • easy filter screen • Work around bugs, issues, e.g.: • groupcalc() after retrieve()

  15. Modifying Imstyle9.pbl • What are the limitations? • Cannot modify the default application script • Cannot modify the default project. Creates 1 exe using machine code • No pbd, pbr • but you can use SetLibraryList() in w_pbstyle_ancestor_frame

  16. Modifying Imstyle9.pbl • What are the limitations cont’d? • No dynamic assignments, e.g.: • dw_1.dataobject = “d_myreport” • Upgrading to newer version of Infomaker requires you to redo all your work in the new imstyleX.pbl. Get PBDelta (www.pbdr.com) • No global variables • No global external function declaration

  17. Customizing Imstyle9.pbl Demo 3 Easy Filter / Saveas (XML)

  18. Modifying The Environment • What they did not teach you at “Sybase University” • Disclaimer:This is totally unsupported!No guarantee this will work in the futureProceed with caution!

  19. Modifying The Environment • Understanding toolbars • Where are toolbar settings stored? • [Hkey_current_user\Software\Sybase\Infomaker\9.0\Toolbar] • Toolbars are identified by numbers • Icons on the toolbar are in the ‘Items’ string value • Default toolbars might not be shown in the registry

  20. Infomaker 1000 Powerbar 1004 Library 1007 Report 1010 Form Powerbuilder 1000 Powerbar 1011 Library 1006 Datawindow 1037 Window Modifying The Environment • Understanding toolbars

  21. Modifying The Environment • Understanding items on the toolbar • 3 or 4 digit number • -1 for separator • Examples: • 1468: tab order • 1476: picturehyperlink • 1614: export

  22. Modifying The Environment • Understanding items on the toolbar cont’d • Many will crash IM, e.g. 1076: project • Others will fail, e.g. 1618: Import • Some will do nothing, e.g. 1622: check in

  23. Modifying The Environment • Understanding layouts • Where are default layout settings stored? • [Hkey_current_user\Software\Sybase\Infomaker\9.0\layout\default] • Where are custom layout settings stored? • [Hkey_current_user\Software\Sybase\Infomaker\9.0\layout\form] • [Hkey_current_user\Software\Sybase\Infomaker\9.0\layout\datawindow]

  24. Modifying The Environment • Changing layouts • Borrow the default layout from PB Window registry • Apply to the custom IM form layout • Magic happens: you can now write code in IM forms!

  25. Modifying The Environment • Changing layouts • Limitation: • When you create a new form in IM, you must use the default format.If you try to build a form using the custom (ie script enabled) format, it will fail!

  26. Modifying The Environment Demo 4

  27. Debugging Infomaker • Default Application Open script: • window w_localToolBarText=TrueExeName="xim.exe"IniName="xim.ini"….. • connect;if sqlca.sqlcode = 0 thenOpenWithParm(w_local,ExeName,"w_pbstyle_frame")else…..

  28. Debugging Infomaker • There is no w_pbstyle_frame in • imstyle9.pbl or • the Infomaker user’s pbl • It exists in the executable created by Infomaker!

  29. Debugging Infomaker

  30. Debugging Infomaker • Include the exe in your library list • The target needs to include: • yourimwork.pbl • imstyle9.pbl • yourimwork.exe • Now you can debug your code • You can even look at the code in the exe!

More Related