Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Macros in Footer Menu?

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,043

    Macros in Footer Menu?

    Macros in the footer work great.

    They don't seem to do anything in menus, however. Should they?

    What happens instead is that starting the custommenuoptions (footer) menu with anything other than the pipe ( | ) turns the footer menu into an options menu at the left of the footer; which is neat, but being able to have a dynamic menu would be neat also. <s> (I see this has changed from RC9 and before: lacking the pipe used to mean that the menu labels started from the left. I suspect this is a change to make things work with mobile, eh?)

    thanks,

    Hank
    Last edited by HankFay; 2013-11-04 at 21:04.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,081
    Hi Hank,

    The menus can be prefixed with | < or > for center, left and right alignment.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,043
    Quote Originally Posted by barrymavin View Post
    Hi Hank,

    The menus can be prefixed with | < or > for center, left and right alignment.
    Ah, had used <center>, didn't realize about just using < and >.

    The question was about using macros in the footer menu, to make them dynamic. I gather that's a "no"?

    thanks,

    Hank

  4. #4
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,471
    Hi Hank,

    The & character is used for hot key shortcuts (http://www.lianja.com/community/show...highlight=menu), but you can use {} in the menus.

    Regards,

    Yvonne

  5. #5
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,043
    Quote Originally Posted by yvonne.milne View Post
    Hi Hank,

    The & character is used for hot key shortcuts (http://www.lianja.com/community/show...highlight=menu), but you can use {} in the menus.

    Regards,

    Yvonne
    Hi Yvonne,

    You and Barry have quite the magic touch <s>: it doesn't work for me, I tell you it doesn't, you tell me it does, and then it works for me.

    What worked for me today was the following .footermenu, in section2 of page customers in Lianjademo (with the footer caption removed): |&{iif(orders.freight > 100.00, "Reject", "Accept")}

    In this case, it sort of works, in the sense that when I set the value in the attributes or from the console, it reflects the current value, but when I change the record nothing happens.

    I've tried various things: setting a var to the .footermenu value and then setting .footermenu to the var does refresh the macro. But I can't find a way to make it fire: moving the record pointer in the section2 grid does not fire either the Change or Datachanged delegates, for example (although it seems to me one of them should fire).

    So, thanks for making me try again. Any clues on how to make it fire would be appreciated.

    thanks,

    Hank

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,081
    Hi Hank,

    Look in the App Inspector and see what delegates are being fired.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,471
    Hi Hank,

    Try the section.click() - this works for me in lianjademo:

    Code:
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'click' event
    proc Customers_section2_click()
    	Lianja.get("customers.section2").footermenu = '|&{iif(orders.freight > 100.00, "Reject", "Accept")}'
    endproc
    Regards,

    Yvonne

  8. #8
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,043
    Hi Yvonne,

    thanks, that almost works.

    If on the first record of section 2 on opening (freight > 100), it shows correctly. Now use the nav bar to move the parent record. It still shows reject (even if the code is copied to the parentdatachanged delegate). Click on the first record of section 2 and nothing happens: still says Reject. Click on second record, and it fires, changes to accept.

    Is my understanding of the Change delegate correct, that it fires when the record pointer for that section changes? If so, it does not appear to be happening. If not, when does it fire?

    thanks,

    Hank

  9. #9
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,471
    Hi Hank,

    Yes, I noticed the same thing after posting and I've logged a ticket for it - the click doesn't seem to fire if you click on the currently selected row.

    Note: the parentdatachanged is called before the new child is selected, so it will pick up the value of the previous parent's child (previous customer's order in this case). You could use the parentdatachanged to blank the menu and prompt the user to click on a row from the footercaption.

    Regards,

    Yvonne

  10. #10
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,081
    Are we talking about a grid or a form section?
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Page 1 of 3 123 LastLast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us