Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHP-GTK Community Site:
Easily empty GtkContainer/GtkWindow
Mar 08, 2007 @ 14:42:00

The PHP-GTK Community site has a quick new post today showing how to create/empty out a GtkContainer or GtkWindow in your code.

This function provides an easy way to empty a GtkWindow/GtkContainer. I use it when i need to refresh a part of my app by replacing some widgets with others. It can destroy or preserve the child widgets depending on your needs.

They provide both the code itself and a sample usage - a three line script that shows three ways to use it - empty out a container, empty out the container but keep its children intact, and how to use it in the event of a button click.

tagged: phpgtk gtkcontainer gtkwindow empty children button event phpgtk gtkcontainer gtkwindow empty children button event

Link:

PHP-GTK Community Site:
Easily empty GtkContainer/GtkWindow
Mar 08, 2007 @ 14:42:00

The PHP-GTK Community site has a quick new post today showing how to create/empty out a GtkContainer or GtkWindow in your code.

This function provides an easy way to empty a GtkWindow/GtkContainer. I use it when i need to refresh a part of my app by replacing some widgets with others. It can destroy or preserve the child widgets depending on your needs.

They provide both the code itself and a sample usage - a three line script that shows three ways to use it - empty out a container, empty out the container but keep its children intact, and how to use it in the event of a button click.

tagged: phpgtk gtkcontainer gtkwindow empty children button event phpgtk gtkcontainer gtkwindow empty children button event

Link:

Ben Ramsey's Blog:
Add Children with SimpleXML
May 12, 2006 @ 01:03:57

In this new post on Ben Ramsey's blog today, he shares his experiences with SimpleXML, mentioning specifically some of the undocumented functions that he's noticed.

I was very excited today while glancing through the code in ext/simplexml/simplexml.c to find some, as of yet, undocumented methods in PHP's SimpleXMLElement class. This discovery came after I've spent several hours over the last couple of nights banging my head against the desk to figure out a way to create a class that extends SimpleXMLElement and adds a new method for adding a child, which would have to use DOM in order to work—or so I thought.

Of course, it's wasn't as easy as it seemed, and Ben soon found some of the limitations of the SimpleXML library. Of course, he did manage to find a way to add new children to the document you're working with (something that normally would have required the intervention of the DOM functionality). Check out the post for a code example.

tagged: simplexml add children undocumented feature methods dom xml simplexml add children undocumented feature methods dom xml

Link:

Ben Ramsey's Blog:
Add Children with SimpleXML
May 12, 2006 @ 01:03:57

In this new post on Ben Ramsey's blog today, he shares his experiences with SimpleXML, mentioning specifically some of the undocumented functions that he's noticed.

I was very excited today while glancing through the code in ext/simplexml/simplexml.c to find some, as of yet, undocumented methods in PHP's SimpleXMLElement class. This discovery came after I've spent several hours over the last couple of nights banging my head against the desk to figure out a way to create a class that extends SimpleXMLElement and adds a new method for adding a child, which would have to use DOM in order to work—or so I thought.

Of course, it's wasn't as easy as it seemed, and Ben soon found some of the limitations of the SimpleXML library. Of course, he did manage to find a way to add new children to the document you're working with (something that normally would have required the intervention of the DOM functionality). Check out the post for a code example.

tagged: simplexml add children undocumented feature methods dom xml simplexml add children undocumented feature methods dom xml

Link:


Trending Topics: