Skip to content

iOS: action bar title issues #1112

Closed
Closed

Description

@rclai
<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="onLoaded">
  <Page.actionBar>
    <ActionBar title="{{ customTitle }}" />
  </Page.actionBar>
  <StackLayout>
    <Label text="blah1" />
    <Label text="blah2" />
    <Label text="blah3" />
  </StackLayout>
</Page>
var Observable = require('data/observable').Observable;
var viewModel = new Observable({ customTitle: 'hello??' });

exports.onLoaded = function(args) {
  args.object.bindingContext = viewModel;
};

This doesn't work. This causes a freezing crash with a blank error.

However, if I change the action bar title to this:

<ActionBar title="{{ customTitle + 'awefawefawef' }}" />

This works. It will show hello??awefawefawef. So pretty much I have to workaround this freezing crash by doing <ActionBar title="{{ customTitle + '' }}" /> to make it work.

In addition, when it DOES work, my stack layout (shown above) ends up getting overlapped by the action bar instead of going below the action bar.

This is {N} 1.4.3 in the browser-based Telerik Platform.

Activity

  1. added this to the milestone on Nov 19, 2015
  2. self-assigned this
    on Nov 19, 2015
  3. hamorphis commented on Nov 19, 2015

    @hamorphis
    Contributor

    I will split the issue in two separate issues. Here is the other one: #1123

  4. hamorphis commented on Nov 19, 2015

    @hamorphis
    Contributor

    I reproduced the crash with with version 1.4.0 of the tns-core-modules. The app runs fine with our latest source from the master branch. I will now do a git bisect to find which commit fixes this issue.

    EDIT: The crash was because of a typo I introduced in the page xml. After resolving the typo, I can not reproduce the crash with version 1.4.0 of the runtime and the modules.

  5. hamorphis commented on Nov 19, 2015

    @hamorphis
    Contributor

    Can you send some stack trace or other artifact describing the crash?

  6. rclai commented on Nov 19, 2015

    @rclai
    ContributorAuthor

    There is none because it just shows blank.

  7. hamorphis commented on Nov 20, 2015

    @hamorphis
    Contributor

    I have tried the code above with version 1.4.0 and our current release candidate for 1.5.0 and the ActionBar shows just fine. There is no crash. Unless I am able to reproduce this somehow, I don't know what I can do regarding this issue.

  8. N3ll commented on Nov 20, 2015

    @N3ll
    Contributor

    @rclai - you can try to debug the code on your device. You can check the requirements here and the procedure how to do it here. Another thing that might help is to check the view logs.

  9. modified the milestones: , 1.5.1 on Nov 26, 2015
  10. removed this from the 1.5.1 milestone on Nov 27, 2015
  11. lock commented on Aug 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  12. locked and limited conversation to collaborators on Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions