User Profile

Collapse

Profile Sidebar

Collapse
phub11
phub11
Last Activity: Oct 24 '12, 10:04 PM
Joined: Feb 8 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • phub11
    started a topic Problem with gtk.CellRendererCombo and TreeStore

    Problem with gtk.CellRendererCombo and TreeStore

    Hi,

    I have 3 columns, the first is text, the second are checkbuttons, and the last are comboboxes. Could someone tell me how I can populate the comboboxes using only data added to the child list? Below is the code I have so far:

    Code:
    	treestore = gtk.TreeStore(str, bool)
    	for imol in molecule_number_list():
    		mol_name = molecule_name(imol)
    		piter = treestore.append(None, [mol_name, True])
    ...
    See more | Go to post

  • Getting/setting status of multiple checkbuttons made in loop

    Hi,

    I have a routine that creates multiple checkbuttons. I'd like to add a separate combobox that, in part, changes the status of the checkbuttons made in this loop. Could someone point me to some code that allowd me to change, say the second checkbutton made in the loop from False to True?

    Code:
    		for imol in molecule_number_list():
    			button_name = molecule_name(imol)
    			button_imol = gtk.CheckButton(button_name)
    ...
    See more | Go to post

  • phub11
    replied to "For" loops with GTK boxes
    Thanks for the reply. The trick was to put "combobox.conne ct('changed', sel_ref_mol)" in to the For loop.
    See more | Go to post

    Leave a comment:


  • phub11
    started a topic "For" loops with GTK boxes

    "For" loops with GTK boxes

    Hi,

    I have a variable number of check buttons and comboboxes I want to add to a window; however, I keep getting memory faults when I try to horizontal box a check button and combobox and then box each one of these vertically. Any help would be appreciated:

    Code:
    	window = gtk.Window(gtk.WINDOW_TOPLEVEL)
    	combobox = gtk.combo_box_new_text()
    	box1_vbox = gtk.VBox(False, 2)
    	list_vbox = gtk.VBox(True,
    ...
    See more | Go to post

  • phub11
    started a topic Bailing after outputting file
    in PHP

    Bailing after outputting file

    Hi all,

    I have a PHP script that is split into 2 parts; first, the user input is analyzed and a txt file is made; second, the remainder of the script generates some HTML output that is displayed.

    It looks like the HEADER stuff for the txt file causes the script to stop after the file is produced, and the remainder of the script isn't run. Is there any work around?

    Code:
       $filename = "output";
    ...
    See more | Go to post

  • phub11
    replied to Convert numbers to letters
    I guess that will convert it to UniCode, shift it across 64 members of the character set, and then convert it back.

    Thanks!
    See more | Go to post

    Leave a comment:


  • phub11
    started a topic Convert numbers to letters

    Convert numbers to letters

    Hi all,

    I was wondering if there is a quick way to convert numbers to letters, such as 1=A, and 26=Z. I can do it the laborious way using 26 definitions, but it's always nice to know of any shortcuts!

    Thanks
    See more | Go to post

  • phub11
    replied to Matching whole strings in array search
    in PHP
    It seems I may have spoken to soon!

    Thanks anyway
    See more | Go to post

    Leave a comment:


  • phub11
    replied to Matching whole strings in array search
    in PHP
    Hi!

    I'm generating a string via a loop, and searching for it in multidimensiona l array...

    http://us2.php.net/manual/en/function.array-search.php

    Thanks!...
    See more | Go to post

    Leave a comment:


  • phub11
    started a topic Matching whole strings in array search
    in PHP

    Matching whole strings in array search

    Hi all,

    I have a string, and I want to see if it matches any element (of a specific key) in a multidimensiona l array. The following code:

    $haystack[$key] == $needle

    gives hits even if the needle is a partial match within the haystack (i.e., if I search for FOX, I get hits for FOX and FIREFOX). Is there a way I can search that only gives matches when the whole of the 2 strings match?

    Tha...
    See more | Go to post

  • phub11
    started a topic passing variables assigned from input box

    passing variables assigned from input box

    Hi all,

    I'm try to set up a hidden variable that takes the value of an input:

    Code:
    bFINALTEXT1 = document.createTextNode("Final:");
    bFINAL1 = document.createElement("input");
    bFINAL1.style.width="5em";
    bFINAL1.type="text"
    bFINAL1.name=compXY+'comp[]';
    //bFINAL1.onblur=function(){getfinal(this.value);};
    
    bMAX1 = document.createElement("input");
    ...
    See more | Go to post

  • Works like a charm!

    Thanks!...
    See more | Go to post

    Leave a comment:


  • Returning "null" or "false" if nextSibling doesn't exist

    Hi all,

    I have a routine that checks to see if an ID has been set for the next row down in a table. Everything works fine except if I'm on the last row and no row exists; the routine just hangs:

    Code:
    var checkNext = obj.parentNode.parentNode.nextSibling.id;
    Any ideas how I can get this to return "null" or "false" is there isn't a subsequent row in the table?

    ...
    See more | Go to post

  • phub11
    replied to Using DOM to insert a DIV within a TD
    I've figured it out...

    nextSibling
    See more | Go to post

    Leave a comment:


  • phub11
    replied to Using DOM to insert a DIV within a TD
    Hi again,

    A quick follow-up question:

    I have a routine that creates "parent" rows in a table and assigns them a unique row ID. I then have a sub-routine that can insert multiple "daughter" rows in between "parent" rows that don't have row IDs. I have successfully figured out how to determine a selected "parent" row by using:

    parentRowID = element.parentN ode.parentNode. id;...
    See more | Go to post

    Leave a comment:


  • phub11
    replied to Using DOM to insert a DIV within a TD
    Thanks for the the replies!

    I'm working out a way to keep track of inserts by giving parent rows IDs, and deleting their daughters automatically. Its a lot more complicated than using DIVs, but the code is now *almost* working.

    Thanks again to all those who responded.
    See more | Go to post

    Leave a comment:


  • phub11
    replied to Using DOM to insert a DIV within a TD
    Thanks for the reply.

    Yes, I am confused as to how to start a DIV, insert nodes(?) such as cells into the DIV, and then close the DIV.

    So as to help me better understand the subtleties of the DOM, could someone adapt the above code so the contents of just one cell is placed inside the new DIV? Or, give a link to a page that has a similar example (I can't find anything thru Google).

    Thanks!
    See more | Go to post

    Leave a comment:


  • phub11
    replied to Using DOM to insert a DIV within a TD
    Thanks for the reply but I'm still stuck. I'm basically trying to insert cells into an existing table, and place them within a DIV so these new cells can be easily removed later. Below is more succinct code which is supposed to add a row of 2 cells to a table that already has cells, and keep the new cells within a single DIV:

    Code:
    var table = document.getElementById("yourtable");
    var rowCount = table.rows.length;
    ...
    See more | Go to post

    Leave a comment:


  • phub11
    started a topic Using DOM to insert a DIV within a TD

    Using DOM to insert a DIV within a TD

    Hi all,

    I am dynamically creating a DIV within a newly added row to a previously created table. I'm stuck with the correct syntax. Below is my current effort:

    Code:
    function gradType(obj) {
    insertDiv = document.createElement("div");
                    if (obj=="0") {
    insertdiv = document.getElementById("insert");
    while(insertDiv.firstChild)
    {
    insertDiv.removeChild(insertDiv.firstChild);
    ...
    See more | Go to post

  • Thanks for the reply!

    However, it still doesn't appear to work (even when I changed ''secondDrop'' to 'secondDrop'). Thanks in advance for any further help.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...