Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > IOWA again

Reply
Thread Tools

IOWA again

 
 
Mark Probert
Guest
Posts: n/a
 
      09-09-2004

Hi,

Another IOWA issue but more likely, a "me" issue.

I have a header than contains the code:

Logged in as: @user<br/>


I have a LeftNav panel that includes

def foo_page
'/foo' # mapfile.conf --> /foo: Run::Foo
end


'foo' includes the LeftNav and the header. However, I am not sure of how
to pass @user via the LeftNav. If I change LeftNav to:

def foo_page
newPage = page_named("Run::Foo")
newPage.user = @user
yield newPage
end


I get an error

<a href="
no block given
(eval):39:in `credit_page'


Any ideas on how to pass the @user to the LeftNav?

BTW, @user is correctly defined and available LeftNav.

Many thanks,

--
-mark. (probertm @ acm dot org)

 
Reply With Quote
 
 
 
 
Kirk Haines
Guest
Posts: n/a
 
      09-09-2004
On Fri, 10 Sep 2004 06:55:04 +0900, Mark Probert wrote

> I have a LeftNav panel that includes
>
> def foo_page
> '/foo' # mapfile.conf --> /foo: Run::Foo
> end
>
> 'foo' includes the LeftNav and the header. However, I am not sure
> of how to pass @user via the LeftNav. If I change LeftNav to:
>
> def foo_page
> newPage = page_named("Run::Foo")
> newPage.user = @user
> yield newPage
> end
>
> I get an error
>
> <a href="
> no block given
> (eval):39:in `credit_page'
>
> Any ideas on how to pass the @user to the LeftNav?


Yeah. You can see an example of this in the webrick demo. However, your
snippet of code up there is exactly what you want.

foo_page() should create the new page, assign @user to it, and then yield
it, exactly as you are doing.

The change you need to make is in your HTML:

Instead of this:

<a href="@foo_page">Goto foo</a>

you want this:

<a oid="foo_page">Goto Foo</a>



Make sense?


Kirk Haines



 
Reply With Quote
 
 
 
 
Mark Probert
Guest
Posts: n/a
 
      09-09-2004
Hi, Kirk.

"Kirk Haines" <(E-Mail Removed)> wrote:
>
> <a oid="foo_page">Goto Foo</a>
>
> Make sense?
>

Got it. Thanks.

BTW, you mentioned once before but I can't find the reference.
awake() is triggered on page initialisation. What is triggered
each time the page is referenced?


--
-mark. (probertm @ acm dot org)

 
Reply With Quote
 
David Naseby
Guest
Posts: n/a
 
      09-10-2004
> -----Original Message-----
> From: Mark Probert [mailto(E-Mail Removed)]
>
> BTW, you mentioned once before but I can't find the reference.
> awake() is triggered on page initialisation. What is triggered
> each time the page is referenced?


setup()

From http://enigo.com/projects/iowa/tutor...r_toolbox.html, in the
Main.iwa section..

David
http://homepages.ihug.com.au/~naseby/



 
Reply With Quote
 
Mark Probert
Guest
Posts: n/a
 
      09-10-2004
"David Naseby" <(E-Mail Removed)> wrote:

> http://enigo.com/projects/iowa/tutor...r_toolbox.html


Thanks, David.

I missed that paragraph ..

--
-mark. (probertm @ acm dot org)

 
Reply With Quote
 
Kirk Haines
Guest
Posts: n/a
 
      09-10-2004
On Fri, 10 Sep 2004 08:55:03 +0900, Mark Probert wrote
> Hi, Kirk.
>
> "Kirk Haines" <(E-Mail Removed)> wrote:
> >
> > <a oid="foo_page">Goto Foo</a>
> >
> > Make sense?
> >

> Got it. Thanks.
>
> BTW, you mentioned once before but I can't find the reference.
> awake() is triggered on page initialisation. What is triggered
> each time the page is referenced?


That would be setup().


Thanks,


Kirk Haines



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft balks at attorney fees in Iowa case Au79 Computer Support 0 05-05-2007 05:21 AM
Iowa antitrust case: Microsoft exec called software developers 'pawns' Au79 Computer Support 1 01-09-2007 05:15 AM
Kelso Smacks Down Iowa Jay Furr Computer Support 30 12-30-2006 04:24 AM
Opening Statements Begin in Microsoft - Iowa Case Au79 Computer Support 19 12-03-2006 06:00 PM
Looking for somewhere to take the exams in SE Iowa =?Utf-8?B?RGF3bg==?= MCSE 9 06-27-2006 01:45 PM



Advertisments