welcome
play

Welcome 9 2 0 1 Hello Agenda 19/06/2019 Registration & - PowerPoint PPT Presentation

Welcome 9 2 0 1 Hello Agenda 19/06/2019 Registration & Welcome Practical presentations Part 1 Lunch time Abdelhafid El Hour Practical presentations Part 2 Development engineer Q&A with your 4D team 2 9 0 1


  1. Welcome 9 2 0 1 Hello

  2. Agenda 19/06/2019 • Registration & Welcome • Practical presentations Part 1 • Lunch time Abdelhafid El Hour • Practical presentations Part 2 Development engineer • Q&A with your 4D team 2 9 0 1

  3. My Town library

  4. Managing municipal library 2 9 0 1

  5. Sharing

  6. Shared objects / collections $sharedObject:= New shared object Locking identifier negative $sharedCollection:= New shared collection $sharedCollection. push ($sharedObject) $sharedObject and $sharedCollection make a shared group. They share the same locking identifier 2 9 0 1

  7. Nesting shared object -27 28 Shared group Shared Object / Collection 28 28 Shared group Shared group 29 28 Shared group Shared group 2 9 0 1

  8. Create table Use is necessary -17 Storage Use ( Storage ) Storage .tables:= New shared collection $tables -28 $tables:= Storage .tables $table -29 30 End use 30 STOP Use ($tables) //----------------- BOOK -------------- $table:= New shared object Use ($table) $table.dataclass:="Book" $table.label:="Livre" $table.name:="title" $callback -30 $table.perspective:="Catalogue" $table.panel:="Book_panel" $table.countFormat:="### ### ##0 books;;" $callback:= New shared object $table.callback:=$callback $formula:= New formula ( Author_load ) $table.callback.load:=$formula End use $tables. push ($table) 2 9 0 1 end use

  9. Create table -17 Storage Use ( Storage ) Storage .tables:= New shared collection $tables -28 29 $tables:= Storage .tables End use 29 $table -29 Use ($tables) //----------------- BOOK -------------- 29 $callback -30 $table:= New shared object Use ($table) $table.dataclass:="Book" $table.label:="Livre" $table.name:="title" $table.perspective:="Catalogue" $table.panel:="Book_panel" $table.countFormat:="### ### ##0 books;;" $callback:= New shared object $table.callback:=$callback $formula:= New formula ( Author_load ) $table.callback.load:=$formula End use $tables. push ($table) 2 9 0 1 end use

  10. Exception -17 Storage Shared object Storage don’t shard its locking with other objects Locking identifier negative -28 Objet partagé Collection partagée -29 Objet partagé 30 30 Objet partagé 30 Objet partagé 2 9 0 1

  11. Panels

  12. lb_items My town library initialization : sfw_fill_lb_items clic : pup_perspective sfw_display_item clic : sfw_fill_lb_tables lb_tables initialization : sfw_fill_lb_tables clic : clic : sfw_fill_lb_items sfw_fill_lb_items 2 9 0 1

  13. Form and subform Widget in the form of object type ‘Subform container’ OBJECT SET SUBFORM (*;"sf_panel";"Author_panel") 2 9 0 1

  14. Form and subform Subform container How we can access to the ‘Form’ of the subForm ? Form Form Subform instance Form C_POINTER ($subForm) $subForm:= OBJECT Get pointer (Object named;"sf_panel") $subForm->entity:= Form .entity $subForm->UUID:= Form .UUID $subForm->currentTable:= Form .currentTable $subForm is a pointer to an object 2 9 0 1

  15. Form un subform Form Form Subform instance Form Object method of the Method object container C_POINTER ($subForm) $evt:= Form event Case of : ($evt=-1000) $subForm:= OBJECT Get pointer (Object current) $evt:= Form event Case of Form .entity:=$subForm->entity : ($evt=On Data Change) Form .UUID:=$subForm->UUID CALL SUBFORM CONTAINER (-1000) Form .currentTable:=$subForm->currentTable End case End case 2 9 0 1 Code executed in the parent form context

  16. 4D Write Pro

  17. Reference your texts Use bookmarks Associate a bookmark to a text Form method $section:= WP Get section ( Form .booksDoc;$i) $rangeSection:= WP Create range ($section;wk start text;wk end text) WP CREATE BOOKMARK ($rangeSection;$categoriesfromServer[$i-1].name) ………………………………. $_ptr_bookmarks:= OBJECT Get pointer (Object named;"bookmarks") ARRAY TEXT ($_ptr_bookmarks->;0) WP GET BOOKMARKS ( Form .booksDoc;$_ptr_bookmarks->) 2 9 0 1

  18. Reference your texts Use bookmarks Object method ‘bookmarks’ C_OBJECT ($wpRange) Case of : ( Form event =On Data Change) $_ptr_bookmarks:= OBJECT Get pointer (Object named;"bookmarks") $bookMark:=$_ptr_bookmarks->{$_ptr_bookmarks->} Range referenced by bookmark $wpRange:= WP Get bookmark range ( Form .booksDoc;$bookMark) WP SELECT ( Form .booksDoc;$wpRange) End case Select a range 2 9 0 1

  19. Organize your pages with tables Form method $picture:= ds .Image. get ($book.images.thumbnail.record).thumbnail` Hide the borders $WPTableDescription:= WP Insert table ($WPRange;wk append) WP Table append row ($WPTableDescription;$picture;$book.description) $cells:= WP Table get cells ($WPTableDescription;1;1;MAXLONG;MAXLONG) WP SET ATTRIBUTES ($cells;wk border color;"white") $fcolumn:= WP Table get columns ($WPTableDescription;2;1) WP SET ATTRIBUTES ($fcolumn;wk width;"380pt") $scolumn:= WP Table get columns ($WPTableDescription;1;1) Change the width WP GET ATTRIBUTES ($scolumn;wk width;$width) of the image WP SET ATTRIBUTES ($WPTableDescription;wk vertical align;wk top) $oPicts:= WP Create picture range ($scolumn) WP SET ATTRIBUTES ($oPicts;wk width;$width) 2 9 0 1

  20. Customize the context menu Use actions https://doc.4d.com/4Dv17/4D/17.1/Actions-standard.300-4201167.fr.html $contextualMenu:= Create menu APPEND MENU ITEM ($contextualMenu;ak standard action title) SET MENU ITEM PROPERTY ($contextualMenu;-1;Associated standard action;ak copy) Limit users action APPEND MENU ITEM ($contextualMenu;ak standard action title) SET MENU ITEM PROPERTY ($contextualMenu;-1;Associated standard action;ak cut) APPEND MENU ITEM ($contextualMenu;ak standard action title) SET MENU ITEM PROPERTY ($contextualMenu;-1;Associated standard action;ak paste) APPEND MENU ITEM ($contextualMenu;"-") APPEND MENU ITEM ($contextualMenu;ak standard action title) Uncheck the context SET MENU ITEM PROPERTY ($contextualMenu;-1;Associated standard action;ak font style) menu $menuSubSize:= Create menu APPEND MENU ITEM ($menuSubSize;ak standard action title) SET MENU ITEM PROPERTY ($menuSubSize;-1;Associated standard action;"fontSize?value=10pt") APPEND MENU ITEM ($menuSubSize;ak standard action title) SET MENU ITEM PROPERTY ($menuSubSize;-1;Associated standard action;"fontSize?value=12pt") APPEND MENU ITEM ($menuSubSize;ak standard action title) SET MENU ITEM PROPERTY ($menuSubSize;-1;Associated standard action;"fontSize?value=14pt") APPEND MENU ITEM ($menuSubSize;ak standard action title) SET MENU ITEM PROPERTY ($menuSubSize;-1;Associated standard action;"fontSize?value=16pt") APPEND MENU ITEM ($contextualMenu;"Size";$menuSubSize) APPEND MENU ITEM ($contextualMenu;"-") Case of : ( Form event =On Clicked) APPEND MENU ITEM ($contextualMenu;ak standard action title) 2 9 0 1 SET MENU ITEM PROPERTY ($contextualMenu;-1;Associated standard action;"visibleHiddenChars") If ( Contextual click ) Form .contextualMenu:=$contextualMenu Dynamic pop up menu ( Form .contextualMenu) End if End case

  21. Serveur Web 4D

  22. Empire of Magic Dimensions of Humor Linguistic Theories of Humor An Anatomy of Humor Text Types and Corpora Path / Query Parameters License to Laugh The iPhone Pocket Guide Head First PHP MySQL Class Actions Action Theory The God of the ‘Path' Prophets The X-Discipline Path to a resource Essentials of Shinto Dimensions of Humor Identity Poetics Linguistic Theories of Translation Humor Complex Inequality An Anatomy of Humor The Pervasive Image http://monsite.com/books?page=3 Text Types and Corpora Horizons in License to Laugh Hermeneutics The iPhone Pocket The Arts in Education Guide Interacting with Video Head First PHP International Domain name Query String Adventures Seven Types of Adventure Tale Frightening Fiction Beyond the Cyborg Emmanuel Levinas Empire of Magic Dimensions of Humor Linguistic Theories of 2 9 0 1 Humor An Anatomy of Humor Text Types and Corpora License to Laugh The iPhone Pocket

  23. Path / Query Parameters http://localhost:8080/books/0ougn1 Path parameter //4DRouting {"path" : "/books/:permalink", "restrict" : true} Request object $permalink:=routing_request.pathParams.permalink 2 9 0 1

  24. Load router swfw_load_router {"permalink" : 1} //4DRouting {"path" : "/books/:permalink", "restrict" : true} 2 9 0 1

  25. Match urls //4DRouting {"path" : "/books/:permalink", "restrict" : true} http://localhost:8080/books/0ougn1 ["books", ":permalink" ] swfw_findHandlerRequest ["books", "0ougn1" ] 2 9 0 1

  26. Get path parameters http://localhost:8080/books/0ougn1 swfw_dispatcher ["books", "0ougn1" ] {"permalink" : 1} {"permalink" : "0ougn1"} 2 9 0 1

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend