gnope php gtk gui gnope.org  

Not sure how to use gnope
Goto page 1, 2  Next
 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Wed Jun 14, 2006 6:11 pm    Post subject: Not sure how to use gnope Reply with quote

I'm on WinXP and I installed gnope the other day to begin working with phpgtk. I installed it because I saw the link on gtk.php.net and I couldn't get php gtk setup manually all that well with WAMP5. In the flash tutorial (german accent) I saw a GUI for management and development, but I have yet to figure out how to bring up that GUI.

If I click on the PHP-Gtk2 Applications desktop shortcut, it brings up a Channel selector and a frame with Gnope_AppRunner. Is Channel for the PEAR packages? How do I run a phpgtk script or bring up the GUI for developing one? I'm still new to pear and php(gtk). Thanks.
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Wed Jun 14, 2006 6:59 pm    Post subject: Reply with quote

The "GUI" to develop can be any text editor. You might prefer an IDE to develop PHP applications; there is a thread in this forum (under software).

The PEAR Frontend is a graphical frontend for the PEAR installer, written in PHP-Gtk2 itself. There are several channels, the Gnope one has PHP-Gtk2 applications. After installation, you can launch the installed programs with the AppRunner.

To run them manually, open a console, navigate to C:\PHP-Gtk2\lib\pear\Gnope\*\ and type "php run.phpw".
You can start any php script by using "php C:\path\to\you\script.php".
PHP-Gtk2 applications are normal php scripts. It doesn't matter if you name them ".php" or ".phpw", it's just I prefer ".phpw" to make clear that they are "windowed php applications" in contrast to web based .php ones.
Back to top
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Wed Jun 14, 2006 10:58 pm    Post subject: Reply with quote

cweiske wrote:
The "GUI" to develop can be any text editor. You might prefer an IDE to develop PHP applications; there is a thread in this forum (under software).

The PEAR Frontend is a graphical frontend for the PEAR installer, written in PHP-Gtk2 itself. There are several channels, the Gnope one has PHP-Gtk2 applications. After installation, you can launch the installed programs with the AppRunner.

To run them manually, open a console, navigate to C:\PHP-Gtk2\lib\pear\Gnope\*\ and type "php run.phpw".
You can start any php script by using "php C:\path\to\you\script.php".
PHP-Gtk2 applications are normal php scripts. It doesn't matter if you name them ".php" or ".phpw", it's just I prefer ".phpw" to make clear that they are "windowed php applications" in contrast to web based .php ones.


Thanks, I downloaded and have been using "PHP Designer" to play around with creating php scripts. I also have used wscite (text editor) for that.

I went ahead and got Glade2 for windows since it was recommended on this site for creating phpgtk programs. I must have misunderstood what Gnope was for, I thought it was more like Glade.

By the way when I installed Gnope, it said that the zlib.dll was missing, I thought that this may have been because I was running another application when I was installing Gnope, although Gnope seems to work fine now and there is a zlib1.dll in the directory.

One other thing, when I installed Glade, it had a PHP-Gtk Runtime environment. Does it matter than Gnope already installed php-gtk, will there be conflicts or anything?
Sorry if that doesn't make sense, I'm still learning all of this Very Happy
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Wed Jun 14, 2006 11:13 pm    Post subject: Reply with quote

Quote:
One other thing, when I installed Glade, it had a PHP-Gtk Runtime environment. Does it matter than Gnope already installed php-gtk, will there be conflicts or anything?

Glade itself is a C program. It does only provide a graphical user interface designer. Glade has nothing to do with PHP-Gtk.
Gnope sets up all necessary PHP and Gtk libraries that need to be there to execute PHP-Gtk2 programs. Glade doesn't add anything to it, it's a normal program which output happens to be used with a PHP-Gtk2 class.
Back to top
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Thu Jun 15, 2006 2:18 am    Post subject: Reply with quote

cweiske wrote:
Quote:
One other thing, when I installed Glade, it had a PHP-Gtk Runtime environment. Does it matter than Gnope already installed php-gtk, will there be conflicts or anything?

Glade itself is a C program. It does only provide a graphical user interface designer. Glade has nothing to do with PHP-Gtk.
Gnope sets up all necessary PHP and Gtk libraries that need to be there to execute PHP-Gtk2 programs. Glade doesn't add anything to it, it's a normal program which output happens to be used with a PHP-Gtk2 class.


So can Glade be useful for building php-gtk applications?

I googled "php gtk ide" and found Dev-PHP. I d/l and installed it, but I haven't really gotten anywhere with it for running scripts and phpgtk apps. I have most of everything configured right. I can run a phpgtk demo app fine with gnope though.
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Thu Jun 15, 2006 6:11 am    Post subject: Reply with quote

Please, please have a look at the Tutorials:
http://php-gtk2.de/manual/en/html/tutorials/tutorials.html
Especiall the glade and the hello world.

And if you don't know how to write PHP scripts, you won't come anywhere because PHP-Gtk is a PHP extension and to write PHP-Gtk programs means to write PHP programs with using some Gtk classes.
Back to top
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Thu Jun 15, 2006 3:24 pm    Post subject: Reply with quote

cweiske wrote:
Please, please have a look at the Tutorials:
http://php-gtk2.de/manual/en/html/tutorials/tutorials.html
Especiall the glade and the hello world.

And if you don't know how to write PHP scripts, you won't come anywhere because PHP-Gtk is a PHP extension and to write PHP-Gtk programs means to write PHP programs with using some Gtk classes.


Thanks, I have already read the hello glade tutorial. I do know how to write and have been writing php scripts for about two years. Very Happy Although, I am knew to gnope, glade, php-gtk and windows programming and wanted to make sure I wasn't talking in circles.
Back to top
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Thu Jun 15, 2006 8:59 pm    Post subject: Reply with quote

I've been having some fun using the file from "Hello Glade2" to tinker with glade. I just left the helloglade.phpw alone and opened the helloglade.glade file and started playing around with it.

I made three php scripts, one for calculating future value, one for finding the market value (if book value and % are known), and the third is finding the percentage increase/decrease if only book value and market value are known. I plan on taking all three of these scripts and putting them into a small php-gtk (or glade) file to make a small app, which will be my first.

I still haven't gotten devphp to work right, but I may not even need it if I use glade and gnope.

Anyone know about priadoblender? I downloaded it but I don't know anything about compiling .exe's for windows.
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Thu Jun 15, 2006 9:30 pm    Post subject: Reply with quote

You don't need Dev-PHP. You can use any editor, including windows notepad. Look at the software forum, the editor discussion
Back to top
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Thu Jun 15, 2006 9:46 pm    Post subject: Reply with quote

cweiske wrote:
You don't need Dev-PHP. You can use any editor, including windows notepad. Look at the software forum, the editor discussion


Thanks, I already checked that forum as you recommended before. Dev-PHP just had an ok layout for management, I know I don't need it to create apps or scripts or anything, just thought about using it to manage the projects. Right now I use wscite and PHP Designer for scripts. I like wscite as an alternative to notepad because wscite allows color coding and it's faster to tweak something minor in a script than Designer is.
Back to top
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Sat Jun 17, 2006 7:08 pm    Post subject: Reply with quote

Oh, I forgot to ask. I already know how to run a php gtk application from the command line, but how does one do it with the Gnope_AppRunner? When I click on the PHP-Gtk2 Applications icon on the desktop it brings up the window with Dev_Inspector and Gnope_AppRunner in it, but when I click on Gnope_AppRunner it just brings up the exact same window as before with Dev_Inspector and Gnope_AppRunner listed again (with Install/Uninstall programs at bottom).
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Sun Jun 18, 2006 9:19 pm    Post subject: Reply with quote

The "PHP-Gtk2 applications" icon actually starts AppRunner. Since AppRunner is a PHP-Gtk2 application, AppRunner lists itself :)
Back to top
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Mon Jun 19, 2006 1:37 am    Post subject: Reply with quote

Oh, I see. So is there an alternative for running my php-gtk programs from the command line?
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Mon Jun 19, 2006 6:45 am    Post subject: Reply with quote

Your application needs to have a "run.phpw" file, and needs to be installed as a PEAR-package locally. Then AppRunner shows it in its application list.
Back to top
mrgtk



Joined: 14 Jun 2006
Posts: 13

PostPosted: Mon Jun 19, 2006 5:54 pm    Post subject: Reply with quote

cweiske wrote:
Your application needs to have a "run.phpw" file, and needs to be installed as a PEAR-package locally. Then AppRunner shows it in its application list.


I had a peek at the dev_inspector's run.phpw file to see what it looks like, but I don't know how to install my script as a pear package locally.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.