"ActionBar can only add ContextualActionView or ActionView"

134 views
Skip to first unread message

Stephen Oller

unread,
Feb 12, 2021, 4:01:35 PM2/12/21
to Kivy users support
I have what I assume to be a newbie question.  Hoping someone can point out what I'm doing wrong here.

I'm developing a desktop app and want to add a menu bar.  I'm using Kivy's ActionBar to that end (if you know something better than ActionBar, please let me know).

My *.kv file looks like this (redacted irrelevant bits):

<TaskTracker>:
     MenuBar:
     TaskList:
     ProjectList:
     DetailWindow:

<MenuBar>:
     ActionPrevious:
     ActionView:
         ActionButton:

My *.py file like so (redacted irrelevant bits):

class TaskTracker(FloatLayout):
pass

class MenuBar(ActionBar):
pass

class TaskApp(App):
     def build(self):
     app = TaskTracker()
     return app

The part I'm struggling with is the error I mentioned in the title.  As far as I can tell, the ActionBar DOES have an ActionView element.  So I can't see what the heck it's complaining about.  I've played around with different things, but the only thing I can do is change the error to something else.

Stephen Oller

unread,
Feb 13, 2021, 7:14:03 AM2/13/21
to Kivy users support
Nevermind.  I figured it out.

<MenuBar>:
     ActionView:
         ActionPrevious:
         ActionButton:
             text: 'File'
Reply all
Reply to author
Forward
0 new messages