NetTalk Central

Author Topic: NT5 and Message Class  (Read 3213 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NT5 and Message Class
« on: December 06, 2009, 05:42:49 AM »
I´m changing the Message Class deriving the Message method like:

p_web.Message PROCEDURE(String p_div,<String p_message>,<String p_class>,Long p_Send=0)

ReturnValue          ANY

  CODE
  p_class='MyMessageClass'   !<<<<<<<<<< line added
  ! Parent Call
  ReturnValue = PARENT.Message(p_div,p_message,p_class,p_Send)


It compiles and work ok in NT4, but its not working in NT5, with firebug the NT4 line looks like:

<div class="MyMessageClass" id="alert_div">Login Failed. Try Again.</div>

and with NT5:

<div class="" id="alert_div">Login Failed. Try Again.</div>


Any other place wher I can change the message class?

Thanks
Alberto


« Last Edit: December 06, 2009, 05:50:44 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT5 and Message Class
« Reply #1 on: December 06, 2009, 09:17:55 PM »
Hi Alberto,

I'll need to test - but a quick look at the code shows no real change on my side that should affect you.

However I notice, you're assigning a value to a string parameter - that's not a good idea because you don't know how
long the string parameter is. Rather call the parent call directly with the new parameter, and Return before the generated call.  ie

p_web.Message PROCEDURE(String p_div,<String p_message>,<String p_class>,Long p_Send=0)

ReturnValue          ANY

  CODE
  ReturnValue = PARENT.Message(p_div,'MyMessageClass',p_class,p_Send)
  Return ReturnValue
  ! Parent Call


Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT5 and Message Class
« Reply #2 on: December 07, 2009, 02:58:07 AM »
Hi Bruce,

You are right, Its working now.

Thanks
Alberto
-----------
Regards
Alberto