NetTalk Central

Author Topic: Embed point for all fields  (Read 2811 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1848
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Embed point for all fields
« on: November 28, 2008, 02:28:21 AM »
Hi,
I need to run a routine each time any control is accepted.
Now I´m adding the code in each control in the 2Validate::ControlName Routine
I want to put the code in a single embed.
Which embed must I use?
Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: Embed point for all fields
« Reply #1 on: November 28, 2008, 09:53:45 PM »
Hi Michelis,

I recommend you make a new routine containing the code, and then just add a call to that routine to the various form fields "validate" routines.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1848
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Embed point for all fields
« Reply #2 on: December 01, 2008, 05:16:22 AM »
Hi Bruce,
THats what Im doing...
How About a template check to call a Single routine from each field?
Cheers
Alberto
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1848
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Embed point for all fields
« Reply #3 on: December 01, 2008, 05:25:46 AM »
Forgot to mention... they are 300 (three hundred) fields!
-----------
Regards
Alberto

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Embed point for all fields
« Reply #4 on: December 01, 2008, 07:39:55 AM »
i have often thought it would be nice to have either a generic routine or a tick box on each field to call a generic routine, (perhaps conditional)

I just completed a project where I need to call the same recalc routine for each field, and well there were not 300  fields (yuck)  I did have a lot of pasting the same "do recalc_rtn" code. Felt like a template would save some time...