Search Results

Search found 43657 results on 1747 pages for 'call center setup'.

Page 85/1747 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • Rhino Mocks - Fluent Mocking - Expect.Call question

    - by Ben Cawley
    Hi, I'm trying to use the fluent mocking style of Rhino.Mocks and have the following code that works on a mock IDictionary object called 'factories': With.Mocks(_Repository).Expecting(() => { Expect.Call(() => factories.ContainsKey(Arg<String>.Is.Anything)); LastCall.Return(false); Expect.Call(() => factories.Add(Arg<String>.Is.Anything, Arg<Object>.Is.Anything)); }).Verify(() => { _Service = new ObjectRequestService(factories); _Service.RegisterObjectFactory(Valid_Factory_Key, factory); }); Now, the only way I have been able to set the return value of the ContainsKey call is to use LastCall.Return(true) on the following line. I'm sure I'm mixing styles here as Expect.Call() has a .Return(Expect.Action) method but I can't figure out how I am suppose to use it correctly to return a boolean value? Can anyone help out? Hope the question is clear enough - let me know if anyone needs more info! Cheers, Ben

    Read the article

  • Good Administration Center Templates

    - by Alec Smart
    Hello, This may not be a programming question per se. But I am wondering what template do you use for your sites/webapps admin centers. Am looking primarily at free templates that give a basic structure. I know I can build my own, but I haven't had too much success in something that works for all my webapps/sites. Wondering if there is something nice and comprehensive available. Thank you for your time.

    Read the article

  • Deployment Setup (.Net) - Search target machine -> Registry search (64 bit)

    - by Joonas Kirsebom
    I have a windows installer project which installs some software (winform, service, mce addin). During the installation I need to search the machine for a registry key. This is done with with the "Launch Condition" - "Add Registry Search" (Deployment Project). I have filled out all the properties right, and checked against the regestry that the value actually can be found. The problem is that the "Registry Search" searches in the x86 part of the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\...) although my system is a x64 and the deployment setup is also set to x64. Does anyone know how to force the "Registry Search" to search the x64 registry? Or know about a workaround? The weird thing about this, is that Registry setting in the deployment setup is writing to the right registry (x64). My idea is that the "Registry Search" program is only developed to the x86 architecture, and therefore can't read the right registry. I found this article from microsoft, so it seams that they know about this problem. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=110105&wa=wsignin1.0#details My system is: Windows 7 64bit Visual Studio 2008

    Read the article

  • Inscribe and center an image within a frame

    - by Brennan Roberts
    Given a div of arbitrary aspect ratio, what's the best way to place and style an image (also with an arbitrary aspect ratio) inside such that: It is both inscribed and centered Its dimensions and position are set using relative values so that the image will remain inscribed and centered automatically when the frame is uniformly scaled (javascript should only be required when the image is initially inserted, or if the frame's aspect ratio changes) Extra markup is minimized Here's the result we want: Here's a fiddle template, which is just: Markup Should pillarbox <div class="frame"> <img src="http://www.placekitten.com/200/300" /> </div> Should letterbox <div class="frame"> <img src="http://www.placekitten.com/300/200" /> </div> CSS .frame { width: 200px; height: 200px; border: 2px solid black; margin: 10px 0px 100px 0; }

    Read the article

  • Unable to use background-position: center for VBox in flex

    - by Zeeshan Rang
    Hi I am trying to use css to have a background in a VBox which is positioned to the top of the container. my css style looks like below: <mx:Style> .agendaDateVBoxStyle { vertical-gap:0; corner-radius: 10; border-style:solid; border-color: #7191ba; background-color: #000000; background-image: 'assets/calendar/images/agenda-date-bg.png'; background-repeat:no-repeat; background-position:top; } Can someone help me with the situation. Regards Zee

    Read the article

  • call lynx from jsp script

    - by Piero
    Hi, I have an execute(String cmd) in a jsp script that calls the exec method from the Runtime class. It works when I call a local command, like a php script stored on the server. for example: /usr/bin/php /path/to/php/script arg1 arg2 So I guess my execute command is ok, since it is working with that. Now when I try to call lynx, the text-based web browser, it does not work. If I call it in a terminal, it works fine: /usr/bin/lynx -dump -accept_all_cookies 'http://www.someurl.net/?arg1=1&arg2=2' But when I call this from my execute command, nothing happens... Any idea why? This is my execute method: public String execute(String cmd){ Runtime r = Runtime.getRuntime(); Process p = null; String res = ""; try { p = r.exec(cmd); InputStreamReader isr = new InputStreamReader(p.getInputStream()); BufferedReader br = new BufferedReader(isr); String line = null; //out.println(res); while ((line = br.readLine()) != null) { res += line; } p.waitFor(); } catch (Exception e) { res += e; } System.out.println(p.exitValue()); return res; }

    Read the article

  • Call WCF Service Through Javascript, AJAX, or JQuery

    - by obautista
    I created a number of standard WCF Services (Service Contract and Host (svc) are in separate assemblies). I fired up a Web Site in IIS to host the Services (i.e., address is http://services:1000/wcfservices.svc). Then in my Web Site project I added the reference. I am able to call the services normally. I am needed to call some of the services client side. Not sure if I should be looking at articles calling WCF services through AJAX, JQuery, or JSON enabled WCF Services. Can anyone provide any thoughts or experience with configuring as such? Some of the changes I made was adding the following to the Operation Contract: [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "SetFoo")] void SetFoo(string Id); Then this above the implementation of the interface: [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] Then in the service webconfig I have this (parens are angle brackets): <serviceHostingEnvironment aspNetCompatibilityEnabled="true"> <baseAddressPrefixFilters> <add prefix="http://services:1000/wcfservices.svc/"/>> </baseAddressPrefixFilters> </serviceHostingEnvironment> <serviceHostingEnvironment multipleSiteBindingsEnabled="false" /> Then in the client side I attempted this: <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"> <compositeScript> <Scripts> <asp:ScriptReference Path="http://Flixsit:1000/FlixsitWebServices.svc" /> </Scripts> </CompositeScript> </asp:ScriptManagerProxy> I am attempting to call the service like this in javascript: wcfservices.SetFoo(string Id); Nothing is working. If it is idea or a better solution to call JSON enable, JQuery, etc....I am willing to make any changes. Thanks for any suggestions/tips provided....

    Read the article

  • How to setup OpenGL camera for a racing game

    - by vian
    I need the view to show the road polygon (a rectangle 3.f * 100.f) with a vanishing point for a road being at 3/4 height of the viewport and the nearest road edge as a viewport's bottom side. See Crazy Taxi game for an example of what I wish to do. I'm using iPhone SDK 3.1.2 default OpenGL ES project template. I setup the projection matrix as follows: glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustumf(-2.25f, 2.25f, -1.5f, 1.5f, 0.1f, 1000.0f); Then I use glRotatef to adjust for landscape mode and setup camera. glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glRotatef(-90, 0.0f, 0.0f, 1.0f); const float cameraAngle = 45.0f * M_PI / 180.0f; gluLookAt(0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 100.0f, 0.0f, cos(cameraAngle), sin(cameraAngle)); My road polygon triangle strip is like this: static const GLfloat roadVertices[] = { -1.5f, 0.0f, 0.0f, 1.5f, 0.0f, 0.0f, -1.5f, 0.0f, 100.0f, 1.5f, 0.0f, 100.0f, }; And I can't seem to find the right parameters for gluLookAt. My vanishing point is always at the center of the screen.

    Read the article

  • Call Webservice using Javascript

    - by ajithperuva
    I am trying to call a webservice using javascript.But it shows an error like selectSingleNode() is not a method.I am trying it in mozilla firefox.Which is perfectly working in explorer when i change XMLHttpRequest to ActiveXObject.here i am adding my source code which i am tried in firefox. // Web Service functionality // Global vars var xmlDoc = null; var _serviceCallback = null; // Calls web service, web service url and parms, and callback function or null must be provided. // Callback function receives a true or false based on success of call to host function callWebService(url, callback) { _serviceCallback = callback; if(xmlDoc == null) { // xmlDoc = new XMLHttpRequest(); xmlDoc = new XMLHttpRequest(); } xmlDoc.onreadystatechange = stateChange; //callback for readystate xmlDoc.async = true; //do background processing //xmlDoc.load(url); xmlDoc.open('GET', url); xmlDoc.send(); //var doc= xmlDoc.responseXML; } // Updates readystate by callback function stateChange() { if (xmlDoc.readyState == 4) { var err = xmlDoc.parseError; var result = false; var nd; if(err.errorCode == 0) { nd = xmlDoc.selectSingleNode("//envelope/date_time"); if(nd.text != "") result = true; } // perform callback if provided if(_serviceCallback != null) _serviceCallback(result, nd == null ? "" : nd.text); } } // Callback supplied to XMLHttpRequest call function callbackTest(result, data) { obj = document.getElementById("txtOuput"); if(result) obj.value = "Success " + data; else obj.value = "Web Service Call Failed"; } Please help me...Already which kill my 8 more hours...

    Read the article

  • Slow Databinding setup time in C# .NET 4.0

    - by Svisstack
    Hello, I have got a problem. I have windows forms application with dynamic generated layout, but i have a problem in performance. In this form i use DataBinding from .NET 4.0 and databinding after setup works fine, but he binding setup time for ONE control blocking my application on approx 0.7 second. I have some controls and time of binging setuping is around 2 minutes. I trying all possible solutions, I dont have any ideas without write self binding class. Why is wrong with my code? case "Boolean": { Binding b = new Binding("Checked", __bindingsource, __ep.Name); CheckBox cb = new CheckBox(); /* * HERE is the problem */ cb.DataBindings.Add(b); /* * HERE is the end of problem */ __flp.Controls.Add(cb); __bindingcontrol.AddBinding(b); break; } Without problem code lines all works fast and without binding ;-( but i want binding turn on in normal speed. PS1. I have suspended layout in generation time. PS2. I have same problem with binding TextBox'es, PictureBoxe's, CheckBox is only example. How to do that?

    Read the article

  • How to center a Paypal button in IE8

    - by Barry
    On one of my pages, http://artistsatlaketahoe.com/abstract.html , the Paypal buttons appear centered beneath text in FireFox and Chrome, but not in IE8. I got the centering to work in FF and Chrome by adding the following within the Paypal code snippet relating the Add to Cart image: style="display: block; margin: 0 auto;" Unfortunately, it isn't working in IE8. Any suggestions? Thanks!!

    Read the article

  • maintain dialog center with dynamic content

    - by mcgrailm
    I would have a dialog with the following $("#statusbox").dialog({ autoOpen: false, bgiframe: true, modal: true, width: 'auto', height:'auto', title:"Check Order Status", buttons: { Find: function() { get_status(); }, Close: function() { $(this).dialog('close'); } } }); and when the user hits the find button it runs ajax and returns orders to the dialog and it get dynamically re-sized but it only extends the box down. Is there way to make the box extend up and down so that the dialog remains centered ? also if there was enough content then it could potentially go beyond the bounds of the page so I would think I could use a max height to prevent that but what do I do if they re-size the window ? thanks for any help

    Read the article

  • Show progress during a long Ajax call

    - by kousen
    I have a simple web site (http://www.kousenit.com/twitterfollowervalue) that computes a quantity based on a person's Twitter followers. Since the Twitter API only returns followers 100 at a time, a complete process may involve lots of calls. At the moment, I have an Ajax call to a method that runs the Twitter loop. The method looks like (Groovy): def updateFollowers() { def slurper = new XmlSlurper() followers = [] def next = -1 while (next) { def url = "http://api.twitter.com/1/statuses/followers.xml?id=$id&cursor=$next" def response = slurper.parse(url) response.users.user.each { u -> followers << new TwitterUser(... process data ...) } next = response.next_cursor.toBigInteger() } return followers } This is invoked from a controller called renderTTFV.groovy. I call the controller via an Ajax call using the prototype library: On my web page, in the header section (JavaScript): function displayTTFV() { new Ajax.Updater('ttfv','renderTTFV.groovy', {}); } and there's a div in the body of the page that updates when the call is complete. Everything is working, but the updateFollowers method can take a fair amount of time. Is there some way I could return a progress value? For example, I'd like to update the web page on every iteration. I know ahead of time how many iterations there will be. I just can't figure out a way to update the page in the middle of that loop. Any suggestions would be appreciated.

    Read the article

  • Draw a cross at center of a UIImagePickerController.

    - by VansFannel
    Hello. I'm very new on iPhone development. I'm trying to draw a cross over the image obtained from camera. I'm using a custom ViewController that inherits from UIImagePickerController. When I star the application, I see the cross, but a few seconds after the cross disappears. Should I use cameraOverlayView? Thank you

    Read the article

  • How to align 3 divs (left/center/right) inside another div?

    - by serg555
    I want to have 3 divs aligned inside a container div, something like this: [[LEFT] [CENTER] [RIGHT]] Container div is 100% wide (no set width), and center div should remain in center after resizing the container. So I set: #container{width:100%;} #left{float:left;width:100px;} #right{float:right;width:100px;} #center{margin:0 auto;width:100px;} But it becomes: [[LEFT] [CENTER] ] [RIGHT] Any tips?

    Read the article

  • Python 4 step setup with progressBars

    - by Samuel Taylor
    I'm having a problem with the code below. When I run it the progress bar will pulse for around 10 secs as meant to and then move on to downloading and will show the progress but when finished it will not move on to the next step it just locks up. import sys import time import pygtk import gtk import gobject import threading import urllib import urlparse class WorkerThread(threading.Thread): def __init__ (self, function, parent, arg = None): threading.Thread.__init__(self) self.function = function self.parent = parent self.arg = arg self.parent.still_working = True def run(self): # when does "run" get executed? self.parent.still_working = True if self.arg == None: self.function() else: self.function(self.arg) self.parent.still_working = False def stop(self): self = None class MainWindow: def __init__(self): gtk.gdk.threads_init() self.wTree = gtk.Builder() self.wTree.add_from_file("gui.glade") self.mainWindows() def mainWindows(self): self.mainWindow = self.wTree.get_object("frmMain") dic = { "on_btnNext_clicked" : self.mainWindowNext, } self.wTree.connect_signals(dic) self.mainWindow.show() self.installerStep = 0 # 0 = none, 1 = preinstall, 2 = download, 3 = install info, 4 = install #gtk.main() self.mainWindowNext() def pulse(self): self.wTree.get_object("progress").pulse() if self.still_working == False: self.mainWindowNext() return self.still_working def preinstallStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 1 WT = WorkerThread(self.heavyWork, self) #Would do a heavy function here like setup some thing WT.start() gobject.timeout_add(75, self.pulse) def downloadStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 2 urllib.urlretrieve('http://mozilla.mirrors.evolva.ro//firefox/releases/3.6.3/win32/en-US/Firefox%20Setup%203.6.3.exe', '/tmp/firefox.exe', self.updateHook) self.mainWindowNext() def updateHook(self, blocks, blockSize, totalSize): percentage = float ( blocks * blockSize ) / totalSize if percentage > 1: percentage = 1 self.wTree.get_object("progress").set_fraction(percentage) while gtk.events_pending(): gtk.main_iteration() def installInfoStep(self): self.wTree.get_object("btnNext").set_sensitive(1) self.wTree.get_object("notebook1").set_current_page(1) self.installerStep = 3 def installStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 4 WT = WorkerThread(self.heavyWork, self) #Would do a heavy function here like setup some thing WT.start() gobject.timeout_add(75, self.pulse) def mainWindowNext(self, widget = None): if self.installerStep == 0: self.preinstallStep() elif self.installerStep == 1: self.downloadStep() elif self.installerStep == 2: self.installInfoStep() elif self.installerStep == 3: self.installStep() elif self.installerStep == 4: sys.exit(0) def heavyWork(self): time.sleep(10) if __name__ == '__main__': MainWindow() gtk.main()

    Read the article

  • My computer keeps restart when accept Skype call

    - by hvtuananh
    I'm using latest Skype version (4.2) on Windows XP SP3 My computer keeps restart when I click "Accept" button on Skype call Windows Update is running and I've already installed all updates What's wrong with my computer? How to fix it? EDIT: I only see this error in Event Viewer Event Type: Error Event Source: System Error Event Category: (102) Event ID: 1003 Date: 3/2/2010 Time: 3:47:50 PM User: N/A Computer: TUANANH Description: Error code 1000000a, parameter1 ffffff94, parameter2 0000001c, parameter3 00000000, parameter4 80537bf1. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 53 79 73 74 65 6d 20 45 System E 0008: 72 72 6f 72 20 20 45 72 rror Er 0010: 72 6f 72 20 63 6f 64 65 ror code 0018: 20 31 30 30 30 30 30 30 1000000 0020: 61 20 20 50 61 72 61 6d a Param 0028: 65 74 65 72 73 20 66 66 eters ff 0030: 66 66 66 66 39 34 2c 20 ffff94, 0038: 30 30 30 30 30 30 31 63 0000001c 0040: 2c 20 30 30 30 30 30 30 , 000000 0048: 30 30 2c 20 38 30 35 33 00, 8053 0050: 37 62 66 31 7bf1

    Read the article

  • error handeling in informatca power center

    - by user223541
    i want to devlop a mapping for followinfg scenerio . I have a 1 source and 1 target and 1 error table.Target and Error tables have all fields that are present in source tables.But the data type o of all fieds for error table are varchar .Error table dont have integirty or foreign key and other constraints . Error table also have2 more fileds .Error no and error msg. Now when the workflow is executed if there is erro while inserting any record then that recored shold be moved to error table.Also the data base error code and error message should be logged in error no and error message in error tables fields as mentioned. How can i devlop such a mappng?Where can i find exaples of such mapping ?

    Read the article

  • Call for papers for Oracle OpenWorld and JavaOne 2012!

    - by Javier Puerta
    Organization for Oracle OpenWorld and JavaOne 2012 has started. Watch out for further information to come in the coming weeks. Oracle OpenWorld Exhibition and Sponsorship Opportunities Exhibiting, sponsoring and advertising at Oracle OpenWorld 2012 is your best opportunity to achieve critical marketing and sales objectives. As the world's preeminent Oracle conference, Oracle OpenWorld attracts influential users and decision-makers from customer organizations globally. Explore exhibition, branding and sponsorship opportunities now. Register NOW and Save - Super Saver Period Ends 30. March Register today and save $800 on your Oracle OpenWorld full conference pass. Call For Papers Opens 14. March Oracle OpenWorld Call for Papers will open Wednesday, 14. March.  Speak your mind to the world's largest gathering of the most-knowledgeable IT decision-makers, leading-edge developers, and advanced technologists. Don’t delay – the call for papers closes 11:59 PM PST on 9. April 2012. JavaOne Exhibition and Sponsorship Opportunities Exhibiting, sponsoring, and advertising at JavaOne 2012 provide premium opportunities for you to connect with a market that boasts 9 million Java developers. As the world's most authoritative Java conference, JavaOne attracts Java developers, architects, and enthusiasts from around the globe. Check out the exhibition, branding, and sponsorship opportunities available now. Register NOW and Save - Super Saver Period Ends 30. March Register today and save $600 on your JavaOne full conference pass. Call For Papers Opens 14. March Show and Tell. Call for papers will open Wednesday, 14. March.  Lead a session and share your fresh insights and best practices to drive the advancement JavaOne. Don’t delay – the call for papers closes 11:59 PM PST on 9. April 2012.

    Read the article

  • Call for papers for Oracle OpenWorld and JavaOne 2012!

    - by Javier Puerta
    Organization for Oracle OpenWorld and JavaOne 2012 has started. Watch out for further information to come in the coming weeks. Oracle OpenWorld Exhibition and Sponsorship Opportunities Exhibiting, sponsoring and advertising at Oracle OpenWorld 2012 is your best opportunity to achieve critical marketing and sales objectives. As the world's preeminent Oracle conference, Oracle OpenWorld attracts influential users and decision-makers from customer organizations globally. Explore exhibition, branding and sponsorship opportunities now. Register NOW and Save - Super Saver Period Ends 30. March Register today and save $800 on your Oracle OpenWorld full conference pass. Call For Papers Opens 14. March Oracle OpenWorld Call for Papers will open Wednesday, 14. March.  Speak your mind to the world's largest gathering of the most-knowledgeable IT decision-makers, leading-edge developers, and advanced technologists. Don’t delay – the call for papers closes 11:59 PM PST on 9. April 2012. JavaOne Exhibition and Sponsorship Opportunities Exhibiting, sponsoring, and advertising at JavaOne 2012 provide premium opportunities for you to connect with a market that boasts 9 million Java developers. As the world's most authoritative Java conference, JavaOne attracts Java developers, architects, and enthusiasts from around the globe. Check out the exhibition, branding, and sponsorship opportunities available now. Register NOW and Save - Super Saver Period Ends 30. March Register today and save $600 on your JavaOne full conference pass. Call For Papers Opens 14. March Show and Tell. Call for papers will open Wednesday, 14. March.  Lead a session and share your fresh insights and best practices to drive the advancement JavaOne. Don’t delay – the call for papers closes 11:59 PM PST on 9. April 2012.

    Read the article

  • Mercurial repository usage with binary files for building setup files

    - by Ryan
    I have an existing Mercurial repository for a C++ application in a small corporate environment. I asked a co-worker to add the setup script to the repository and he added all of the dependency binaries, PDFs, and executable to the repository under an Install directory. I dislike having the binaries and dependencies in the same repository, but I'd like recommendations on best practices. Here are the options I am considering: Create a separate repository for the Installer and related files Create a subrepository for the Installer and related files Use a (yet to be identified) build dependency manager I am concerned with using a subrepository with Mercurial based on what I've read so far and the (apparently) incomplete implementation. I would like to get a project dependency system, e.g. Ivy, but I don't know all of the options and haven't had time yet to try out any options. I thought I'd use TortoiseHg as a basis, and it does not have the TortoiseHg binaries in the repository although it does have some binaries such as kdiff3.exe. Instead it uses setup.py to clone multiple repositories and build the apps. This seems reasonable for OSS, but not so much for corporate environments. Recommendations?

    Read the article

  • How to use Custom Namespace for a Google Merchant Center Item Feed

    - by Jon
    I have declared the namespace that i am using: <?xml version='1.0'?> <entry xmlns='http://www.w3.org/2005/Atom' xmlns:g='http://base.google.com/ns/1.0' xmlns:c='http://base.google.com/cns/1.0'> here is a typical xml node i have: <c:gold_type type="string">White Gold</c:gold_type> Yet, when i submit my feed only the Google Namespace xml nodes work. Any ideas?

    Read the article

  • Python 4 steps setup with progressBars

    - by Samuel Taylor
    I'm having a problem with the code below. When I run it the progress bar will pulse for around 10 secs as meant to and then move on to downloading and will show the progress but when finished it will not move on to the next step it just locks up. import sys import time import pygtk import gtk import gobject import threading import urllib import urlparse class WorkerThread(threading.Thread): def __init__ (self, function, parent, arg = None): threading.Thread.__init__(self) self.function = function self.parent = parent self.arg = arg self.parent.still_working = True def run(self): # when does "run" get executed? self.parent.still_working = True if self.arg == None: self.function() else: self.function(self.arg) self.parent.still_working = False def stop(self): self = None class MainWindow: def __init__(self): gtk.gdk.threads_init() self.wTree = gtk.Builder() self.wTree.add_from_file("gui.glade") self.mainWindows() def mainWindows(self): self.mainWindow = self.wTree.get_object("frmMain") dic = { "on_btnNext_clicked" : self.mainWindowNext, } self.wTree.connect_signals(dic) self.mainWindow.show() self.installerStep = 0 # 0 = none, 1 = preinstall, 2 = download, 3 = install info, 4 = install #gtk.main() self.mainWindowNext() def pulse(self): self.wTree.get_object("progress").pulse() if self.still_working == False: self.mainWindowNext() return self.still_working def preinstallStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 1 WT = WorkerThread(self.heavyWork, self) #Would do a heavy function here like setup some thing WT.start() gobject.timeout_add(75, self.pulse) def downloadStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 2 urllib.urlretrieve('http://mozilla.mirrors.evolva.ro//firefox/releases/3.6.3/win32/en-US/Firefox%20Setup%203.6.3.exe', '/tmp/firefox.exe', self.updateHook) self.mainWindowNext() def updateHook(self, blocks, blockSize, totalSize): percentage = float ( blocks * blockSize ) / totalSize if percentage > 1: percentage = 1 self.wTree.get_object("progress").set_fraction(percentage) while gtk.events_pending(): gtk.main_iteration() def installInfoStep(self): self.wTree.get_object("btnNext").set_sensitive(1) self.wTree.get_object("notebook1").set_current_page(1) self.installerStep = 3 def installStep(self): self.wTree.get_object("progress").set_fraction(0) self.wTree.get_object("btnNext").set_sensitive(0) self.wTree.get_object("notebook1").set_current_page(0) self.installerStep = 4 WT = WorkerThread(self.heavyWork, self) #Would do a heavy function here like setup some thing WT.start() gobject.timeout_add(75, self.pulse) def mainWindowNext(self, widget = None): if self.installerStep == 0: self.preinstallStep() elif self.installerStep == 1: self.downloadStep() elif self.installerStep == 2: self.installInfoStep() elif self.installerStep == 3: self.installStep() elif self.installerStep == 4: sys.exit(0) def heavyWork(self): time.sleep(10) if __name__ == '__main__': MainWindow() gtk.main() I have a feeling that its something to do with: while gtk.events_pending(): gtk.main_iteration() Is there a better way of doing this?

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >