Home Directory Classifieds Reference Archives
Site Info
About 4DToday.com
Contact Us
Version française
Developers (724)
4D Developers (591)
Web Developers (334)
Tools Publishers (201)
Instructors (166)
Web Hosts (59)
Resellers (91)
Software Publishers (300)
Search Developers
Products (384)
Plug-Ins (104)
Components (48)
Code Libraries (8)
Books (8)
Tools (42)
Vertical Applications (149)
Search Products
User Groups
All User Groups (23)
Classified Ads (10)
Help Wanted (3)
Opportunities Wanted (5)
Hardware Wanted (0)
Hardware for Sale (0)
Software Wanted (0)
Software for Sale (0)
Other (2)
4D, Inc.
4D International
4D Wiki
4D Partner Central
4D Beginner's Center
4D Online Documentation
4D 2004 Example Applications
4D Example Databases
4D BugDisplayer
4D, Inc. Training
Message Lists
4D Mailing Lists
4D Tech Google Group
iNUG Archives (Nabble)
iNUG Archives (Gmane)
iNUG Message Index
4D Code Exchange
4D Resources
Sviluppo4D.it (Italy)
4D Sources (4D Plugin API, 4D Pop & Miyako
To a programmer, Friday just means there are only two working days until Monday.
Tom Dillon  
  Suggest a Quote  
hmExecuter 1.0: Write and debug 4D-Code in compiled applications
Today, heubach media released their latest plugin hmExecuter.   Would you like to know more? Thursday
 Submit Future News    Archive 
Technical Tip
Table and Related One field popup
Submitted by Keith Culotta, Computer Dimensions, Inc.

  // ----------------------------------------------------
  // Method: popup_MenuFromTablePtr - all menu levels
  // --- Create a Dynamic popup menu with Related One fields & get user's selection
  // INPUT1: Pointer - table of origination
  // OUTPUT:  Pointer - to a field
  // ---------------------------------------------------- 
  // --- params passed from this method to itself
  // INPUT2: Pointer - table to build menu for
  // INPUT3: Pointer - array of built menuRef 
  // INPUT4: menuref - attach new menu to 



If (Count parameters>0)

If (Count parameters=1)
ARRAY TEXT($aMenus;0)
$passedMenu:=Create menu
$go:=($tableOrig#$tableWork)  // - check for circular ref
End if 

APPEND TO ARRAY($aMenuPtr->;$passedMenu)

If ($go)
GET FIELD TITLES($tableWork->;$afT;$afN)  // omits invisibles
$size:=Size of array($afN)

For ($i;1;$size)

GET RELATION PROPERTIES($tableNum;$afN{$i};$oneT;$oneF)
$fieldName:=Field name($tableNum;$afN{$i})

If ($oneT=0)
APPEND MENU ITEM($passedMenu;$fieldName)
SET MENU ITEM PARAMETER($passedMenu;-1;String($tableNum)+" "+String($afN{$i}))
$newMenu:=Create menu
popup_MenuFromTablePtr ($tableOrig;Table($oneT);$aMenuPtr;$newMenu)
APPEND MENU ITEM($passedMenu;$fieldName;$newMenu)
End if 

End for 

If ($topLevel)

$ans:=Dynamic pop up menu($passedMenu)

For ($i;1;Size of array($aMenus))
RELEASE MENU($aMenus{$i})
End for 

If ($ans#"")
ARRAY TEXT($aWords;0)
End if 

End if 

End if 

End if 
  Submit a Tip    Archive 
4D Job Wallet
4D Job Wallet 4D Job Wallet - a brand new commercial component for 4D developers which is designed to turn method browsing into a breeze, code sharing into a snap and complexity management into fun.
  Suggest a Spotlight  
Survey Results
This weekend, we asked you...
Have you ever lost a client or bid because 4D was an unknown vendor?
Survey Results

Your vote: (no vote)
Total votes received: 36

Survey submitted by David Eddy
  Suggest a Survey  
There are no events scheduled for the upcoming fortnight.
  Submit an Event