Php function inside class

Hello,
I'm trying to add some custom functions to one class, but I
got one debug error and I can't discover how to supress this
using this piece of code inside fpdf class
$this->pages[$n]->SetMargins(20,47,20,20);
$this->pages[$n]->rodape_continuado('', 7.5, 240, 117);
$this->pages[1]->SetMargins(20,47,20,20);
$this->pages[1]->rodape('', 7.5, 270, 117);
I got on browser this
Fatal error: Call to a member function SetMargins() on a
non-object
the goal is to make all my pages look equal, and then just
change the first one
how can I do this?
many thanks in advance

Why not just set these things through a stylesheet?
Pluda skrev:
> Hello,
>
> I'm trying to add some custom functions to one class,
but I got one debug
> error and I can't discover how to supress this
>
> using this piece of code inside fpdf class
>
> $this->pages[$n]->SetMargins(20,47,20,20);
> $this->pages[$n]->rodape_continuado('', 7.5, 240,
117);
> $this->pages[1]->SetMargins(20,47,20,20);
> $this->pages[1]->rodape('', 7.5, 270, 117);
>
> I got on browser this
>
> Fatal error: Call to a member function SetMargins() on a
non-object
>
> the goal is to make all my pages look equal, and then
just change the first one
>
> how can I do this?
>
> many thanks in advance
>
>
Kim
http://www.geekministry.com

Similar Messages

  • How to call a function inside a class? 

    Hello, i am trying to fire a function onPress .. this
    function is inside a class.
    In this function i refer to another function inside the calss
    to call a Tween. It never arrives in the second function.
    I tried to make an example.
    In the fla file i have:
    var test:makeMovie = new makeMovie(this);
    You will see a red squere and you can press on it. It should
    run the tween class. Am i using the delegate class wrong?

    I always have to use test movie and trace a couple of times
    each time I start to use Delegate.
    It wraps function.apply I think, which I tend to use more
    often.
    try using:
    Container.onPress = Delegate.create(this,setAlpha);
    and then just
    setTween()
    inside your setAlpha....
    That's conceptually how I think I would try it above if I was
    doing something similar.
    I'm not sure it would have the desired effect even if the
    delegate was executed as you have it coded. Unless you want
    setTween's execution scope to be the Container clip in which case
    you might need to do what kglad said and change the Container
    reference to 'this'.
    The way you have it at the moment inside setAlpha the
    Delegate.create is simply creating a function...and not excuting
    it.
    its like : function something(){trace('what')}
    and not like : something();
    Below is some quick code that helps show how things work.
    Notice that I assigned the delegate function to mainFunc....so that
    along with the last example might provide a clue. Just paste it on
    a frame and take a look at what's happening.

  • Call function inside running class

    Hey All,
    i have a two question in classes.
    1- i have class and i called its before and its running on runtime. i need to call function inside this class from another class, but without call the first one again, because if i called it, it will run default class function again
    is this doable ?
    2- What super() mean ?
    Thanks a lot.

    this is the default call, and when i call the method by this way its will run the default class function before call the method.
    here my example:
    i need to call checkboxes  function in ChannelsMain class without pass by the grey script.
    Note: the call_cb is working and the trace is working
    so i now the class is running, i need to call the checkboxes without ( var ci:YourClass = new YourClass(); )
    package com.link
         import fl.controls.CheckBox;
         import flash.events.*;
         public class ChannelsMain
              var cbLength:uint = Main.PV.channel_id.length;
              public function ChannelsMain()
                   // constructor code
                   for (var i:int = 0; i < cbLength; i++)
                        var cb:CheckBox = new CheckBox;
                        cb.name = Main.PV.channel_id[i];
                        cb.label = Main.PV.channel_name[i];
                        cb.x = 50;
                        cb.y = 50 + i * 30;
                        cb.addEventListener(Event.CHANGE,call_cb);
                        Main.MS.addChild(cb);
                        //call xml function
                        if(i == cbLength - 1)
                             new ChannelsXML();
              private function call_cb(evt:Event)
                   trace(evt.currentTarget.name,evt.currentTarget.selected);
              public function checkboxes(evt)
                   trace(evt);

  • Is it possible to defne a function inside a component ?

    I'd want to can to define a function inside a simple component, for example a JtextArea
    I don't know how to do this.
    May I do it trought a propertychange event ?, but... I want to use my custom property.... (for example beginning = 15 )
    ( another way can be to define a custom component, I know ...)
    private JTextArea getJTextArea_numlines() {
    if (jTextArea_numlines == null) {
    jTextArea_numlines = new JTextArea();
    jTextArea_numlines.setPreferredSize(new Dimension(28, 206));
    jTextArea_numlines.setBackground(new Color(240, 240, 240));
        MY_FUNCTION_here<<<<
    return jTextArea_numlines;
    }Any Idea ? Thanks

    tonnot wrote:
    I'd want to can to define a function inside a simple component, for example a JtextArea
    May I do it trought a propertychange event ?, but... I want to use my custom property.... (for example beginning = 15 )I think you need to describe your question a bit better.
    What do you mean by a "my custom property", and what is "beginning = 15"?
    If you mean some named constant, then define one. You can even make it public by putting it in a public class or interface; alternatively use an Enum.
    As far as a function (I assume you mean method) goes, the same applies. First you need to ask yourself if it's likely to be used anywhere else except in that particular piece of code; if not, there's probably not much point in setting one up.
    Winston

  • Can i create any procedure or function inside a oracle reserve package?

    Hi!
    Can i create any procedure or function inside a oracle reserve package. Suppose, I want to create a function called x in the dbms_output package. Can i do that? Or can i extend the features of this package and create/derived a function from it like we extend any class in JAVA. I'm not sure - whether this is at all possible. I'll be waiting for your reply.
    Thanks in advance.
    Satyaki De.

    No, but you can write a wrapper package and use that instead of using the Built-In package directly. So, instead of calling DBMS_OUTPUT, you call your own Package.
    Steven Feuerstein wrote a wrapper for DBMS_OUTPUT, called P:
    Re: DBMS_OUTPUT.PUT_LINE

  • Calling php functions from sap

    hi all,
       I have to call the php functions from the r/3. my requirement is that I have to read the mail from the internet adress([email protected]) through php and then send its content in r/3.For that I have to write function in php which are rfc enabled and then call those function in r/3. Can anyone help me in calling the php function from r/3 and how to get the content of mail in r/3.I have to create php as a server and r/3 as client.
    regards
    ashish

    hi Anton,
    I have get have to read the read the internert mail in php hrough this class . I am sending you that code test_pop3.php. For this you even need pop3 class. I am  even sending you that code.It will be better if you give me your mail id. But I donot know how to create a rfc enabled function in php that can be read in r/3 .
    <?php
    test_pop3.php
    @(#) $Header: /home/mlemos/cvsroot/pop3/test_pop3.php,v 1.6 2005/10/18 17:44:46 mlemos Exp $
    ?><HTML>
    <HEAD>
    <TITLE>Read email attachments from pop3 server</TITLE>
    </HEAD>
    <BODY>
    <?php
         require("pop3.php");
      /* Uncomment when using SASL authentication mechanisms */
         require("sasl.php");
         $pop3=new pop3_class;
         $pop3->hostname="";             /* POP 3 server host name                      */
         $pop3->port=110;                         /* POP 3 server host port                      */
         $user="";          /* Authentication user name                    */
         $password="";                    /* Authentication password                     */
         $pop3->realm="";                         /* Authentication realm or domain              */
         $pop3->workstation="";                   /* Workstation for NTLM authentication         */
         $apop=0;                                 /* Use APOP authentication                     */
         $pop3->authentication_mechanism="USER";  /* SASL authentication mechanism               */
         $pop3->debug=0;                          /* Output debug information                    */
         $pop3->html_debug=0;                     /* Debug information is in HTML                */
         $pop3->join_continuation_header_lines=1; /* Concatenate headers split in multiple lines */
         if(($error=$pop3->Open())=="")
              echo "<PRE>Connected to the POP3 server "".$pop3->hostname."".</PRE>\n";
              if(($error=$pop3->Login($user,$password,$apop))=="")
                   echo "<PRE>User "$user" logged in.</PRE>\n";
                   if(($error=$pop3->Statistics($messages,$size))=="")
                        echo "<PRE>There are $messages messages in the mail box with a total of $size bytes.</PRE>\n";
                        $result=$pop3->ListMessages("",0);
                        if(GetType($result)=="array")
                             for(Reset($result),$message=0;$message<count($result);Next($result),$message++)
                                  echo "<PRE>Message ",Key($result)," - ",$result[Key($result)]," bytes.</PRE>\n";
                             $result=$pop3->ListMessages("",1);
                             if(GetType($result)=="array")
                                  for(Reset($result),$message=0;$message<count($result);Next($result),$message++)
                                       echo "<PRE>Message ",Key($result),", Unique ID - \"",$result[Key($result)],"\"</PRE>\n";
                                  if($messages>0)
                                            $var = 1;     
                                       if(($error=$pop3->RetrieveMessage($var,$headers,$body,-1))=="")
                                            for($line=0;$line<count($headers);$line++)
                                       if(($error=$pop3->RetrieveMessage(34,$headers,$body,-1))=="")
                                            echo "<PRE>Message 1:\n-Message headers starts below-</PRE>\n";
                                            for($line=0;$line<count($headers);$line++)
                                                 echo "<PRE>",HtmlSpecialChars($headers[$line]),"</PRE>\n";
                                                 echo "<PRE>-Message headers ends above-\n-Message body starts below-</PRE>\n";
                                            for($line=0;$line<count($body);$line++)
                                                 echo "<PRE>",HtmlSpecialChars($body[$line]),"</PRE>\n";
                                            echo "<PRE>-Message body ends above-</PRE>\n";
                                            if(($error=$pop3->DeleteMessage(1))=="")
                                                 echo "<PRE>Marked message 1 for deletion.</PRE>\n";
                                                 if(($error=$pop3->ResetDeletedMessages())=="")
                                                      echo "<PRE>Resetted the list of messages to be deleted.</PRE>\n";
                                  if($error==""
                                  && ($error=$pop3->Close())=="")
                                       echo "<PRE>Disconnected from the POP3 server "".$pop3->hostname."".</PRE>\n";
                             else
                                  $error=$result;
                        else
                             $error=$result;
         if($error!="")
              echo "<H2>Error: ",HtmlSpecialChars($error),"</H2>";
    ?>
    </BODY>
    </HTML>
    *******start of new php file********
    <?php
    pop3.php
    @(#) $Header: /home/mlemos/cvsroot/pop3/pop3.php,v 1.15 2005/10/18 17:43:25 mlemos Exp $
    class pop3_class
         var $hostname="";
         var $port=110;
         var $quit_handshake=0;
         var $error="";
         var $authentication_mechanism="USER";
         var $realm="";
         var $workstation="";
         var $join_continuation_header_lines=1;
         /* Private variables - DO NOT ACCESS */
         var $connection=0;
         var $state="DISCONNECTED";
         var $greeting="";
         var $must_update=0;
         var $debug=0;
         var $html_debug=0;
         var $next_token="";
         /* Private methods - DO NOT CALL */
         Function Tokenize($string,$separator="")
              if(!strcmp($separator,""))
                   $separator=$string;
                   $string=$this->next_token;
              for($character=0;$character<strlen($separator);$character++)
                   if(GetType($position=strpos($string,$separator[$character]))=="integer")
                        $found=(IsSet($found) ? min($found,$position) : $position);
              if(IsSet($found))
                   $this->next_token=substr($string,$found+1);
                   return(substr($string,0,$found));
              else
                   $this->next_token="";
                   return($string);
         Function SetError($error)
              return($this->error=$error);
         Function OutputDebug($message)
              $message.="\n";
              if($this->html_debug)
                   $message=str_replace("\n","<br />\n",HtmlEntities($message));
              echo $message;
              flush();
         Function GetLine()
              for($line="";;)
                   if(feof($this->connection))
                        return(0);
                   $line.=fgets($this->connection,100);
                   $length=strlen($line);
                   if($length>=2
                   && substr($line,$length-2,2)=="\r\n")
                        $line=substr($line,0,$length-2);
                        if($this->debug)
                             $this->OutputDebug("S $line");
                        return($line);
         Function PutLine($line)
              if($this->debug)
                   $this->OutputDebug("C $line");
              return(fputs($this->connection,"$line\r\n"));
         Function OpenConnection()
              if($this->hostname=="")
                   return($this->SetError("2 it was not specified a valid hostname"));
              if($this->debug)
                   $this->OutputDebug("Connecting to ".$this->hostname." ...");
              if(($this->connection=@fsockopen($this->hostname,$this->port,$error))==0)
                   switch($error)
                        case -3:
                             return($this->SetError("-3 socket could not be created"));
                        case -4:
                             return($this->SetError("-4 dns lookup on hostname \"$hostname\" failed"));
                        case -5:
                             return($this->SetError("-5 connection refused or timed out"));
                        case -6:
                             return($this->SetError("-6 fdopen() call failed"));
                        case -7:
                             return($this->SetError("-7 setvbuf() call failed"));
                        default:
                             return($this->SetError($error." could not connect to the host \"".$this->hostname."\""));
              return("");
         Function CloseConnection()
              if($this->debug)
                   $this->OutputDebug("Closing connection.");
              if($this->connection!=0)
                   fclose($this->connection);
                   $this->connection=0;
         /* Public methods */
         /* Open method - set the object variable $hostname to the POP3 server address. */
         Function Open()
              if($this->state!="DISCONNECTED")
                   return($this->SetError("1 a connection is already opened"));
              if(($error=$this->OpenConnection())!="")
                   return($error);
              $this->greeting=$this->GetLine();
              if(GetType($this->greeting)!="string"
              || $this->Tokenize($this->greeting," ")!="+OK")
                   $this->CloseConnection();
                   return($this->SetError("3 POP3 server greeting was not found"));
              $this->Tokenize("<");
              $this->must_update=0;
              $this->state="AUTHORIZATION";
              return("");
         /* Close method - this method must be called at least if there are any
         messages to be deleted */
         Function Close()
              if($this->state=="DISCONNECTED")
                   return($this->SetError("no connection was opened"));
              if($this->must_update
              || $this->quit_handshake)
                   if($this->PutLine("QUIT")==0)
                        return($this->SetError("Could not send the QUIT command"));
                   $response=$this->GetLine();
                   if(GetType($response)!="string")
                        return($this->SetError("Could not get quit command response"));
                   if($this->Tokenize($response," ")!="+OK")
                        return($this->SetError("Could not quit the connection: ".$this->Tokenize("\r\n")));
              $this->CloseConnection();
              $this->state="DISCONNECTED";
              return("");
         /* Login method - pass the user name and password of POP account.  Set
         $apop to 1 or 0 wether you want to login using APOP method or not.  */
         Function Login($user,$password,$apop=0)
              if($this->state!="AUTHORIZATION")
                   return($this->SetError("connection is not in AUTHORIZATION state"));
              if($apop)
                   if(!strcmp($this->greeting,""))
                        return($this->SetError("Server does not seem to support APOP authentication"));
                   if($this->PutLine("APOP $user ".md5("<".$this->greeting.">".$password))==0)
                        return($this->SetError("Could not send the APOP command"));
                   $response=$this->GetLine();
                   if(GetType($response)!="string")
                        return($this->SetError("Could not get APOP login command response"));
                   if($this->Tokenize($response," ")!="+OK")
                        return($this->SetError("APOP login failed: ".$this->Tokenize("\r\n")));
              else
                   $authenticated=0;
                   if(strcmp($this->authentication_mechanism,"USER")
                   && function_exists("class_exists")
                   && class_exists("sasl_client_class"))
                        if(strlen($this->authentication_mechanism))
                             $mechanisms=array($this->authentication_mechanism);
                        else
                             $mechanisms=array();
                             if($this->PutLine("CAPA")==0)
                                  return($this->SetError("Could not send the CAPA command"));
                             $response=$this->GetLine();
                             if(GetType($response)!="string")
                                  return($this->SetError("Could not get CAPA command response"));
                             if(!strcmp($this->Tokenize($response," "),"+OK"))
                                  for(;;)
                                       $response=$this->GetLine();
                                       if(GetType($response)!="string")
                                            return($this->SetError("Could not retrieve the supported authentication methods"));
                                       switch($this->Tokenize($response," "))
                                            case ".":
                                                 break 2;
                                            case "SASL":
                                                 for($method=1;strlen($mechanism=$this->Tokenize(" "));$method++)
                                                      $mechanisms[]=$mechanism;
                                                 break;
                        $sasl=new sasl_client_class;
                        $sasl->SetCredential("user",$user);
                        $sasl->SetCredential("password",$password);
                        if(strlen($this->realm))
                             $sasl->SetCredential("realm",$this->realm);
                        if(strlen($this->workstation))
                             $sasl->SetCredential("workstation",$this->workstation);
                        do
                             $status=$sasl->Start($mechanisms,$message,$interactions);
                        while($status==SASL_INTERACT);
                        switch($status)
                             case SASL_CONTINUE:
                                  break;
                             case SASL_NOMECH:
                                  if(strlen($this->authentication_mechanism))
                                       return($this->SetError("authenticated mechanism ".$this->authentication_mechanism." may not be used: ".$sasl->error));
                                  break;
                             default:
                                  return($this->SetError("Could not start the SASL authentication client: ".$sasl->error));
                        if(strlen($sasl->mechanism))
                             if($this->PutLine("AUTH ".$sasl->mechanism.(IsSet($message) ? " ".base64_encode($message) : ""))==0)
                                  return("Could not send the AUTH command");
                             $response=$this->GetLine();
                             if(GetType($response)!="string")
                                  return("Could not get AUTH command response");
                             switch($this->Tokenize($response," "))
                                  case "+OK":
                                       $response="";
                                       break;
                                  case "+":
                                       $response=base64_decode($this->Tokenize("\r\n"));
                                       break;
                                  default:
                                       return($this->SetError("Authentication error: ".$this->Tokenize("\r\n")));
                             for(;!$authenticated;)
                                  do
                                       $status=$sasl->Step($response,$message,$interactions);
                                  while($status==SASL_INTERACT);
                                  switch($status)
                                       case SASL_CONTINUE:
                                            if($this->PutLine(base64_encode($message))==0)
                                                 return("Could not send message authentication step message");
                                            $response=$this->GetLine();
                                            if(GetType($response)!="string")
                                                 return("Could not get authentication step message response");
                                            switch($this->Tokenize($response," "))
                                                 case "+OK":
                                                      $authenticated=1;
                                                      break;
                                                 case "+":
                                                      $response=base64_decode($this->Tokenize("\r\n"));
                                                      break;
                                                 default:
                                                      return($this->SetError("Authentication error: ".$this->Tokenize("\r\n")));
                                            break;
                                       default:
                                            return($this->SetError("Could not process the SASL authentication step: ".$sasl->error));
                   if(!$authenticated)
                        if($this->PutLine("USER $user")==0)
                             return($this->SetError("Could not send the USER command"));
                        $response=$this->GetLine();
                        if(GetType($response)!="string")
                             return($this->SetError("Could not get user login entry response"));
                        if($this->Tokenize($response," ")!="+OK")
                             return($this->SetError("User error: ".$this->Tokenize("\r\n")));
                        if($this->PutLine("PASS $password")==0)
                             return($this->SetError("Could not send the PASS command"));
                        $response=$this->GetLine();
                        if(GetType($response)!="string")
                             return($this->SetError("Could not get login password entry response"));
                        if($this->Tokenize($response," ")!="+OK")
                             return($this->SetError("Password error: ".$this->Tokenize("\r\n")));
              $this->state="TRANSACTION";
              return("");
         /* Statistics method - pass references to variables to hold the number of
         messages in the mail box and the size that they take in bytes.  */
         Function Statistics(&$messages,&$size)
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($this->PutLine("STAT")==0)
                   return($this->SetError("Could not send the STAT command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get the statistics command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not get the statistics: ".$this->Tokenize("\r\n")));
              $messages=$this->Tokenize(" ");
              $size=$this->Tokenize(" ");
              return("");
         /* ListMessages method - the $message argument indicates the number of a
         message to be listed.  If you specify an empty string it will list all
         messages in the mail box.  The $unique_id flag indicates if you want
         to list the each message unique identifier, otherwise it will
         return the size of each message listed.  If you list all messages the
         result will be returned in an array. */
         Function ListMessages($message,$unique_id)
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($unique_id)
                   $list_command="UIDL";
              else
                   $list_command="LIST";
              if($this->PutLine("$list_command".($message ? " ".$message : ""))==0)
                   return($this->SetError("Could not send the $list_command command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get message list command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not get the message listing: ".$this->Tokenize("\r\n")));
              if($message=="")
                   for($messages=array();;)
                        $response=$this->GetLine();
                        if(GetType($response)!="string")
                             return($this->SetError("Could not get message list response"));
                        if($response==".")
                             break;
                        $message=intval($this->Tokenize($response," "));
                        if($unique_id)
                             $messages[$message]=$this->Tokenize(" ");
                        else
                             $messages[$message]=intval($this->Tokenize(" "));
                   return($messages);
              else
                   $message=intval($this->Tokenize(" "));
                   $value=$this->Tokenize(" ");
                   return($unique_id ? $value : intval($value));
         /* RetrieveMessage method - the $message argument indicates the number of
         a message to be listed.  Pass a reference variables that will hold the
         arrays of the $header and $body lines.  The $lines argument tells how
         many lines of the message are to be retrieved.  Pass a negative number
         if you want to retrieve the whole message. */
         Function RetrieveMessage($message,&$headers,&$body,$lines)
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($lines<0)
                   $command="RETR";
                   $arguments="$message";
              else
                   $command="TOP";
                   $arguments="$message $lines";
              if($this->PutLine("$command $arguments")==0)
                   return($this->SetError("Could not send the $command command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get message retrieval command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not retrieve the message: ".$this->Tokenize("\r\n")));
              for($headers=$body=array(),$line=0;;)
                   $response=$this->GetLine();
                   if(GetType($response)!="string")
                        return($this->SetError("Could not retrieve the message"));
                   switch($response)
                        case ".":
                             return("");
                        case "":
                             break 2;
                        default:
                             if(substr($response,0,1)==".")
                                  $response=substr($response,1,strlen($response)-1);
                             break;
                   if($this->join_continuation_header_lines
                   && $line>0
                   && ($response[0]=="\t"
                   || $response[0]==" "))
                        $headers[$line-1].=$response;
                   else
                        $headers[$line]=$response;
                        $line++;
              for($line=0;;$line++)
                   $response=$this->GetLine();
                   if(GetType($response)!="string")
                        return($this->SetError("Could not retrieve the message"));
                   switch($response)
                        case ".":
                             return("");
                        default:
                             if(substr($response,0,1)==".")
                                  $response=substr($response,1,strlen($response)-1);
                             break;
                   $body[$line]=$response;
              return("");
         /* DeleteMessage method - the $message argument indicates the number of
         a message to be marked as deleted.  Messages will only be effectively
         deleted upon a successful call to the Close method. */
         Function DeleteMessage($message)
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($this->PutLine("DELE $message")==0)
                   return($this->SetError("Could not send the DELE command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get message delete command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not delete the message: ".$this->Tokenize("\r\n")));
              $this->must_update=1;
              return("");
         /* ResetDeletedMessages method - Reset the list of marked to be deleted
         messages.  No messages will be marked to be deleted upon a successful
         call to this method.  */
         Function ResetDeletedMessages()
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($this->PutLine("RSET")==0)
                   return($this->SetError("Could not send the RSET command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get reset deleted messages command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not reset deleted messages: ".$this->Tokenize("\r\n")));
              $this->must_update=0;
              return("");
         /* IssueNOOP method - Just pings the server to prevent it auto-close the
         connection after an idle timeout (tipically 10 minutes).  Not very
         useful for most likely uses of this class.  It's just here for
         protocol support completeness.  */
         Function IssueNOOP()
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($this->PutLine("NOOP")==0)
                   return($this->SetError("Could not send the NOOP command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not NOOP command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not issue the NOOP command: ".$this->Tokenize("\r\n")));
              return("");
    ?>

  • Rollover button css styled with php function: possible?

    Hi,
    I created a working rollover button css styled, with normal href links, using this html:
    <p class="button"><a href="link"><click here><span>Text</span></a></p>
    But I would like to know how I can create a "contact us" button with following php function included:
    <?=createMailto('[email protected]')?>

    Well, I wrote the button code as mentioned in my first post, but the button does not call the email php function. When I replace the link in a href="link" with the php function, I can't get it to work.
    I have to use href to get the button to display, and to change state on hover; but I don't know how to get the php function to work. Using this function as a plain function call within a regular <p> tag works.

  • Popup php function list?

    Not sure if this is possible but I hope it is. When
    developing with
    ColdFusion, Dreamweaver will pop up a list of CF tags when
    you start
    typing something like... <cf...
    Is there anyway to get something similar for php functions?
    So if I
    start typing: str.. it will pop up a list of all functions
    that start
    with 'str' and I can either hit tab to complete the default
    selection or
    scroll down to select a different tag or continue typing. I'm
    willing to
    pay a little bit even if it is a simple download.
    I'm not even sure what this function is called, I think it is
    different
    than code hints, perhaps it is called auto-completion?
    Any hints on this would be appreciated.
    Tanks!
    Chris

    chris wrote:
    > Is there anyway to get something similar for php
    functions?
    Inside a PHP code block, press Ctrl+Space (same combination
    on both
    Windows and Mac). That gives you access to code hints for
    approximately
    2,600 PHP functions, all listed in alphabetical order. Type
    the first
    few letters of the function you want to get close enough to
    highlight in
    the code hint menu.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Calling Function across Classes

    How do I call a function across classes?
    I have a primary class ("ChordLib.as") that contains a function that manages options for TileList component, that includes prescribing a custom Cell Rendering class, "MyRenderer".  I want to be able to call a function in the primary "ChordLib.as" class from the "MyRenderer.as" class.  Here is the function in "ChordLib" that refers to the "MyRenderer" class. Perhaps there is a way here to pass reference of the primary class into "MyRenderer"?
    // SET CHORD LIST  //////////////////////////////////////////
    public function setChordList(song:int):void {
    var dpChords:DataProvider = new DataProvider();
    var i:uint;
    // determine chord set
    if (song == -1) {
         activeChords = allChords;
    } else {
         activeChords = songChordSets[song];
    // fill dataProvider
    for(i=0; i<activeChords.length; i++) {
         var tt = activeChords[i];
         dpChords.addItem({ label:tt, source:ChordBar, data:i, scaleContent:true }); 
    chordList.dataProvider = dpChords;
    chordList.columnWidth     = 70;
    chordList.rowHeight     = 30;
    chordList.direction = ScrollBarDirection.VERTICAL;
    chordList.setStyle("contentPadding", 5);
    chordList.setRendererStyle("imagePadding", 0);
    chordList.scrollPolicy  = ScrollPolicy.ON;
    // set style for labels
    chordList.setRendererStyle("textFormat", textFormat1);
    // set the background skin
    chordList.setStyle("skin", lightBackground);
    //set the cell renderer
    chordList.setStyle("cellRenderer", MyRenderer);
    This last line ("chordList.setStyle("cellRenderer", MyRenderer);") refers to this custom class, that includes some event listeners:
    package {
       import fl.controls.listClasses.ICellRenderer;
       import fl.controls.listClasses.ImageCell;
       import flash.events.*;
       public class MyRenderer extends ImageCell implements ICellRenderer {
          public function MyRenderer() {
                this.buttonMode    = true;
              // set state skins to same skin so background is static
              setStyle("upSkin", lightBackground);
              setStyle("downSkin", lightBackground);
              setStyle("overSkin", lightBackground);
              setStyle("selectedUpSkin", lightBackground);
              setStyle("selectedDownSkin", lightBackground);
              setStyle("selectedOverSkin", lightBackground);
              // turn off text background by setting to 0
              setStyle("textOverlayAlpha", 0);
              setStyle("textPadding", 7);
                // event listeners
                this.addEventListener(MouseEvent.CLICK, clickHandler);
                this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
                this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
           // EVENTS
           private function clickHandler(event:MouseEvent):void {
           private function mouseOverHandler(event:MouseEvent):void {
           private function mouseOutHandler(event:MouseEvent):void {
    I want to insert calls to functions that are in the primary class (that contains the first function listed here), "ChordLib.as".
    How do I do this?

    In order for ClassA to call a function of another ClassB (or instance of it) it needs to be aware of two facts: 1) That ClassB does exist and 2) that ClassB has a particular function.
    Another approach could be establishing communication between classes via events.
    From you explanation it is not clear what you want to accomplish. Do you need to call a function on Class itself or an instance of this Class?
    If former - you need to create a static function and just call it:
    inside ClassB:
    public static function classBFunction()
    ClassA can call it:
    ClassB.classBFunction()
    If you need to call the function on an instance - you, naturally, need to instantiate the class and only then call the function.
    Say you have function inside ClassB
    public function classBAnotherFunction() - note that there is no word static
    There is another fork here: either you instantiate the ClassB inside ClassA or you pass a reference of the instance of ClassB into ClassA

  • Variable Functions (and Classes)

    Hi, I was wondering if ActionScript had some way to call functions and classes from variables, like they do in PHP:
    function funcname() {
         print "Potatoes come from tree";
    $function = "funcname";
    print $function;   // Prints out "funcname"
    $$function();      // Prints out "Potatoes come from tree"
    In case you don't know the syntax for PHP, you should know that anything perpended with a $-symbol is a variable. Is something akin to this possible with ActionScript?

    flash uses array notation to convert strings to objects:
    function funcname() {
         trace("Potatoes come from tree");
    var fS:String = "funcname";
    this[fS]();

  • How to find out list of procedures and functions inside a package

    How I can find out the list of Procedures and Functions inside a Package.

    Look at ALL_PROCEDURES and ALL_ARGUMENTS.

  • How to open labview program with Quit Labview function inside?

    Hi Any idea how to open labview program with  Quit Labview function inside?
    I forgot to add and set the condition of the type for this program.
    If the program is an application, it would close straight away.
    If it is still labview work, it will go straight to editing program without closing.
    So I need to recover, open it and make some changes.
    Clement
    Solved!
    Go to Solution.

    Put the VI in a project and open it from there, then it shouldn't autorun. You can use App.kind property of application to decide whether to close or not.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Can we call a php function into coldfusion coding?????????

    can we call a php function into coldfusion??
    if anybody knows that let me know....

    Nope, as IIS can only pass one page to one handler, so it gets passed to ColdFusion *or* PHP. The only way it would work is to have a page with an iFrame containing a PHP page, but that's not calling a PHP function from ColdFusion.
    Dare I ask what it is you're trying to achieve exactly? If it's an extremely complicated function that can't possibly be rewritten, you'd probably want to wrap it up in a webservice and call it from CF.

  • Calling a function inside a symbol?

    Hi there,
    I'm one of those flash-devs that are trying to get Edge Animate to do what I usually do in Flash, so I might be doing this the wrong way, but I've got a symbol with a function "inside" on my stage, and I wanna call that function from the stage.
    I've been trying to use sym.getComposition().getStage().getSymbol("symbolName").functionName(); but it doesn't work.
    I don't have any problems manipulating the symbol itself by calling .play() or .hide() so I know the path works....can anyone show me the right syntax to call a function inside a symbol?
    Thx in advance

    Hi Abnesher,
    An important principle to grasp is that symbols (and the stage is one of them) lies in parallel, despite the fact of instances of different symbols being nested one in another (and all in fine nested in the stage).
    The consequence is that from inside your nested symbol you have no direct visibility of the function defined inside the stage symbol !
    Inside the Stage symbol, in the document.compositionReady event handler :
    sym.yourGlobalFunction = function( firstParameter)
      // your stuff
    Inside another symbol, in one of its events handlers :
    sym.getComposition().getStage().yourGlobalFunction( 5);
    Gil

  • How to use analytical functions inside a mapping

    Hello everybody. Here Isend you a trick that we are using for two years.
    If you want to use a function (for instance :ROW_NUMBER() OVER (PARTITION BY ... ORDER BY ...)) inside a mapping you must create an expression with in the INGRP1 the fields you are going to use in the window function and in the OUTGRP1 the function you want. Create an Out -attribute with the expressión and link it to a distinct operator (using a "distinct" you encapsulte the sql and you will be able to use the function inside a filter - in the where clause.). The distinct can eliminate some register (depends on the function). If you validate the expression an error will appear (don't worry about that, the mapping will be ok).
    But there is a limitation, you will not be able tou sum over, min over, max over (it detect that they are aggregator functions). Other limitation: the debugger doesn't run with this kind of functions.
    Please publish this information on "The Warehouse Builder Utility Exchange". Mi email is [email protected] (if you need more information)

    It is possible to add SUM, MIN, MAX functions also to OWB releases prior to Paris - You have to put them in double quotes - write "MIN" "MAX" "SUM" etc. The rest of the rules (adding cut-off operator after the expression - as DISTINCT, or UNION ALL) is analogical to with ROW_NUMBER()
    That means You can create mapping with following functionality:
    SELECT
    sum (salary) over (partition by DEPARTMENT) department_salary,
    salary,
    employee_id,
    employee_name
    FROM employees_salaries
    writing it this way in OWB:
    SELECT
    "SUM" (salary) over (partition by DEPARTMENT) department_salary,
    salary,
    employee_id,
    employee_name
    FROM employees_salaries
    Regards,
    Martin

Maybe you are looking for