Re: [Gambas-user] WAIT ... is it an (un) necessary evil for my app?

2009-05-26 Thread Daniel Campos
Don't wait, remove this part of the code:

 IF $hproc.value  0 then
   RETURN $hproc.Value
 ELSE
  RETURN 0
END IF

Then create an event handler for the kill event which is raised once the
program is finished



2009/5/26 M0E Lnx m0e@gmail.com

 So, the next version of my vinstall-ng app is really shaping up
 nicely, but I'm running into a weird dilemma here.

 This is a linux installer, so there is a lot of decompression going on
 in the background as packages are being installed using via the gambas
 EXEC method.

 Here is the problem I'm having though. I have string arrays of package
 names to install one at a time.
 I have a sub that reads these arrays and processes each package at a time
 I have a function that simply installs the package and checks to make
 sure the process didn't return an error. Allow me to demonstrate

 PUBLIC  INSTALL_FROM_ARRAY(sList as string[])
 DIM sPkg as string
 DIM i, iRet as Integer

 FOR i = 0 to sList.Max
 IF  INSTALL_THIS_PACKAGE(trim(sList[i]))  0 then RETURN
 pbprog.value = i / sList.count
 NEXT

 END

 PUBLIC FUNCTION INSTALL_THIS_PACKAGE(sPkgPath as String) as Integer
 dim $hproc as Process

 $hproc = EXEC [/sbin/installpkg,-q,-R, ClsGlobal.sTargetPath,
 sPkgPath] WAIT
  IF $hproc.value  0 then
RETURN $hproc.Value
  ELSE
   RETURN 0
 END IF

 END

 My problem is that the progressbar does not update as every package
 installs.
 I need to add a wait of at least 0.25 before each package gets
 installed to give the progressbar time to update.
 The background processes do run without the wait instance, but the GUI
 seems stuck. On the other hand, if I want the progressbar, I have to
 sacrifice performance.

 Can anyone think of a way around this?
 Using gambas2.2.12 app uses gb.gtk
 Any help is welcome.

 Thanks


 --
 Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
 is a gathering of tech-side developers  brand creativity professionals.
 Meet
 the minds behind Google Creative Lab, Visual Complexity, Processing, 
 iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
 Group, R/GA,  Big Spaceship. http://p.sf.net/sfu/creativitycat-com
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA,  Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Latest Gambas packages for Ubuntu - Broken?

2008-11-12 Thread Daniel Campos


 I was also concerned because the update said that it wanted to remove those
 Gambas programs that I have developed myself, and installed using synaptic
 so that I can update them as I go. I assume that I will have to recompile
 and reinstall those packages?


If your packages depend on a concrete version, you should at least update
Debian Package information a rebuild them, yes.
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user