Yep, based on that, I'd say EventPublisher is perfect for you. Let me know
if you have questions on how to implement it (if you decide it will work for
your problem).



On 2/1/07, Matt <[EMAIL PROTECTED]> wrote:
>
>
> On Feb 1, 2:45 pm, Colin Mollenhour <[EMAIL PROTECTED]> wrote:
> > Man that sounds confusing...  What events are you observing exactly?
> >
> > I'm sure there has got to be a better way of doing what you are doing.
> > Try posting a step by step explanation or sample code of what you are
> > trying to accomplish and maybe we can suggest a better way for you.
> > ...
>
> Yeah, I thought it might.  I'll try and explain it better.
>
> Basically, I've wrapped up LiveGrid Plus (Matt Brown's enhancement of
> the Rico LiveGrid JS utility http://dowdybrown.com/dbprod/) into an
> abstract PHP class (PajaxTable).  Any time the LiveGrid table is
> needed, all one needs to do is extend the PajaxTable and define a
> method in that extended class that will be used to fetch the data. For
> example, say I've created a class TestTable that extends PajaxTable:
>
> $table = new TestTable('testGrid', 'includes/PajaxFiller.php', 15,
> 100); // Initialize table
> $table->setColors('red', 'white', 'blue');  // Set odd, even, header,
> etc colors
> $table->addColumn('Blah 1', 200, true); // Add column to table
> (header, width, sortable)
> $table->addColumn('Blah 2', 100, true);
> $table->addColumn('Blah 3', 150, false);
>
> Then, after I've done that, I can simply call $table->printTable() in
> my HTML body and the JavaScript / HTML for the initial LiveGrid code
> will be printed out with the specified attributes that I set above.
> The JS that it prints out includes an Event.observe(window, 'load',
> testGridOnLoad) and, of course, the testGridOnLoad function.  Then,
> once the page loads, testGridOnLoad is called which creates the
> LiveGrid with JavaScript.  Finally, LiveGrid code is used to fetch the
> data, but that's got nothing to do with this.
>
> The problem is that my functions require that the LiveGrid already be
> created so that I can properly set widths and things based on the
> LiveGrid.  This works fine in FF, but in IE, my other functions are
> getting called before testGridOnLoad.  So my temp solution, like I
> said in my previous post, is setting a timeout function that goes to
> see if LiveGrid is created yet.
>
> Still confused?
>
>
> >
>


-- 
Ryan Gahl
Application Development Consultant
Athena Group, Inc.
Inquire: 1-920-955-1457
Blog: http://www.someElement.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to